COT 5611 Operating Systems Design Principles Spring 2014

  • Slides: 10
Download presentation
COT 5611 Operating Systems Design Principles Spring 2014 Dan C. Marinescu Office: HEC 304

COT 5611 Operating Systems Design Principles Spring 2014 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 3: 30 – 5: 30 PM

Lecture 5 n n Reading assignment: the class notes “Distributed systems-basic concepts” available online.

Lecture 5 n n Reading assignment: the class notes “Distributed systems-basic concepts” available online. Last time ¨ Names and fundamental abstractions ¨ Parallel systems n n The speedup Parallelism ¨ ¨ n ¨ Bit-level parallelism Instruction-level parallelism Data parallelism Task-parallelism Parallel architectures: SISD, SIMD, MIMD Storage systems n n 12/19/2021 Atomicity Why it is hard to implement atomicity Lecture 5 2

Today ¨ Distributed systems n Middleware: ¨ n n Motivating example molecular dynamics computation

Today ¨ Distributed systems n Middleware: ¨ n n Motivating example molecular dynamics computation Communication in distributed systems ¨ ¨ ¨ 12/19/2021 Transparency (Access, Location, Concurrency, Replication, Failure, Performance, Scaling). Abstractions: process, thread, communication channel The state of a process Events: internal, communication Process history Space time diagrams Global state Lecture 5 3

Desirable properties of middleware n n n n Access transparency - local and remote

Desirable properties of middleware n n n n Access transparency - local and remote information objects are accessed using identical operations; Location transparency -information objects are accessed without knowledge of their location; Concurrency transparency - several processes run concurrently using shared information objects without interference among them; Replication transparency - multiple instances of information objects are used to increase reliability without the knowledge of users or applications; Failure transparency - the concealment of faults; Migration transparency - the information objects in the system are moved without affecting the operation performed on them; Performance transparency - the system can be reconfigured based on the load and quality of service requirements; Scaling transparency - the system and the applications can scale without a change in the system structure and without affecting the applications. 12/19/2021 Lecture 5 4

Abstractions n n n n Process a program in execution Thread a light-weight process.

Abstractions n n n n Process a program in execution Thread a light-weight process. A thread of execution is the smallest unit of processing that can be scheduled by an operating system. The state of a process the ensemble of information about the process we need to restart it after it has been suspended. Communication channel provides the means for processes or threads to communicate with one another and coordinate their actions by exchanging messages. Message a structured unit of information, which can be interpreted only in a semantic context by the sender and the receiver. Communication among processes is done only by means of send(m) and receive(m) communication events where m is a message. State of a communication channel given two processes pi and pk the state of the channel, C(i, k), from pi to pk consists of messages sent by pi but not yet received by pk 12/19/2021 Lecture 5 5

More abstractions ¨ ¨ ¨ Local event internal to the process Communication event send(m),

More abstractions ¨ ¨ ¨ Local event internal to the process Communication event send(m), recive(m) Local history of a process a sequence of events, possibly an infinite one; can be presented graphically as a space-time diagram where events are ordered by their time of occurrence. Distributed system multiple processes active at any one time and communicating with each other. Global state of a distributed system the union of the states of the individual processes and channels. n ¨ The state of the channels does not appear explicitly in this definition of the global state because the state of the channels is encoded as part of the local state of the processes communicating through the channels. Protocol a finite set of messages exchanged among processes to help them coordinate their actions 12/19/2021 Lecture 5 6

Space-time diagrams 12/19/2021 Lecture 5 7

Space-time diagrams 12/19/2021 Lecture 5 7

The lattice of global states 12/19/2021 Lecture 5 8

The lattice of global states 12/19/2021 Lecture 5 8

Process coordination in the presence of errors A critical problem for a distributed system.

Process coordination in the presence of errors A critical problem for a distributed system. Statement: given two processes connected by a communication channel that can lose a message with probability �� > 0, no protocol capable of guaranteeing that two processes will reach agreement exists, regardless of how small the probability �� is. 12/19/2021 Lecture 5 9

Communication in the real-life distributed systems n Messages can be Lost ¨ Duplicated ¨

Communication in the real-life distributed systems n Messages can be Lost ¨ Duplicated ¨ Affected by errors ¨ n In practice ¨ ¨ ¨ ¨ A messages has a unique name sequence number To confirm reception of a message the receiver sends an acknowledgment Each acknowledgment has a sequence number as well as the sequence number of the message it acknowledges/. The sender sets up a timeout for the receipt of an acknowledgment To deal with lost messages the sender retransmits the message if the timeout expires To deal with duplicated messages the receiver discharges messages with duplicate sequence number. To deal with errors error detection and possibly error correction 12/19/2021 Lecture 5 10