OS-Chap-17 Distributed-Systems
OS-Chap-17 Distributed-Systems
Distributed Systems
Operating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013
Chapter 17: Distributed Systems
Operating System Concepts – 9th Edition 17.2 Silberschatz, Galvin and Gagne ©2013
Chapter Objectives
Operating System Concepts – 9th Edition 17.3 Silberschatz, Galvin and Gagne ©2013
Overview
n Distributed system is a collection of loosely coupled processors
interconnected by a communications network.
n Processors variously called nodes, computers, machines, hosts.
l Site is the location of the processor.
l Generally, a server has a resource a client node at a different site
wants to use.
Operating System Concepts – 9th Edition 17.5 Silberschatz, Galvin and Gagne ©2013
Types of Distributed Operating Systems
Operating System Concepts – 9th Edition 17.6 Silberschatz, Galvin and Gagne ©2013
Network-Operating Systems
n Users are aware of the multiplicity of machines.
n Access to resources of various machines is done explicitly by:
l Remote logging into the appropriate remote machine (telnet, ssh).
l Remote Desktop (Microsoft Windows).
l Transferring data from remote machines to local machines via the File
Transfer Protocol (FTP) mechanism.
n Users must change paradigms – establish a session, give network-based
commands.
l More difficult for users.
Operating System Concepts – 9th Edition 17.7 Silberschatz, Galvin and Gagne ©2013
Distributed-Operating Systems
Data Migration: when you have the same operation to be executed on large
amount of data (e.g., arrays). Then, each node gets part of the data and
execute the operation.
Operating System Concepts – 9th Edition 17.8 Silberschatz, Galvin and Gagne ©2013
Distributed-Operating Systems (Cont.)
n Process Migration – execute an entire process, or parts of it, at different
sites:
l Load balancing – distribute processes across the network to even the
workload.
l Computation speedup – subprocesses can run concurrently on
different sites.
l Hardware preference – process execution may require specialized
processor.
l Software preference – required software may be available at only a
particular site.
l Data access – run process remotely rather than transfer all data locally
n Consider the World Wide Web.
Process Migration: Simply several tasks (Processes). So, why execute
all of them in one local node. Each node gets a process and execute.
Operating System Concepts – 9th Edition 17.10 Silberschatz, Galvin and Gagne ©2013
DFS Structure
Operating System Concepts – 9th Edition 17.11 Silberschatz, Galvin and Gagne ©2013
Naming and Transparency
n Naming – mapping between logical and physical objects.
n Multilevel mapping – abstraction of a file that hides the details of how and
where on the disk the file is actually stored.
n A Transparent DFS hides the location where in the network the file is stored.
n 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.
Multilevel mapping in DFS: user access a file by its name, then file
name is mapped to a numerical identifier on server, then the identifier is
mapped to actual disk blocks where the file is stored.
The only thing user aware of is the simple file name, the rest of details are
abstract (hidden) in the DFS implementation.
Transparency in DFS:
- Access Transparency: User access remote file the same way as local file.
- Location Transparency: User access remote file without being aware of
its location.
Operating System Concepts – 9th Edition 17.12 Silberschatz, Galvin and Gagne ©2013
Naming Structures
n Location transparency – file name does not reveal the file’s physical
storage location.
n Location independence – file name does not need to be changed
when the file’s physical storage location changes.
Operating System Concepts – 9th Edition 17.13 Silberschatz, Galvin and Gagne ©2013
Naming Schemes — Three Main Approaches
Operating System Concepts – 9th Edition 17.14 Silberschatz, Galvin and Gagne ©2013
Remote File Access
Operating System Concepts – 9th Edition 17.15 Silberschatz, Galvin and Gagne ©2013
Cache Location – Disk vs. Main Memory
Operating System Concepts – 9th Edition 17.16 Silberschatz, Galvin and Gagne ©2013
Cache Update Policy
Server has master copy and client has a cached copy. If the cached copy at client is changed,
then we need to write it back to server master copy so that they remain consistent? What are
the ways to do that?
n Write-through – write data through to disk as soon as they are placed on any
cache:
l Reliable, but poor performance.
n Delayed-write (write-back) – modifications written to the cache and then written
through to the server later:
l Write accesses complete quickly; some data may be overwritten before they are
written back, and so need never be written at all.
l Poor reliability; unwritten data will be lost whenever a user machine crashes.
l Variation – scan cache at regular intervals and flush blocks that have been modified
since the last scan.
l 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.
Write-through: As soon as a cached copy is changed, send changes to server
master copy immediately.
n Is the locally cached copy of the data consistent with the master copy?
n Client-initiated approach:
l Client initiates a validity check.
l Server checks whether the local data are consistent with the master copy.
n Server-initiated approach:
l Server records, for each client, the (parts of) files it caches.
l When the server detects a potential inconsistency, it must react.
Operating System Concepts – 9th Edition 17.18 Silberschatz, Galvin and Gagne ©2013
End of Chapter 17
Operating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013