Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Operating Systems CS551 Colorado State University at Lockheed-Martin Lecture 2 -- Spring 2001.

Similar presentations


Presentation on theme: "Distributed Operating Systems CS551 Colorado State University at Lockheed-Martin Lecture 2 -- Spring 2001."— Presentation transcript:

1 Distributed Operating Systems CS551 Colorado State University at Lockheed-Martin Lecture 2 -- Spring 2001

2 31 January 2001CS-551, Lecture 22 CS551: Lecture 2 n Topics – Interconnection Networks – Transparencies – Real Time Systems (and networks) – Parallel Systems (architecture; software) – Kernel of a Distributed Operating System – Processes and Threads – Interprocess Communication

3 31 January 2001CS-551, Lecture 23 Interconnection networks n A distributed system: “a collection of autonomous computers linked by a computer network with distributed system software” Coulouris, Dollimore & Kindberg, Distributed Systems: Concepts and Design, 2nd ed., Addison-Wesley (1994). n Interconnection network designs – bus, crossbar, hypercube, shuffle-exchange

4 31 January 2001CS-551, Lecture 24 Figure 1.8 An Interconnection Network in a Multiprocessor. (Galli,p.20)

5 31 January 2001CS-551, Lecture 25 Interconnection network: Bus n Simple, static n Shared by all attached processors n No routing required n All data transmissions occur on bus n Scalability limited by bandwidth n Examples: – Encore Multimax – Sequent Balance and Sequent Symmetry

6 31 January 2001CS-551, Lecture 26 Figure 1.9 A Bus Used as an Interconnection Network. (Galli, p.20)

7 31 January 2001CS-551, Lecture 27 Interconnection network: Crossbar n Permits dynamic configurations x n memory modules x n processors Requires O (n^2) switches (expensive) n Many paths from one processor to another

8 31 January 2001CS-551, Lecture 28 Figure 1.10 A Crossbar Interconnection Network. (Galli, p.22)

9 31 January 2001CS-551, Lecture 29 Interconnection network: Hypercube n Static n Requires 2^k switches for k processors n Each switch is within a processor node n Distance between nodes easy to compute

10 31 January 2001CS-551, Lecture 210 Figure 1.11 A Hypercube Inter- connection Network of Order 3. (Galli.p.22)

11 31 January 2001CS-551, Lecture 211 Interconnection network: Shuffle-Exchange n Permits dynamic reconfiguration n Switches have four modes of operation – controlled by control bits in switch n Simple routing – address bits used as control bits n Examples: – Benes, Banyan, Omega, Theta

12 31 January 2001CS-551, Lecture 212 Figure 1.12 A 2x2 Switch Box in a Shuffle-Exchange Interconnection Network. (Galli,p.23)

13 31 January 2001CS-551, Lecture 213 Figure 1.13 A Perfect Shuffle. (Galli,p.24)

14 31 January 2001CS-551, Lecture 214 Figure 1.14 A Multistage Shuffle- Exchange Interconnection Network. (Galli,p.24)

15 31 January 2001CS-551, Lecture 215 Distributed Systems: Characteristics n Shared resources n Openness n Concurrency n Scalability n Fault tolerance n Transparency

16 31 January 2001CS-551, Lecture 216 D.S. Characteristics: Openness n “a characteristic that enables systems to be extended to meet new application requirements and user needs” (CDK, p.12) n “achieved by specifying and documenting the key software interfaces of a system and making them available to software developers; i.e. the interfaces are published” (CDK, p.14)

17 31 January 2001CS-551, Lecture 217 D.S. Characteristics : Transparency n “the concealment from the user and from the application programmer of the separation of components in a distributed system, so that the system is perceived as a whole rather than as a collection of independent components” (CDK, p.20) n Nine types: – access, location, concurrency, replication, failure, migration, name, performance, scaling

18 31 January 2001CS-551, Lecture 218 Network transparency n Network transparency = access transparency + location transparency n Access transparency “enables local and remote information objects to be accessed using identical operations” (CDK, p.20) Location transparency “enables information objects to be accessed without knowledge of their location” (CDK, p.20)

19 31 January 2001CS-551, Lecture 219 Concurrency transparency n Concurrency and parallelism transparency – “enables several processes to operate concurrently using shared information objects without interference between them” (CDK, p.20) – permits efficient use of shared resources – no interference between processes sharing resources

20 31 January 2001CS-551, Lecture 220 Replication transparency n Replication transparency – “enables multiple instances of information objects to be used to increase reliability and performance without knowledge of the replicas by users of application programs” (CDK, p.20) – may be multiple copies of files in the system – updates to such files can be a problem

21 31 January 2001CS-551, Lecture 221 Failure transparency n Failure transparency – “enables the concealment of faults, allowing users and application programs to complete their tasks despite the failure of hardware or software components” (CDK, p.20) – if a site goes down, it is unapparent to other sites -- and work continues

22 31 January 2001CS-551, Lecture 222 Migration transparency n Migration transparency – “allows the movement of information objects within a system without affecting the operation of users or application programs” (CDK, p.21) – both resources and processes can migrate without users knowing

23 31 January 2001CS-551, Lecture 223 Name transparency n Name transparency – system incorporates a global naming scheme – objects (files, resources) are not tied to given nodes or sites by name – assists migration, access, and location transparencies

24 31 January 2001CS-551, Lecture 224 Performance and Scaling transparencies n Performance transparency – “allows the system to be reconfigured to improve performance as loads vary” (CDK, p.21) n Scaling transparency – “allows the system and applications to expand in scale without change to the system structure or the application algorithms” (CDK, p.21)

25 31 January 2001CS-551, Lecture 225 Distributed Operating Systems n A distributed operating system is – “a collection of software components that simplifies the task of programming and supports the widest possible range of applications” (CDK, p.5)

26 31 January 2001CS-551, Lecture 226 Kernel of an operating system n The privileged portion of the OS – complete access to all resources n controls – process management – process migration – process scheduling – address space

27 31 January 2001CS-551, Lecture 227 Types of OS kernels n Monolithic kernel – Unix, OS/360, VMS – every node doesn’t need entire kernel in DOS n Layered kernel – Windows NT/2000, Mach, Chorus (JavaOS) n Collective kernel in DOS – O.S. services are processes – microkernel supports messages between such processes

28 31 January 2001CS-551, Lecture 228 Figure 2.1 Microkernel Design. (Galli,p.32)

29 31 January 2001CS-551, Lecture 229 Processes n Process – a program whose execution has started, but not terminated – has state (ready, running, waiting) – has a single address space – may run serially or concurrently – may interact with other processes via n shared memory n message passing – is a single thread of control

30 31 January 2001CS-551, Lecture 230 Figure 2.4 Process States. (Galli,p.39)

31 31 January 2001CS-551, Lecture 231 Threads n Thread – is a lightweight process – has state – may share address space with other threads – may run serially or concurrently – interacts with other threads via n shared address space n message passing

32 31 January 2001CS-551, Lecture 232 Figure 2.2 A Multithreaded Process. (Galli,p.34)

33 31 January 2001CS-551, Lecture 233 Issues with processes and threads n Shared memory space – no protection barrier to other processes/threads – need to maintain integrity n Synchronized access – must enforce mutual exclusion – code that accesses a shared resource must be a critical section

34 31 January 2001CS-551, Lecture 234 Multi-threaded systems n Three models – specialist -- all threads equal – client/server -- server allots tasks to clients – assembly line -- like a pipeline n Supporting – POSIX – Java

35 31 January 2001CS-551, Lecture 235 Figure 2.3 Multithreaded Process Paradigms. (Galli,p.35)

36 31 January 2001CS-551, Lecture 236 Why threads? n Processes – to create or destroy a process is expensive n requires more memory space – to restore or swap out a process is expensive n requires memory map changes n Threads – can keep a pool of threads and reuse them – memory space is shared and need not always be swapped

37 31 January 2001CS-551, Lecture 237 Process management n Controls process (or thread) and its components n Recall PCB (Process Control Block) – process id – process state – process priority – process privileges – virtual memory address – recorded statistics for account

38 31 January 2001CS-551, Lecture 238 Figure 2.4 Process States. (Galli,p.39)

39 31 January 2001CS-551, Lecture 239 Processes, continued n Indivisible – independent – not divisible into smaller tasks n Divisible – may be broken up into smaller processes (tasks) – subtasks may run on different nodes – helps to balance load of distributed system n Task Interaction Graphs (TIG)

40 31 January 2001CS-551, Lecture 240 Example of TIG n TIG shows precedence of subtasks – T1 -- Prepare main course – T2 -- Prepare side dishes – T3 -- Prepare dessert – T4 -- Set table – T5 -- Serve meal – T6 -- Serve dessert

41 31 January 2001CS-551, Lecture 241 Figure 2.5 TIG Revealing Precedence Relationships. (Galli,p.42)

42 31 January 2001CS-551, Lecture 242 Load Distribution n Goal – to utilize resources in an efficient manner n Load balancing – to balance the load equally among resources n Load sharing – to relieve overloaded resources n Process migration – to move a process to another processor

43 31 January 2001CS-551, Lecture 243 Load distribution algorithms n Two parts n Information-gathering – status states (site is overloaded/underutilized?) n Process selection – which process/thread/task to migrate? – expected overhead for migration? – expected execution time?

44 31 January 2001CS-551, Lecture 244 Heterogeneous environments n May include different data representations – process migration may require data translation n External data representation – common data representation between sites

45 31 January 2001CS-551, Lecture 245 Figure 2.6 Data Translation without External Data Representation. (Galli, p.44)

46 31 January 2001CS-551, Lecture 246 Figure 2.7 Data Translation with External Data Representation. (Galli,p.44)

47 31 January 2001CS-551, Lecture 247 Process Scheduling n Recall from Operating Systems course n Problem: #2.10 in textbook n Identifying schedulable tasks – polled loop – interrupts – gang scheduling

48 31 January 2001CS-551, Lecture 248 Figure 2.8 Polled-Loop Example. (Galli,p.47)

49 31 January 2001CS-551, Lecture 249 Figure 2.9 Smart Concurrent Scheduling. (Galli,p.48)

50 31 January 2001CS-551, Lecture 250 Figure 2.10 Blind Concurrent Scheduling. (Galli,p.48)

51 31 January 2001CS-551, Lecture 251 Remote procedure calls (RPC)

52 31 January 2001CS-551, Lecture 252 Figure 3.9 Remote Procedure Call Stubs. (Galli,p.73)

53 31 January 2001CS-551, Lecture 253 Figure 3.10 Establishing Communication for RPC. (Galli,p.74)


Download ppt "Distributed Operating Systems CS551 Colorado State University at Lockheed-Martin Lecture 2 -- Spring 2001."

Similar presentations


Ads by Google