DOC PREVIEW
LSU CSC 4103 - Distributed Systems

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CSC 4103 - Operating SystemsSpring 2007Tevfik KoşarLouisiana State UniversityApril 26th, 2007Lecture - XXIIIDistributed Systems - IICache Update Policy• Write-through – write data through to disk as soon as they areplaced on any cache– simple– reliable (little information is lost if client crashes)– but poor performance in writes (each write has network overhead)• Delayed-write – modifications written to the cache and thenwritten through to the server later– Write accesses complete quickly– some data may be overwritten before they are written back, and soneed never be written at all– Poor reliability; unwritten data will be lost whenever a user machinecrashes– Variation - flush a block back when it is about to be ejected fromclient’s cache– Variation – scan cache at regular intervals and flush blocks that havebeen modified since the last scan– Variation – write-on-close, writes data back to the server when thefile is closed (eg. AFS)• Best for files that are open for long periods and frequentlymodifiedConsistency• Is locally cached copy of the data consistent with themaster copy?• Client-initiated approach– Client initiates a validity check– Contacts server to check whether the local data areconsistent with the master copy• Server-initiated approach– Server records, for each client, the (parts of) files it caches– When server detects a potential inconsistency, it must react• Potential inconsistency: two clients open the same file inconflicting modes• When servers detects this, it disables caching for this file ==>switch to remote service mode of operationComparing Caching and Remote Service• In caching, many remote accesses handled efficiently bythe local cache; most remote accesses will be served asfast as local ones• Servers are contracted only occasionally in caching (ratherthan for each access)– Reduces server load and network traffic– Enhances potential for scalability• Remote server method handles every remote access acrossthe network; penalty in network traffic, server load, andperformance• Total network overhead in transmitting big chunks of data(caching) is lower than a series of responses to specificrequests (remote-service)Caching and Remote Service (Cont.)• Caching is superior in access patterns withinfrequent writes– With frequent writes, substantial overhead incurred toovercome cache-consistency problem• Benefit from caching when execution carried outon machines with either local disks or large mainmemories• Remote access on diskless, small-memory-capacity machines should be done throughremote-service methodStateful vs Stateless ServiceTwo approaches for storing server-side info when a clientaccesses remote files:• Stateful: Server tracks each file being accessed by eachclient• Stateless: Server provides blocks as they are requestedby each client, without knowing how those blocks areusedStateful File Service• Mechanism– Client opens a file– Server fetches information about the file from its disk,stores it in its memory, and gives the client aconnection identifier unique to the client and the openfile– Identifier is used for subsequent accesses until thesession ends– Server must reclaim the main-memory space used byclients who are no longer active• Eg. AFSStateless File Server• Avoids state information by making each requestself-contained• Each request (eg. read and write) identifies thefile and position in the file in full• No need to establish and terminate a connectionby open and close operations• No need to keep a table of open files in memory• Eg. NFSStateful vs Stateless• Advantage of Stateful over Stateless:– Increased performance– File info is cached in memory ==> fewer disk accesses– Stateful server knows if a file was opened for sequential accessand can thus read ahead the next blocksDistinctions Between Stateful & Stateless Service• Failure Recovery: in case of a crash– A stateful server loses all its volatile state in a crash• Restore state by recovery protocol based on a dialogwith clients, or abort operations that wereunderway when the crash occurred– Server needs to be aware of client failures in order to reclaimspace allocated to record the state of crashed clientprocesses (orphan detection and elimination)– With stateless server, the effects of server failures andrecovery are almost unnoticeable• A newly reincarnated server can respond to a self-contained request without any difficulty• No distinction between a slow server and arecovering server from a client’s point of viewDistinctions (Cont.)• Penalties for using the robust stateless service:– longer request messages– slower request processing• Some environments require stateful service– A server employing server-initiated cache validationcannot provide stateless service, since it maintains arecord of which files are cached by which clientsFile Replication• Replicas of the same file reside on failure-independent machines• Improves availability and can shorten servicetime• Naming scheme maps a replicated file name to aparticular replica– Existence of replicas should be invisible to higher levels– Replicas must be distinguished from one another bydifferent lower-level names• Updates – replicas of a file denote the samelogical entity, and thus an update to any replicamust be reflected on all other replicasAn Example: AFS• A distributed computing environment (Andrew)under development since 1983 at Carnegie-Mellon University, purchased by Transarc, andthen by IBM and released as Transarc DFS, nowopen sourced as OpenAFS• AFS tries to solve complex issues such as uniformname space, location-independent file sharing,client-side caching (with cache consistency),secure authentication (via Kerberos)– Also includes server-side caching (via replicas), highavailability– Can span 5,000 workstationsAFS (Cont.)• Clients are presented with a partitioned space of filenames: a local name space and a shared name space• Dedicated servers, called Vice, present the shared namespace to the clients as an homogeneous, identical, andlocation transparent file hierarchy• The local name space is the root file system of aworkstation, from which the shared name space descends• Workstations run the Virtue protocol to communicate withVice, and are required to have local disks where they storetheir local name spaceAFS (Cont.)• Local name space is small, distinct for


View Full Document

LSU CSC 4103 - Distributed Systems

Download Distributed Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Distributed Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Distributed Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?