Transcription of Introduction to Distributed Systems
1 11 CSE 380 Computer Operating SystemsInstructor: Insup LeeUniversity of PennsylvaniaFall 2003 Lecture Note: Distributed Systems2 Introduction to Distributed Systems Why do we develop Distributed Systems ? availability of powerful yet cheap microprocessors (PCs,workstations), continuing advances in communication technology, What is a Distributed system ? A Distributed system is a collection of independent computers thatappear to the users of the system as a single system . Examples: Network of workstations Distributed manufacturing system ( , automated assembly line) Network of branch office computers3 Distributed SystemsComparison of three kinds of multiple CPU systems4 Advantages of Distributed Systemsover Centralized Systems Economics: a collection of microprocessors offer a betterprice/performance than mainframes.
2 Low price/performance ratio: costeffective way to increase computing power. Speed: a Distributed system may have more total computing powerthan a mainframe. Ex. 10,000 CPU chips, each running at 50 possible to build 500,000 MIPS single processor since it wouldrequire nsec instruction cycle. Enhanced performance throughload distributing. Inherent distribution: Some applications are inherently Distributed . supermarket chain. Reliability: If one machine crashes, the system as a whole can stillsurvive. Higher availability and improved reliability.
3 Incremental growth: Computing power can be added in smallincrements. Modular expandability Another deriving force: the existence of large number of personalcomputers, the need for people to collaborate and share of Distributed Systemsover Independent PCs Data sharing: allow many users to access to acommon data base Resource Sharing: expensive peripherals likecolor printers Communication: enhance human-to-humancommunication, , email, chat Flexibility: spread the workload over theavailable machines6 Disadvantages of Distributed Systems Software.
4 Difficult to develop software fordistributed Systems Network: saturation, lossy transmissions security : easy access also applies to secretedata7 Software Concepts Software more important for users Two Operating Systems2.(True) Distributed Systems8 Network Operating Systems loosely-coupled software on loosely-coupled hardware A network of workstations connected by LAN each machine has a high degree of autonomyorlogin machineorcp machine1:file1 machine2:file2 Files servers: client and server model Clients mount directories on file servers Best known network OS:oSun s NFS (network file servers) for shared file Systems ( ) a few system -wide requirements.
5 Format and meaningof all the messages exchanged39 NFS (Network File system ) NFS Architecture Server exports directories Clients mount exported directories NSF Protocols For handling mounting For read/write: no open/close, stateless NSF Implementation10(True) Distributed Systems tightly-coupled software on loosely-coupled hardware provide a single- system image or a virtual uniprocessor a single, global interprocess communication mechanism,process management, file system ; the same system callinterface everywhere Ideal definition: A Distributed system runs on a collection of computers that donot have shared memory, yet looks like a single computer to itsusers.
6 11 Design Issues of Distributed Systems Transparency Flexibility Reliability Performance Scalability121. Transparency How to achieve the single- system image, , how tomake a collection of computers appear as a singlecomputer. Hiding all the distribution from the users as well asthe application programs can be achieved at twolevels:1)hide the distribution from users2)at a lower level, make the system look transparent ) and 2) requires uniform interfaces such as access tofiles, Flexibility Make it easier to change Monolithic Kernel: Systems calls are trapped andexecuted by the kernel.
7 All system calls are servedby the kernel, , UNIX. Microkernel: provides minimal services. IPC some memory management some low-level process management and scheduling low-level i/o ( , Mach can support multiple filesystems, multiple system interfaces.)143. Reliability Distributed system should be more reliable thansingle system . Example: 3 machines with .95probability of being up. **3 probability of beingup. Availability: fraction of time the system is improves it. Need to maintain consistency Need to be secure Fault tolerance: need to mask failures, recover Performance Without gain on this, why bother with distributedsystems.
8 Performance loss due to communication delays: fine-grain parallelism: high degree of interaction coarse-grain parallelism Performance loss due to making the system Scalability Systems grow with time or become obsolete. Techniques that require resources linearly in terms ofthe size of the system are not scalable. ( ,broadcast based query won't work for largedistributed Systems .) Examples of bottlenecksoCentralized components: a single mail serveroCentralized tables: a single URL address bookoCentralized algorithms: routing based on complete information517 Distributed Coordination Communication between processes in a Distributed system can haveunpredictable delays, processes can fail, messages may be lost Synchronization in Distributed Systems is harder than in centralizedsystems because the need for Distributed algorithms.
9 Properties of Distributed algorithms:1 The relevant information is scattered among multiple make decisions based only on locally available single point of failure in the system should be common clock or other precise global time source exists. Challenge: How to design schemes so that multiple Systems cancoordinate/synchronize to solve problems efficiently?18 Why need to synchronize clocks? modifiedComputer forcompilingComputer foreditingLocal clock timeLocal clock time19 Logical and physical clocks How a computer timer works?
10 A counter register and a holding register. The counter is decremented by a quartz crystals it reaches zero, an interrupted is generated and the counter isreloaded from the holding register. , interrupt 60 times per second. clock skew problem logical clocks -- to provide consistent event ordering physical clocks -- clocks whose values must not deviate fromthe real time by more than a certain Ordering Since there is no common memory or clock, it is sometimes impossibleto say which of two events occurred first. The happened-before relation is a partial ordering of events indistributed Systems such that1If A and B are events in the same process, and A was executed before B,then A A is the event of sending a message by one process and B is the event ofreceiving that by another process, then A A B and B C, then A C.