Title: Distributed Operating Systems CS551
1Distributed Operating SystemsCS551
- Colorado State University
- at Lockheed-Martin
- Lecture 2 -- Spring 2001
2CS551 Lecture 2
- Topics
- Interconnection Networks
- Transparencies
- Real Time Systems (and networks)
- Parallel Systems (architecture software)
- Kernel of a Distributed Operating System
- Processes and Threads
- Interprocess Communication
3Interconnection networks
- 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). - Interconnection network designs
- bus, crossbar, hypercube, shuffle-exchange
4Figure 1.8 An Interconnection Network in a
Multiprocessor. (Galli,p.20)
5Interconnection network Bus
- Simple, static
- Shared by all attached processors
- No routing required
- All data transmissions occur on bus
- Scalability limited by bandwidth
- Examples
- Encore Multimax
- Sequent Balance and Sequent Symmetry
6Figure 1.9 A Bus Used as an Interconnection
Network. (Galli, p.20)
7Interconnection network Crossbar
- Permits dynamic configurations
- n memory modules x n processors
- Requires O(n2) switches (expensive)
- Many paths from one processor to another
8Figure 1.10 A Crossbar Interconnection Network.
(Galli, p.22)
9Interconnection network Hypercube
- Static
- Requires 2k switches for k processors
- Each switch is within a processor node
- Distance between nodes easy to compute
10Figure 1.11 A Hypercube Inter-connection
Network of Order 3. (Galli.p.22)
11Interconnection network Shuffle-Exchange
- Permits dynamic reconfiguration
- Switches have four modes of operation
- controlled by control bits in switch
- Simple routing
- address bits used as control bits
- Examples
- Benes, Banyan, Omega, Theta
12Figure 1.12 A 2x2 Switch Box in a
Shuffle-Exchange Interconnection Network.
(Galli,p.23)
13Figure 1.13 A Perfect Shuffle. (Galli,p.24)
14Figure 1.14 A Multistage Shuffle-Exchange
Interconnection Network. (Galli,p.24)
15Distributed Systems Characteristics
- Shared resources
- Openness
- Concurrency
- Scalability
- Fault tolerance
- Transparency
16D.S. Characteristics Openness
- a characteristic that enables systems to be
extended to meet new application requirements and
user needs (CDK, p.12) - 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)
17D.S. Characteristics Transparency
- 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) - Nine types
- access, location, concurrency, replication,
failure, migration, name, performance, scaling
18Network transparency
- Network transparency access transparency
location transparency - 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)
19Concurrency transparency
- 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
20Replication transparency
- 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
21Failure transparency
- 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
22Migration transparency
- 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
23Name transparency
- 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
24Performance and Scaling transparencies
- Performance transparency
- allows the system to be reconfigured to improve
performance as loads vary (CDK, p.21) - Scaling transparency
- allows the system and applications to expand in
scale without change to the system structure or
the application algorithms (CDK, p.21)
25Distributed Operating Systems
- 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)
26Kernel of an operating system
- The privileged portion of the OS
- complete access to all resources
- controls
- process management
- process migration
- process scheduling
- address space
27Types of OS kernels
- Monolithic kernel
- Unix, OS/360, VMS
- every node doesnt need entire kernel in DOS
- Layered kernel
- Windows NT/2000, Mach, Chorus (JavaOS)
- Collective kernel in DOS
- O.S. services are processes
- microkernel supports messages between such
processes
28Figure 2.1 Microkernel Design. (Galli,p.32)
29Processes
- 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
- shared memory
- message passing
- is a single thread of control
30Figure 2.4 Process States. (Galli,p.39)
31Threads
- Thread
- is a lightweight process
- has state
- may share address space with other threads
- may run serially or concurrently
- interacts with other threads via
- shared address space
- message passing
32Figure 2.2 A Multithreaded Process.
(Galli,p.34)
33Issues with processes and threads
- Shared memory space
- no protection barrier to other processes/threads
- need to maintain integrity
- Synchronized access
- must enforce mutual exclusion
- code that accesses a shared resource must be a
critical section
34Multi-threaded systems
- Three models
- specialist -- all threads equal
- client/server -- server allots tasks to clients
- assembly line -- like a pipeline
- Supporting
- POSIX
- Java
35Figure 2.3 Multithreaded Process Paradigms.
(Galli,p.35)
36Why threads?
- Processes
- to create or destroy a process is expensive
- requires more memory space
- to restore or swap out a process is expensive
- requires memory map changes
- Threads
- can keep a pool of threads and reuse them
- memory space is shared and need not always be
swapped
37Process management
- Controls process (or thread) and its components
- Recall PCB (Process Control Block)
- process id
- process state
- process priority
- process privileges
- virtual memory address
- recorded statistics for account
38Figure 2.4 Process States. (Galli,p.39)
39Processes, continued
- Indivisible
- independent
- not divisible into smaller tasks
- Divisible
- may be broken up into smaller processes (tasks)
- subtasks may run on different nodes
- helps to balance load of distributed system
- Task Interaction Graphs (TIG)
40Example of TIG
- 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
41Figure 2.5 TIG Revealing Precedence
Relationships. (Galli,p.42)
42Load Distribution
- Goal
- to utilize resources in an efficient manner
- Load balancing
- to balance the load equally among resources
- Load sharing
- to relieve overloaded resources
- Process migration
- to move a process to another processor
43Load distribution algorithms
- Two parts
- Information-gathering
- status states (site is overloaded/underutilized?)
- Process selection
- which process/thread/task to migrate?
- expected overhead for migration?
- expected execution time?
44Heterogeneous environments
- May include different data representations
- process migration may require data translation
- External data representation
- common data representation between sites
45Figure 2.6 Data Translation without External
Data Representation. (Galli, p.44)
46Figure 2.7 Data Translation with External Data
Representation. (Galli,p.44)
47Process Scheduling
- Recall from Operating Systems course
- Problem 2.10 in textbook
- Identifying schedulable tasks
- polled loop
- interrupts
- gang scheduling
48Figure 2.8 Polled-Loop Example. (Galli,p.47)
49Figure 2.9 Smart Concurrent Scheduling.
(Galli,p.48)
50Figure 2.10 Blind Concurrent Scheduling.
(Galli,p.48)
51Remote procedure calls (RPC)
52Figure 3.9 Remote Procedure Call Stubs.
(Galli,p.73)
53Figure 3.10 Establishing Communication for
RPC. (Galli,p.74)