OS1 Proc es ses, threads , communication, ... Computer & network hardware Node 1
OS2 Proc es ses, threads , communication, ... Computer & network hardware Node 2
Platf orm
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Proc es s manager
Memory manager
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
2N
Auxiliary regions
Stac k
Heap
Text 0
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
RA
RB copied from RA
RB
a) Before write
b) After write
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Thread 2 makes requests to server Thread 1 generates results Receipt & queuing
Input-output
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Figure 7.6 Alternative server threading architectures (see also Figure 7.5)
remote objec ts
a. Thread-per-request
b. Thread-per-c onnection
c. Thread-per-objec t
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Execution environment Thread Address space tables Saved processor registers Communication interfaces, open files Priority and execution state (such as BLOCKED) Semaphores, other synchronization Software interrupt handling information objects List of thread identifiers Execution environment identifier Pages of address space resident in memory; hardware cache entries
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
thread.join(int millisecs) Blocks the calling thread for up to the specified time until thread has terminated. thread.interrupt() Interrupts thread: causes it to return from a blocking method call such as sleep(). object.wait(long millisecs, int nanosecs) Blocks the calling thread until a call made to notify() or notifyAll() on object wakes the thread, or the thread is interrupted, or the specified time has elapsed. object.notify(), object.notifyAll() Wakes, respectively, one or all of any threads that have called wait() on object.
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Proc es s A
Kernel
P idle P needed
B. Ev ents between user-lev el scheduler & kernel Key : P = proces sor; SA = sc heduler activ ation
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Thread 1
Thread 2
Us er 1
(c) R PC/RMI (between computers)
Kernel
Us er 2
Thread 1
Network
Thread 2
Us er 1 Kernel 1 Kernel 2
Us er 2
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
RPC delay
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Client
Serv er
A stac k
1. Copy args
Us er Kernel
stub
stub
2. Trap to Kernel
3. Upc all
5. Return (trap)
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
proces s args mars hal Send trans mis sion proces s args mars hal Send Receiv e unmarshal ex ec ute reques t mars hal Send Receiv e unmarshal proces s results Receiv e unmarshal proces s results Receiv e unmarshal ex ec ute reques t mars hal Send
Receiv e unmarshal ex ec ute reques t mars hal Send Receiv e unmarshal ex ec ute reques t mars hal Send
tim e
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
S4
....... S1 S2 S3 S4 .......
S1
S2
S3
.......
Monolithic Kernel
Microk ernel
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Middleware Language support subs y stem Language support subs y stem Microkernel Hardware OS emulation subs y stem
....
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
18
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
19
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
20
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
21
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
22
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
23