Distributed Operating Systems Andy Wang COP 5611 Advanced
Distributed Operating Systems Andy Wang COP 5611 Advanced Operating Systems
Outline n n Introductory material Distributed IPC Distributed file systems Security for distributed systems
Outline of Introductory Materials n n n Why distributed OSes? Important issues in distributed OSes Important distributed OS tools and mechanisms
Why Bother? n n Economics of hardware Resource sharing Effective use of networks Reliability
Economics of Hardware n n Cheaper to build many small machines than one large one Due to n n Economics of scale Chip design and fabrication issues n n E. g. , clock, power, heat Gives purchasers easy options to increase computer power
Resource Sharing n n Users need to share resources Hardware resources n n CPU, memory, storage, printers Software resources n n Data Access to software services
Network Usage n Users often want to communicate n n With other local users And to make data available to world System needs to support user interactions Generally demands cooperation among machines
Reliability n n n Failure of a single machine no longer halts everyone Graceful degradation of the overall system’s resources Can apply fault tolerance for tasks at a high architectural level
Problems with Distributed Systems n n n n More complex Harder to achieve correctness Harder to allocate resources properly Security Dealing with partial failures Scaling issues Heterogeneity
Complexity of the Model n Problem for n n Harder to understand what will happen at any given case n n Designers Users System software Network oscillations, cycles Harder to design software to handle even understood complexities
Difficulties with Correct Operation n Distribution requires more complex synchronization n n Hard to synchronize at fine time scale Example, distributed make Differences between similar operations with remote and local New sources of nonuniform timings
Difficulties of Allocating Resources n Local machine may have inadequate resources for a task n n Infeasible to control resources centrally n n While a remote machine lies idle Do I need to go remote to satisfy malloc()? Using remote resources conflicts with local autonomy
Security n n Much trickier with no centralized control Data communications more subject to eavedropping Physical security measures typically infeasible for many problems In very widely distributed systems, very tricky problems
Dealing with Partial Failures n n n Single machines usually have easy failure modes Distributed systems face complications Even detecting failure of a remote machine is nontrivial n A slow network vs. a failed network vs. a crashed machine
Scaling Issues n n n Distributed systems control much larger pools of resources So algorithms that scale well become much more important Scaling puts severe limits on close cooperation
Heterogeneity Problems n Most distributed systems must address problems of differing HW and SW n n Same disk model has different number of tracks Different data and executable formats Different software versions Different OSes
Resource Sharing n n Resource sharing helps with some of the problems Motivations for resource sharing n n n Information exchange Load distribution Computational parallelism The fundamental distributed system problem The tragedy of the commons n Roommates…
Distribution Complicates Everything n n n Process control and synchronization Interprocess communications File systems Security Device management
Important Research Areas in Distributed Operating Systems n In the area of processes n n Remote interprocess communications Synchronization Naming Distributed process management
More Research Areas n In the area of resource management n n Resource allocation Distributed deadlock mechanisms Protection and security Managing communication resources
Taxonomy of Distributed Systems Data Stream Single Instruction Stream Multiple Single Multiple SISD SIMD (von Neumann architecture) (vector processors) MISD MIMD (pipeline) (distributed shared memory)
Network vs. Distributed OSes n n n Network OSes control a single machine, plus some remote access facilities Distributed OSes control a collection of machines Not a hard and fast distinction
Network OS Diagram Network OS Network OS
Distributed OS Diagram Network OS Distributed Operating system Network OS
Characteristics of Network OSes n n Private per-machine OS Normal operations only on local machine Machine boundaries are explicit Little per-user fault tolerance
Characteristics of Distributed OSes n n Single system controls multiple machines Use of remote machines invisible Users treat system as virtual uniprocessor Strong fault tolerance
Reality is Somewhere in Between n Relatively few true distributed OSes Network OS model… But many modern systems have distributed OS-like capabilities n n And they also support network OS operations n n Like remote file access Like remote shell WWW access is in between
The Role of the Network n n Distributed OSes made possible by network Two fundamental types n n n Local area networks Long haul networks With very different characteristics
Local Area Networks n n n High bandwidth Low delay Shared by modest number of machines Covers modest geographical area Dedicated to small group of users Can be regarded as extension to computer’s backplane
Long Haul Networks n n n Lower bandwidth Longer delays Shared by large numbers of machines Covers very wide area Typically shared by many independent groups n Problematic for cloud computing
Communication Protocols n n n Well defined methods of intermachine data exchange To handle problems of connecting network automatically Many different types required/available
Using Protocols in Distributed OSes n n n Any intermachine operation requires a protocol to control it So all machines involved can understand data exchange Fundamental choice n General vs. special purpose protocols
General- vs. Special-purpose Protocols n n General protocols try to handle any kind of traffic Special-purpose protocols are customized for one situation General protocols simplify everything Special-purpose protocols may perform better
Important Issues in Distributed Operating Systems n n n Communication model Process interaction Transparency Heterogeneity Autonomy Consistency and transactions
Communication Models for Distributed OSes n How do machines communicate? n n Generally message-based, at some level ISO model adds too much overhead n So, special-purpose protocols or simplified protocol stacking model is typically used
Process Interaction in Distributed OSes n How do processes interact in a distributed system? n n n n Pipe model Uninterpreted message model Client/server model Peer-to-peer model Integrated model RPC model Shared memory model
Pipe Model n Processes interact through pipes n n Named (has an associated file name) or unnamed Local or remote
Pros/Cons of Pipe Model + Simple transfer of large blocks of data + Hides many aspects of distribution - Offers little organizational benefits - Short on flexibility - May be hard to get good performance
Uninterpreted Message Model n n n Processes send explicit messages System provides general message delivery service Higher-level semantics handled by processes Libraries can provide useful message services Example: Isis
Pros/Cons of Uninterpreted Message Model + Simple and powerful + Relatively easy to implement + Can scale well - Offers little organizational support - Encourages asynchrony - Not everyone’s favorite programming paradigm
Client/Server Process Interaction Model n n n Processes are either clients or servers Clients send request messages to servers Servers send response messages to clients Clients compete for server resources Control of system distributed among servers Examples: Name servers, IPC servers, file servers, WWW servers, etc.
Pros/Cons of Client/Server Model + Simple model + Hides much distribution - Servers are bottlenecks - Multiple implementations of servers to overcome bottlenecks increase complexity
Peer-to-Peer Model n n A process serves as a client and a server Control of the total system is distributed among peers
Pros/Cons of Peer-to-Peer Model + No centralized bottleneck + Can scale well - Difficult to control the global behavior - Censorship-proof
Integrated Process Interaction Model n n All system resources implemented in integrated way Remote/local resources treated identically System makes decisions on resource allocation E. g. , Locus
Pros/Cons of Integrated Process Interaction Model + Hides distributed complexity + Reduces bottlenecks - Hard to implement correctly - How do you migrate a process? - Performance problems likely - Big scaling problems
RPC Model n Processes communicate through RPC n n Client/server often built on top of this But this model makes lower level more explicit
Pros/Cons of RPC Model + Simple programming model + Good scaling potential + Potentially good performance - Potential for deadlock and blocking - Implicit close connection between processes - Potential bottleneck problems
Shared Memory Model n n n Provide distributed shared memory as the basic IPC mechanism Emulating local shared memory Possibly without substantial HW support
Pros/Cons of Shared Memory Model + Simple user model + Easy to build other mechanisms on top - Hard to provide complete transparency - Hard to provide good performance - Serious scaling, heterogeneity questions
Transparency n n Invisible (like a pane of glass) Hiding machine boundaries n n From both users and system itself Transparent systems much easier to work with Providing at a low level has strong benefits Not everything should be transparent
Kinds of Transparency n n n n Data transparency Process-access transparency Location transparency Name transparency Control transparency Execution transparency Performance transparency
Data Transparency n n n Allow transparent access to remote data Benefit: allows use of remote data resources NFS is (largely) data transparent
Process Access Transparency n n Local resources accessed with same mechanisms as remote resources Benefit: user doesn’t need to worry what’s local and what’s not NFS, RPC are process access transparent WWW is not process access transparent
Location Transparency n n Where resources are located is invisible Benefit: resources can be moved without disruption RPC can be location transparent WWW is not location transparent
Name Transparency n n A given name has the same meaning throughout the distributed system Benefit: same name gets to same resource from anywhere URLs are name transparent /tmp in most distributed FSes is not
Control Transparency n n Control of system resources is transparent to its users (e. g. , remote processes controlled like local) Benefit: easier control of distributed applications Locus provides control transparency on processes Typical UNIX network of workstation does not provide it on processes
Execution Transparency n n Allows processes to execute on any machine in system (and more, perhaps) Benefit: easier handling of distributed applications, load balancing Java is execution transparent (not load balancing, though) NFS provides no execution transparency
Performance Transparency n n Users don’t notice difference when something must be done remotely Benefit: if achievable, frees user of worrying about costs of going remote NFS has high degree of performance transparency WWW often does not
Benefits of Transparency n n n Easier software development Support for incremental changes Potentially better reliability Simpler user model Flexibility in resource location Support for scaling
When can you provide transparency? n n n In applications (especially databases) In programming languages In OS itself
When don’t you want transparency? n When it’s too complex to provide n n When you want particular resources n n E. g. , /tmp when remote performance is terrible n n E. g. , heterogeneous systems E. g. , over very slow links Must be able to bypass transparency
Heterogeneity n n n How transparent should heterogeneous networks be? And at what cost? Generally, how does the network deal with heterogeneity?
Types of Heterogeneity n n n Computer heterogeneity Network heterogeneity OS heterogeneity
Computer Heterogeneity n n Handling different types of computers Most IPC mechanism easier if machines are homogeneous n n Easier sharing of certain kinds of data Technology trends towards homogeneity n But that can change
Network Heterogeneity n Handling different types of networks n n n Wired vs. wireless Dominance of IP making network interoperability a reality But problems remain with differing network performances
OS Heterogeneity n n Different OSes are not generally prepared to work together Prevents easy load sharing, migration of tasks
Solutions to Heterogeneity problems n Enforced coherence n n High-level standards n n Happening at de facto level E. g. , external data representations Bridges Virtualization …
- Slides: 68