SlideShare a Scribd company logo
1 of 29
Silberschatz, Galvin, and Gagne ©199917.1
Module 17: Distributed-File
Systems
• Background
• Naming and Transparency
• Remote File Access
• Stateful versus Stateless Service
• File Replication
• Example Systems
Silberschatz, Galvin, and Gagne ©199917.2
Background
• Distributed file system (DFS) – a distributed implementation of
the classical time-sharing model of a file system, where multiple
users share files and storage resources.
• A DFS manages set of dispersed storage devices
• Overall storage space managed by a DFS is composed of
different, remotely located, smaller storage spaces.
• There is usually a correspondence between constituent storage
spaces and sets of files.
Silberschatz, Galvin, and Gagne ©199917.3
DFS Structure
• Service – software entity running on one or more machines and
providing a particular type of function to a priori unknown
clients.
• Server – service software running on a single machine.
• Client – process that can invoke a service using a set of
operations that forms its client interface.
• A client interface for a file service is formed by a set of primitive
file operations (create, delete, read, write).
• Client interface of a DFS should be transparent, i.e., not
distinguish between local and remote files.
Silberschatz, Galvin, and Gagne ©199917.4
Naming and Transparency
• Naming – mapping between logical and physical objects.
• Multilevel mapping – abstraction of a file that hides the details
of how and where on the disk the file is actually stored.
• A transparent DFS hides the location where in the network the
file is stored.
• For a file being replicated in several sites, the mapping returns
a set of the locations of this file’s replicas; both the existence of
multiple copies and their location are hidden.
Silberschatz, Galvin, and Gagne ©199917.5
Naming Structures
• Location transparency – file name does not reveal the file’s
physical storage location.
– File name still denotes a specific, although hidden, set of
physical disk blocks.
– Convenient way to share data.
– Can expose correspondence between component units
and machines.
• Location independence – file name does not need to be
changed when the file’s physical storage location changes.
– Better file abstraction.
– Promotes sharing the storage space itself.
– Separates the naming hierarchy form the storage-devices
hierarchy.
Silberschatz, Galvin, and Gagne ©199917.6
Naming Schemes — Three Main
Approaches
• Files named by combination of their host name and local name;
guarantees a unique systemwide name.
• Attach remote directories to local directories, giving the
appearance of a coherent directory tree; only previously
mounted remote directories can be accessed transparently
• Total integration of the component file systems.
– A single global name structure spans all the files in the
system.
– If a server is unavailable, some arbitrary set of directories
on different machines also becomes unavailable. .
Silberschatz, Galvin, and Gagne ©199917.7
Remote File Access
• Reduce network traffic by retaining recently accessed disk
blocks in a cache, so that repeated accesses to the same
information can be handled locally..
– If needed data not already cached, a copy of data is
brought from the server to the user.
– Accesses are performed on the cached copy.
– Files identified with one master copy residing at the server
machine, but copies of (parts of) the file ar scattered in
different caches.
– Cache-consistency problem – keeping the cached copies
consistent with the master file.
Silberschatz, Galvin, and Gagne ©199917.8
Location – Disk Caches vs. Main Memory Cache
• Advantages of disk caches
– More reliable.
– Cached data kept on disk are still there during recovery
and don’t need to be fetched again.
• Advantages of main-memory caches:
– Permit workstations to be diskless.
– Data can be accessed more quickly.
– Performance speedup in bigger memories.
– Server caches (used to speed up disk I/O) are in main
memory regardless of where user caches are located;
using main-memory caches on the user machine permits
a single caching mechanism for servers and users.
Silberschatz, Galvin, and Gagne ©199917.9
Cache Update Policy
• Write-through – write data through to disk as soon as they are
placed on any cache. Reliable, but poor performance.
• Delayed-write – modifications written to the cache and then
written through to the server later. Write accesses complete
quickly; some data may be overwritten before they are written
back, and so need never be written at all.
– Poor reliability; unwritten data will be lost whenever a user
machine crashes.
– Variation – scan cache at regular intervals and flush
blocks that have been modified since the last scan.
– Variation – write-on-close, writes data back to the server
when the file is closed. Best for files that are open for long
periods and frequently modified.
Silberschatz, Galvin, and Gagne ©199917.10
Consistency
• Is locally cached copy of the data consistent with the master
copy?
• Client-initiated approach
– Client initiates a validity check.
– Server checks whether the local data are consistent 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.
Silberschatz, Galvin, and Gagne ©199917.11
Comparing Caching and Remote
Service
• In caching, many remote accesses handled efficiently by the
local cache; most remote accesses will be served as fast as
local ones.
• Servers are contracted only occasionally in caching (rather than
for each access).
– Reduces server load and network traffic.
– Enhances potential for scalability.
• Remote server method handles every remote access across
the network; penalty in network traffic, server load, and
performance.
• Total network overhead in transmitting big chunks of data
(caching) is lower than a series of responses to specific
requests (remote-service).
Silberschatz, Galvin, and Gagne ©199917.12
Caching and Remote Service
(Cont.)
• Caching is superior in access patterns with infrequent writes.
With frequent writes, substantial overhead incurred to
overcome cache-consistency problem.
• Benefit from caching when execution carried out on machines
with either local disks or large main memories.
• Remote access on diskless, small-memory-capacity machines
should be done through remote-service method.
• In caching, the lower intermachine interface is different form the
upper user interface.
• In remote-service, the intermachine interface mirrors the local
user-file-system interface.
Silberschatz, Galvin, and Gagne ©199917.13
Stateful 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 a connection
identifier unique to the client and the open file.
– Identifier is used for subsequent accesses until the
session ends.
– Server must reclaim the main-memory space used by
clients who are no longer active.
• Increased performance.
– Fewer disk accesses.
– Stateful server knows if a file was opened for sequential
access and can thus read ahead the next blocks.
Silberschatz, Galvin, and Gagne ©199917.14
Stateless File Server
• Avoids state information by making each request self-
contained.
• Each request identifies the file and position in the file.
• No need to establish and terminate a connection by open and
close operations.
Silberschatz, Galvin, and Gagne ©199917.15
Distinctions Between Stateful & Stateless
Service
• Failure Recovery.
– A stateful server loses all its volatile state in a crash.
Restore state by recovery protocol based on a dialog
with clients, or abort operations that were underway
when the crash occurred.
Server needs to be aware of client failures in order to
reclaim space allocated to record the state of crashed
client processes (orphan detection and elimination).
– With stateless server, the effects of server failure sand
recovery are almost unnoticeable. A newly reincarnated
server can respond to a self-contained request without
any difficulty.
Silberschatz, Galvin, and Gagne ©199917.16
Distinctions (Cont.)
• Penalties for using the robust stateless service:
– longer request messages
– slower request processing
– additional constraints imposed on DFS design
• Some environments require stateful service.
– A server employing server-initiated cache validation
cannot provide stateless service, since it maintains a
record of which files are cached by which clients.
– UNIX use of file descriptors and implicit offsets is
inherently stateful; servers must maintain tables to map
the file descriptors to inodes, and store the current offset
within a file.
Silberschatz, Galvin, and Gagne ©199917.17
File Replication
• Replicas of the same file reside on failure-independent
machines.
• Improves availability and can shorten service time.
• Naming scheme maps a replicated file name to a particular
replica.
– Existence of replicas should be invisible to higher levels.
– Replicas must be distinguished from one another by
different lower-level names.
• Updates – replicas of a file denote the same logical entity, and
thus an update to any replica must be reflected on all other
replicas.
• Demand replication – reading a nonlocal replica causes it to be
cached locally, thereby generating a new nonprimary replica.
Silberschatz, Galvin, and Gagne ©199917.18
The Sun Network File System (NFS)
• An implementation and a specification of a software system for
accessing remote files across LANs (or WANs).
• The implementation is part of the SunOS operating system
(version of 4.2BSD UNIX), running on a Sun workstation using
an unreliable datagram protocol (UDP/IP protocol and Ethernet.
Silberschatz, Galvin, and Gagne ©199917.19
NFS (Cont.)
• Interconnected workstations viewed as a set of independent
machines with independent file systems, which allows sharing
among these file systems in a transparent manner.
– A remote directory is mounted over a local file system
directory. The mounted directory looks like an integral
subtree of the local file system, replacing the subtree
descending from the local directory.
– Specification of the remote directory for the mount
operation is nontransparent; the host name of the remote
directory has to be provided. Files in the remote directory
can then be accessed in a transparent manner.
– Subject to access-rights accreditation, potentially any file
system (or directory within a file system), can be mounted
remotely on top of any local directory.
Silberschatz, Galvin, and Gagne ©199917.20
NFS (Cont.)
• NFS is designed to operate in a heterogeneous environment of
different machines, operating systems, and network
architectures; the NFS specifications independent of these
media.
• This independence is achieved through the use of RPC
primitives built on top of an External Data Representation
(XDR) protocol used between two implementation-independent
interfaces.
• The NFS specification distinguishes between the services
provided by a mount mechanism and the actual remote-file-
access services.
Silberschatz, Galvin, and Gagne ©199917.21
Three Independent File Systems
Silberschatz, Galvin, and Gagne ©199917.22
NFS Mount Protocol
• Establishes initial logical connection between server and
client.
• Mount operation includes name of remote directory to be
mounted and name of server machine storing it.
– Mount request is mapped to corresponding RPC and
forwarded to mount server running on server machine.
– Export list – specifies local file systems that server
exports for mounting, along with names of machines that
are permitted to mount them.
• Following a mount request that conforms to its export list, the
server returns a file handle—a key for further accesses.
• File handle – a file-system identifier, and an inode number to
identify the mounted directory within the exported file system.
• The mount operation changes only the user’s view and does
not affect the server side.
Silberschatz, Galvin, and Gagne ©199917.23
Mounting in NFS
Mounts Cascading mounts
Silberschatz, Galvin, and Gagne ©199917.24
NFS Protocol
• Provides a set of remote procedure calls for remote file
operations. The procedures support the following operations:
– searching for a file within a directory
– reading a set of directory entries
– manipulating links and directories
– accessing file attributes
– reading and writing files
• NFS servers are stateless; each request has to provide a full
set of arguments.
• Modified data must be committed to the server’s disk before
results are returned to the client (lose advantages fo caching).
• The NFS protocol does not provide concurrency-control
mechanisms.
Silberschatz, Galvin, and Gagne ©199917.25
Three Major Layers of NFS
Architecture
• UNIX file-system interface (based on the open, read, write, and
close calls, and file descriptors).
• Virtual File System (VFS) layer – distinguishes local files from
remote ones, and local files are further distinguished according
to their file-system types.
– The VFS activates file-system-specific operations to
handle local requests according to their file-system types.
– Calls the NFS protocol procedures for remote requests.
• NFS service layer – bottom layer of the architecture;
implements the NFS protocol.
Silberschatz, Galvin, and Gagne ©199917.26
Schematic View of NFS Architecture
Silberschatz, Galvin, and Gagne ©199917.27
NFS Path-Name Translation
• Performed by breaking the path into component names and
performing a separate NFS lookup call for every pair of
component name and directory vnode.
• To make lookup faster, a directory name lookup cache on the
client’s side holds the vnodes for remote directory names.
Silberschatz, Galvin, and Gagne ©199917.28
Path-name Translation
Silberschatz, Galvin, and Gagne ©199917.29
NFS Remote Operations
• Nearly one-to-one correspondence between regular UNIX
system calls and the NFS protocol RPCs (except opening and
closing files).
• NFS adheres to the remote-service paradigm, but employs
buffering and caching techniques for the sake of performance.
• File-blocks cache – when a file is opened, the kernel checks
with the remote server whether to fetch or revalidate the
cached attributes. Cached file blocks are used only if the
corresponding cached attributes are up to date.
• File-attribute cache – the attribute cache is updated whenever
new attributes arrive from the server.
• Clients do not free delayed-write blocks until the server
confirms that the data have been written to disk.

More Related Content

What's hot

12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advancedDigicomp Academy AG
 
IBM Spectrum Scale Networking Flow
IBM Spectrum Scale Networking FlowIBM Spectrum Scale Networking Flow
IBM Spectrum Scale Networking FlowSandeep Patil
 
Dustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveDustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveGluster.org
 
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...DataWorks Summit
 
IBM SONAS and the Cloud Storage Taxonomy
IBM SONAS and the Cloud Storage TaxonomyIBM SONAS and the Cloud Storage Taxonomy
IBM SONAS and the Cloud Storage TaxonomyTony Pearson
 
Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5
Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5
Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5Doug O'Flaherty
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGlusterFS
 
HDFS Futures: NameNode Federation for Improved Efficiency and Scalability
HDFS Futures: NameNode Federation for Improved Efficiency and ScalabilityHDFS Futures: NameNode Federation for Improved Efficiency and Scalability
HDFS Futures: NameNode Federation for Improved Efficiency and ScalabilityHortonworks
 
12 cool features in defrag 12
12 cool features in defrag 1212 cool features in defrag 12
12 cool features in defrag 12aosborne
 
Gluster Storage
Gluster StorageGluster Storage
Gluster StorageRaz Tamir
 
Cloud Storage Adoption, Practice, and Deployment
Cloud Storage Adoption, Practice, and DeploymentCloud Storage Adoption, Practice, and Deployment
Cloud Storage Adoption, Practice, and DeploymentGlusterFS
 
Domino Server Health - Monitoring and Managing
 Domino Server Health - Monitoring and Managing Domino Server Health - Monitoring and Managing
Domino Server Health - Monitoring and ManagingGabriella Davis
 
Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...
Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...
Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...Tommy Lee
 
Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...
Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...
Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...xKinAnx
 
Spectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf WeiserSpectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf WeiserSandeep Patil
 
Revisiting CephFS MDS and mClock QoS Scheduler
Revisiting CephFS MDS and mClock QoS SchedulerRevisiting CephFS MDS and mClock QoS Scheduler
Revisiting CephFS MDS and mClock QoS SchedulerYongseok Oh
 
Dfs (Distributed computing)
Dfs (Distributed computing)Dfs (Distributed computing)
Dfs (Distributed computing)Sri Prasanna
 
Personal storage to enterprise storage system journey
Personal storage to enterprise storage system journeyPersonal storage to enterprise storage system journey
Personal storage to enterprise storage system journeySoumen Sarkar
 

What's hot (19)

12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced
 
IBM Spectrum Scale Networking Flow
IBM Spectrum Scale Networking FlowIBM Spectrum Scale Networking Flow
IBM Spectrum Scale Networking Flow
 
Dustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveDustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep Dive
 
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
NonStop Hadoop - Applying the PaxosFamily of Protocols to make Critical Hadoo...
 
IBM SONAS and the Cloud Storage Taxonomy
IBM SONAS and the Cloud Storage TaxonomyIBM SONAS and the Cloud Storage Taxonomy
IBM SONAS and the Cloud Storage Taxonomy
 
110629 nexenta- andy bennett
110629   nexenta- andy bennett110629   nexenta- andy bennett
110629 nexenta- andy bennett
 
Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5
Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5
Introducing IBM Spectrum Scale 4.2 and Elastic Storage Server 3.5
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & Tricks
 
HDFS Futures: NameNode Federation for Improved Efficiency and Scalability
HDFS Futures: NameNode Federation for Improved Efficiency and ScalabilityHDFS Futures: NameNode Federation for Improved Efficiency and Scalability
HDFS Futures: NameNode Federation for Improved Efficiency and Scalability
 
12 cool features in defrag 12
12 cool features in defrag 1212 cool features in defrag 12
12 cool features in defrag 12
 
Gluster Storage
Gluster StorageGluster Storage
Gluster Storage
 
Cloud Storage Adoption, Practice, and Deployment
Cloud Storage Adoption, Practice, and DeploymentCloud Storage Adoption, Practice, and Deployment
Cloud Storage Adoption, Practice, and Deployment
 
Domino Server Health - Monitoring and Managing
 Domino Server Health - Monitoring and Managing Domino Server Health - Monitoring and Managing
Domino Server Health - Monitoring and Managing
 
Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...
Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...
Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...
 
Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...
Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...
Ibm spectrum scale fundamentals workshop for americas part 2 IBM Spectrum Sca...
 
Spectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf WeiserSpectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf Weiser
 
Revisiting CephFS MDS and mClock QoS Scheduler
Revisiting CephFS MDS and mClock QoS SchedulerRevisiting CephFS MDS and mClock QoS Scheduler
Revisiting CephFS MDS and mClock QoS Scheduler
 
Dfs (Distributed computing)
Dfs (Distributed computing)Dfs (Distributed computing)
Dfs (Distributed computing)
 
Personal storage to enterprise storage system journey
Personal storage to enterprise storage system journeyPersonal storage to enterprise storage system journey
Personal storage to enterprise storage system journey
 

Viewers also liked

Built Environment & Programming
Built Environment & ProgrammingBuilt Environment & Programming
Built Environment & ProgrammingClevelandCoalition
 
Russian Answer To Sherlock Holmes
Russian Answer To Sherlock HolmesRussian Answer To Sherlock Holmes
Russian Answer To Sherlock HolmesLily Lake
 
Cmmaao timesheet-totals-pmi-pmp
Cmmaao timesheet-totals-pmi-pmpCmmaao timesheet-totals-pmi-pmp
Cmmaao timesheet-totals-pmi-pmpcmmaao
 
AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...
AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...
AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...Wolfgang Stolle
 
Komp Podhod
Komp PodhodKomp Podhod
Komp Podhodmazaeva
 
Bravery#2
Bravery#2Bravery#2
Bravery#2Shiro28
 
Dictaphone Patent 4,800,5820
Dictaphone Patent 4,800,5820Dictaphone Patent 4,800,5820
Dictaphone Patent 4,800,5820Steven Smith
 
ประกาศผลสอบพนักงานจ้างลงเวป
ประกาศผลสอบพนักงานจ้างลงเวปประกาศผลสอบพนักงานจ้างลงเวป
ประกาศผลสอบพนักงานจ้างลงเวปSao Tadindam
 
How To Search For Deceased Family Members In Obituaries
How To Search For Deceased Family Members In ObituariesHow To Search For Deceased Family Members In Obituaries
How To Search For Deceased Family Members In ObituariesGenealogyBank
 
Judith gentry communication dilemmas
Judith gentry communication dilemmasJudith gentry communication dilemmas
Judith gentry communication dilemmasMieke Haveman
 
What’s been going on in the media center
What’s been going on in the media centerWhat’s been going on in the media center
What’s been going on in the media centergcleveland
 
Business standard article_25_july_2011
Business standard article_25_july_2011Business standard article_25_july_2011
Business standard article_25_july_2011saurabhsoni46
 
Примеры проектов по брендингу. Предметный промоушен
Примеры проектов по брендингу. Предметный промоушенПримеры проектов по брендингу. Предметный промоушен
Примеры проектов по брендингу. Предметный промоушенMellon Sports Communications School
 
Zona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETE
Zona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETEZona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETE
Zona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETEbibiurka
 
Vuca outsourcing-v2-050413
Vuca outsourcing-v2-050413Vuca outsourcing-v2-050413
Vuca outsourcing-v2-050413Bryan Jacobs
 

Viewers also liked (18)

Built Environment & Programming
Built Environment & ProgrammingBuilt Environment & Programming
Built Environment & Programming
 
Human
HumanHuman
Human
 
Russian Answer To Sherlock Holmes
Russian Answer To Sherlock HolmesRussian Answer To Sherlock Holmes
Russian Answer To Sherlock Holmes
 
Cmmaao timesheet-totals-pmi-pmp
Cmmaao timesheet-totals-pmi-pmpCmmaao timesheet-totals-pmi-pmp
Cmmaao timesheet-totals-pmi-pmp
 
AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...
AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...
AQUABELL Mediterranean Fly, 1986, £39,950 For Sale Brochure. Presented By yac...
 
Bharat
BharatBharat
Bharat
 
Komp Podhod
Komp PodhodKomp Podhod
Komp Podhod
 
Bravery#2
Bravery#2Bravery#2
Bravery#2
 
Dictaphone Patent 4,800,5820
Dictaphone Patent 4,800,5820Dictaphone Patent 4,800,5820
Dictaphone Patent 4,800,5820
 
ประกาศผลสอบพนักงานจ้างลงเวป
ประกาศผลสอบพนักงานจ้างลงเวปประกาศผลสอบพนักงานจ้างลงเวป
ประกาศผลสอบพนักงานจ้างลงเวป
 
How To Search For Deceased Family Members In Obituaries
How To Search For Deceased Family Members In ObituariesHow To Search For Deceased Family Members In Obituaries
How To Search For Deceased Family Members In Obituaries
 
Judith gentry communication dilemmas
Judith gentry communication dilemmasJudith gentry communication dilemmas
Judith gentry communication dilemmas
 
What’s been going on in the media center
What’s been going on in the media centerWhat’s been going on in the media center
What’s been going on in the media center
 
Business standard article_25_july_2011
Business standard article_25_july_2011Business standard article_25_july_2011
Business standard article_25_july_2011
 
Примеры проектов по брендингу. Предметный промоушен
Примеры проектов по брендингу. Предметный промоушенПримеры проектов по брендингу. Предметный промоушен
Примеры проектов по брендингу. Предметный промоушен
 
2010
20102010
2010
 
Zona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETE
Zona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETEZona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETE
Zona Network: GUADAGNA UN FISSO ONLINE,SENZA OBBLIGO DI RETE
 
Vuca outsourcing-v2-050413
Vuca outsourcing-v2-050413Vuca outsourcing-v2-050413
Vuca outsourcing-v2-050413
 

Similar to 운영체제론 Ch17

Similar to 운영체제론 Ch17 (20)

Chapter-5-DFS.ppt
Chapter-5-DFS.pptChapter-5-DFS.ppt
Chapter-5-DFS.ppt
 
11. dfs
11. dfs11. dfs
11. dfs
 
File service architecture and network file system
File service architecture and network file systemFile service architecture and network file system
File service architecture and network file system
 
Ch16 OS
Ch16 OSCh16 OS
Ch16 OS
 
OS_Ch16
OS_Ch16OS_Ch16
OS_Ch16
 
OSCh16
OSCh16OSCh16
OSCh16
 
12. dfs
12. dfs12. dfs
12. dfs
 
Chapter 17 - Distributed File Systems
Chapter 17 - Distributed File SystemsChapter 17 - Distributed File Systems
Chapter 17 - Distributed File Systems
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Nfs
NfsNfs
Nfs
 
5.distributed file systems
5.distributed file systems5.distributed file systems
5.distributed file systems
 
DFS PPT.pptx
DFS PPT.pptxDFS PPT.pptx
DFS PPT.pptx
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Hadoop availability
Hadoop availabilityHadoop availability
Hadoop availability
 
Ibm spectrum scale fundamentals workshop for americas part 4 Replication, Str...
Ibm spectrum scale fundamentals workshop for americas part 4 Replication, Str...Ibm spectrum scale fundamentals workshop for americas part 4 Replication, Str...
Ibm spectrum scale fundamentals workshop for americas part 4 Replication, Str...
 
Distributed file systems (from Google)
Distributed file systems (from Google)Distributed file systems (from Google)
Distributed file systems (from Google)
 
Advanced Storage Area Network
Advanced Storage Area NetworkAdvanced Storage Area Network
Advanced Storage Area Network
 
Dfs
DfsDfs
Dfs
 
Distributed file systems dfs
Distributed file systems   dfsDistributed file systems   dfs
Distributed file systems dfs
 

More from Jongmyoung Kim

iTunes media server for ubuntu
iTunes media server for ubuntuiTunes media server for ubuntu
iTunes media server for ubuntuJongmyoung Kim
 
Open source for upload
Open source for uploadOpen source for upload
Open source for uploadJongmyoung Kim
 
취업캠프 특강 - 기업의 서비스 개발 프로젝트
취업캠프 특강 - 기업의 서비스 개발 프로젝트취업캠프 특강 - 기업의 서비스 개발 프로젝트
취업캠프 특강 - 기업의 서비스 개발 프로젝트Jongmyoung Kim
 
TTS System을 이용한 교육용 소프트웨어 개발
TTS System을 이용한 교육용 소프트웨어 개발TTS System을 이용한 교육용 소프트웨어 개발
TTS System을 이용한 교육용 소프트웨어 개발Jongmyoung Kim
 
운영체제론 - Ch09
운영체제론 - Ch09운영체제론 - Ch09
운영체제론 - Ch09Jongmyoung Kim
 
Web app service project
Web app service projectWeb app service project
Web app service projectJongmyoung Kim
 

More from Jongmyoung Kim (20)

REST
RESTREST
REST
 
iTunes media server for ubuntu
iTunes media server for ubuntuiTunes media server for ubuntu
iTunes media server for ubuntu
 
Open source for upload
Open source for uploadOpen source for upload
Open source for upload
 
취업캠프 특강 - 기업의 서비스 개발 프로젝트
취업캠프 특강 - 기업의 서비스 개발 프로젝트취업캠프 특강 - 기업의 서비스 개발 프로젝트
취업캠프 특강 - 기업의 서비스 개발 프로젝트
 
TTS System을 이용한 교육용 소프트웨어 개발
TTS System을 이용한 교육용 소프트웨어 개발TTS System을 이용한 교육용 소프트웨어 개발
TTS System을 이용한 교육용 소프트웨어 개발
 
운영체제론 Ch19
운영체제론 Ch19운영체제론 Ch19
운영체제론 Ch19
 
운영체제론 Ch21
운영체제론 Ch21운영체제론 Ch21
운영체제론 Ch21
 
운영체제론 Ch18
운영체제론 Ch18운영체제론 Ch18
운영체제론 Ch18
 
운영체제론 Ch20
운영체제론 Ch20운영체제론 Ch20
운영체제론 Ch20
 
운영체제론 Ch14
운영체제론 Ch14운영체제론 Ch14
운영체제론 Ch14
 
운영체제론 Ch13
운영체제론 Ch13운영체제론 Ch13
운영체제론 Ch13
 
운영체제론 Ch16
운영체제론 Ch16운영체제론 Ch16
운영체제론 Ch16
 
운영체제론 Ch12
운영체제론 Ch12운영체제론 Ch12
운영체제론 Ch12
 
운영체제론 Ch11
운영체제론 Ch11운영체제론 Ch11
운영체제론 Ch11
 
운영체제론 Ch10
운영체제론 Ch10운영체제론 Ch10
운영체제론 Ch10
 
운영체제론 Ch22
운영체제론 Ch22운영체제론 Ch22
운영체제론 Ch22
 
운영체제론 - Ch09
운영체제론 - Ch09운영체제론 - Ch09
운영체제론 - Ch09
 
Web app service project
Web app service projectWeb app service project
Web app service project
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Bigdata
BigdataBigdata
Bigdata
 

Recently uploaded

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

운영체제론 Ch17

  • 1. Silberschatz, Galvin, and Gagne ©199917.1 Module 17: Distributed-File Systems • Background • Naming and Transparency • Remote File Access • Stateful versus Stateless Service • File Replication • Example Systems
  • 2. Silberschatz, Galvin, and Gagne ©199917.2 Background • Distributed file system (DFS) – a distributed implementation of the classical time-sharing model of a file system, where multiple users share files and storage resources. • A DFS manages set of dispersed storage devices • Overall storage space managed by a DFS is composed of different, remotely located, smaller storage spaces. • There is usually a correspondence between constituent storage spaces and sets of files.
  • 3. Silberschatz, Galvin, and Gagne ©199917.3 DFS Structure • Service – software entity running on one or more machines and providing a particular type of function to a priori unknown clients. • Server – service software running on a single machine. • Client – process that can invoke a service using a set of operations that forms its client interface. • A client interface for a file service is formed by a set of primitive file operations (create, delete, read, write). • Client interface of a DFS should be transparent, i.e., not distinguish between local and remote files.
  • 4. Silberschatz, Galvin, and Gagne ©199917.4 Naming and Transparency • Naming – mapping between logical and physical objects. • Multilevel mapping – abstraction of a file that hides the details of how and where on the disk the file is actually stored. • A transparent DFS hides the location where in the network the file is stored. • For a file being replicated in several sites, the mapping returns a set of the locations of this file’s replicas; both the existence of multiple copies and their location are hidden.
  • 5. Silberschatz, Galvin, and Gagne ©199917.5 Naming Structures • Location transparency – file name does not reveal the file’s physical storage location. – File name still denotes a specific, although hidden, set of physical disk blocks. – Convenient way to share data. – Can expose correspondence between component units and machines. • Location independence – file name does not need to be changed when the file’s physical storage location changes. – Better file abstraction. – Promotes sharing the storage space itself. – Separates the naming hierarchy form the storage-devices hierarchy.
  • 6. Silberschatz, Galvin, and Gagne ©199917.6 Naming Schemes — Three Main Approaches • Files named by combination of their host name and local name; guarantees a unique systemwide name. • Attach remote directories to local directories, giving the appearance of a coherent directory tree; only previously mounted remote directories can be accessed transparently • Total integration of the component file systems. – A single global name structure spans all the files in the system. – If a server is unavailable, some arbitrary set of directories on different machines also becomes unavailable. .
  • 7. Silberschatz, Galvin, and Gagne ©199917.7 Remote File Access • Reduce network traffic by retaining recently accessed disk blocks in a cache, so that repeated accesses to the same information can be handled locally.. – If needed data not already cached, a copy of data is brought from the server to the user. – Accesses are performed on the cached copy. – Files identified with one master copy residing at the server machine, but copies of (parts of) the file ar scattered in different caches. – Cache-consistency problem – keeping the cached copies consistent with the master file.
  • 8. Silberschatz, Galvin, and Gagne ©199917.8 Location – Disk Caches vs. Main Memory Cache • Advantages of disk caches – More reliable. – Cached data kept on disk are still there during recovery and don’t need to be fetched again. • Advantages of main-memory caches: – Permit workstations to be diskless. – Data can be accessed more quickly. – Performance speedup in bigger memories. – Server caches (used to speed up disk I/O) are in main memory regardless of where user caches are located; using main-memory caches on the user machine permits a single caching mechanism for servers and users.
  • 9. Silberschatz, Galvin, and Gagne ©199917.9 Cache Update Policy • Write-through – write data through to disk as soon as they are placed on any cache. Reliable, but poor performance. • Delayed-write – modifications written to the cache and then written through to the server later. Write accesses complete quickly; some data may be overwritten before they are written back, and so need never be written at all. – Poor reliability; unwritten data will be lost whenever a user machine crashes. – Variation – scan cache at regular intervals and flush blocks that have been modified since the last scan. – Variation – write-on-close, writes data back to the server when the file is closed. Best for files that are open for long periods and frequently modified.
  • 10. Silberschatz, Galvin, and Gagne ©199917.10 Consistency • Is locally cached copy of the data consistent with the master copy? • Client-initiated approach – Client initiates a validity check. – Server checks whether the local data are consistent 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.
  • 11. Silberschatz, Galvin, and Gagne ©199917.11 Comparing Caching and Remote Service • In caching, many remote accesses handled efficiently by the local cache; most remote accesses will be served as fast as local ones. • Servers are contracted only occasionally in caching (rather than for each access). – Reduces server load and network traffic. – Enhances potential for scalability. • Remote server method handles every remote access across the network; penalty in network traffic, server load, and performance. • Total network overhead in transmitting big chunks of data (caching) is lower than a series of responses to specific requests (remote-service).
  • 12. Silberschatz, Galvin, and Gagne ©199917.12 Caching and Remote Service (Cont.) • Caching is superior in access patterns with infrequent writes. With frequent writes, substantial overhead incurred to overcome cache-consistency problem. • Benefit from caching when execution carried out on machines with either local disks or large main memories. • Remote access on diskless, small-memory-capacity machines should be done through remote-service method. • In caching, the lower intermachine interface is different form the upper user interface. • In remote-service, the intermachine interface mirrors the local user-file-system interface.
  • 13. Silberschatz, Galvin, and Gagne ©199917.13 Stateful 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 a connection identifier unique to the client and the open file. – Identifier is used for subsequent accesses until the session ends. – Server must reclaim the main-memory space used by clients who are no longer active. • Increased performance. – Fewer disk accesses. – Stateful server knows if a file was opened for sequential access and can thus read ahead the next blocks.
  • 14. Silberschatz, Galvin, and Gagne ©199917.14 Stateless File Server • Avoids state information by making each request self- contained. • Each request identifies the file and position in the file. • No need to establish and terminate a connection by open and close operations.
  • 15. Silberschatz, Galvin, and Gagne ©199917.15 Distinctions Between Stateful & Stateless Service • Failure Recovery. – A stateful server loses all its volatile state in a crash. Restore state by recovery protocol based on a dialog with clients, or abort operations that were underway when the crash occurred. Server needs to be aware of client failures in order to reclaim space allocated to record the state of crashed client processes (orphan detection and elimination). – With stateless server, the effects of server failure sand recovery are almost unnoticeable. A newly reincarnated server can respond to a self-contained request without any difficulty.
  • 16. Silberschatz, Galvin, and Gagne ©199917.16 Distinctions (Cont.) • Penalties for using the robust stateless service: – longer request messages – slower request processing – additional constraints imposed on DFS design • Some environments require stateful service. – A server employing server-initiated cache validation cannot provide stateless service, since it maintains a record of which files are cached by which clients. – UNIX use of file descriptors and implicit offsets is inherently stateful; servers must maintain tables to map the file descriptors to inodes, and store the current offset within a file.
  • 17. Silberschatz, Galvin, and Gagne ©199917.17 File Replication • Replicas of the same file reside on failure-independent machines. • Improves availability and can shorten service time. • Naming scheme maps a replicated file name to a particular replica. – Existence of replicas should be invisible to higher levels. – Replicas must be distinguished from one another by different lower-level names. • Updates – replicas of a file denote the same logical entity, and thus an update to any replica must be reflected on all other replicas. • Demand replication – reading a nonlocal replica causes it to be cached locally, thereby generating a new nonprimary replica.
  • 18. Silberschatz, Galvin, and Gagne ©199917.18 The Sun Network File System (NFS) • An implementation and a specification of a software system for accessing remote files across LANs (or WANs). • The implementation is part of the SunOS operating system (version of 4.2BSD UNIX), running on a Sun workstation using an unreliable datagram protocol (UDP/IP protocol and Ethernet.
  • 19. Silberschatz, Galvin, and Gagne ©199917.19 NFS (Cont.) • Interconnected workstations viewed as a set of independent machines with independent file systems, which allows sharing among these file systems in a transparent manner. – A remote directory is mounted over a local file system directory. The mounted directory looks like an integral subtree of the local file system, replacing the subtree descending from the local directory. – Specification of the remote directory for the mount operation is nontransparent; the host name of the remote directory has to be provided. Files in the remote directory can then be accessed in a transparent manner. – Subject to access-rights accreditation, potentially any file system (or directory within a file system), can be mounted remotely on top of any local directory.
  • 20. Silberschatz, Galvin, and Gagne ©199917.20 NFS (Cont.) • NFS is designed to operate in a heterogeneous environment of different machines, operating systems, and network architectures; the NFS specifications independent of these media. • This independence is achieved through the use of RPC primitives built on top of an External Data Representation (XDR) protocol used between two implementation-independent interfaces. • The NFS specification distinguishes between the services provided by a mount mechanism and the actual remote-file- access services.
  • 21. Silberschatz, Galvin, and Gagne ©199917.21 Three Independent File Systems
  • 22. Silberschatz, Galvin, and Gagne ©199917.22 NFS Mount Protocol • Establishes initial logical connection between server and client. • Mount operation includes name of remote directory to be mounted and name of server machine storing it. – Mount request is mapped to corresponding RPC and forwarded to mount server running on server machine. – Export list – specifies local file systems that server exports for mounting, along with names of machines that are permitted to mount them. • Following a mount request that conforms to its export list, the server returns a file handle—a key for further accesses. • File handle – a file-system identifier, and an inode number to identify the mounted directory within the exported file system. • The mount operation changes only the user’s view and does not affect the server side.
  • 23. Silberschatz, Galvin, and Gagne ©199917.23 Mounting in NFS Mounts Cascading mounts
  • 24. Silberschatz, Galvin, and Gagne ©199917.24 NFS Protocol • Provides a set of remote procedure calls for remote file operations. The procedures support the following operations: – searching for a file within a directory – reading a set of directory entries – manipulating links and directories – accessing file attributes – reading and writing files • NFS servers are stateless; each request has to provide a full set of arguments. • Modified data must be committed to the server’s disk before results are returned to the client (lose advantages fo caching). • The NFS protocol does not provide concurrency-control mechanisms.
  • 25. Silberschatz, Galvin, and Gagne ©199917.25 Three Major Layers of NFS Architecture • UNIX file-system interface (based on the open, read, write, and close calls, and file descriptors). • Virtual File System (VFS) layer – distinguishes local files from remote ones, and local files are further distinguished according to their file-system types. – The VFS activates file-system-specific operations to handle local requests according to their file-system types. – Calls the NFS protocol procedures for remote requests. • NFS service layer – bottom layer of the architecture; implements the NFS protocol.
  • 26. Silberschatz, Galvin, and Gagne ©199917.26 Schematic View of NFS Architecture
  • 27. Silberschatz, Galvin, and Gagne ©199917.27 NFS Path-Name Translation • Performed by breaking the path into component names and performing a separate NFS lookup call for every pair of component name and directory vnode. • To make lookup faster, a directory name lookup cache on the client’s side holds the vnodes for remote directory names.
  • 28. Silberschatz, Galvin, and Gagne ©199917.28 Path-name Translation
  • 29. Silberschatz, Galvin, and Gagne ©199917.29 NFS Remote Operations • Nearly one-to-one correspondence between regular UNIX system calls and the NFS protocol RPCs (except opening and closing files). • NFS adheres to the remote-service paradigm, but employs buffering and caching techniques for the sake of performance. • File-blocks cache – when a file is opened, the kernel checks with the remote server whether to fetch or revalidate the cached attributes. Cached file blocks are used only if the corresponding cached attributes are up to date. • File-attribute cache – the attribute cache is updated whenever new attributes arrive from the server. • Clients do not free delayed-write blocks until the server confirms that the data have been written to disk.