Beruflich Dokumente
Kultur Dokumente
Applications, services
Middleware
Node 1 Node 2
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.2
Core OS functionality
Process manager
Communication
manager
Supervisor
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.3
Address space
2N
Auxiliary
regions
Stack
Heap
Text
0
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.4
Copy-on-write
RB copied
from RA
RA RB
Kernel
Shared
frame
A's page B's page
table table
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.5
Client and server with threads
Thread 2 makes
requests to server
Receipt & Input-output
Thread 1 queuing
generates
results
T1
Requests
N threads
Client
Server
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.6
Alternative server threading architectures (see also Figure 7.5)
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.7
State associated with execution environments and threads
Executionenvironment Thread
Addressspacetables Savedprocessorregisters
Communicationinterfaces,openfiles Priorityandexecutionstate(suchas
BLOCKED)
Semaphores,othersynchronization Softwareinterrupthandlinginformation
objects
Listofthreadidentifiers Executionenvironmentidentifier
Pagesofaddressspaceresidentinmemory;hardwarecacheentries
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.8
Java thread constructor and management methods
Thread(ThreadGroupgroup,Runnabletarget,Stringname)
CreatesanewthreadintheSUSPENDEDstate,whichwillbelongtogroupandbe
identifiedasname;thethreadwillexecutetherun()methodoftarget.
setPriority(intnewPriority),getPriority()
Setandreturnthethreadspriority.
run()
Athreadexecutestherun()methodofitstargetobject,ifithasone,andotherwise
itsownrun()method(ThreadimplementsRunnable).
start()
ChangethestateofthethreadfromSUSPENDEDtoRUNNABLE.
sleep(intmillisecs)
CausethethreadtoentertheSUSPENDEDstateforthespecifiedtime.
yield()
CausesthethreadtoentertheREADYstateandinvokethescheduler.
destroy()
Destroythethread.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.9
Java thread synchronization calls
thread.join(intmillisecs)
Blocksthecallingthreadforuptothespecifiedtimeuntilthreadhasterminated.
thread.interrupt()
Interruptsthread:causesittoreturnfromablockingmethodcallsuchassleep().
object.wait(longmillisecs,intnanosecs)
Blocksthecallingthreaduntilacallmadetonotify()ornotifyAll()onobjectwakes
thethread,orthethreadisinterrupted,orthespecifiedtimehaselapsed.
object.notify(),object.notifyAll()
Wakes,respectively,oneorallofanythreadsthathavecalledwait()onobject.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.10
Scheduler activations
P added
Process Process
A B SA preempted
Process SA unblocked
SA blocked
Kernel
P idle
Virtual processors Kernel
P needed
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.11
Invocations between address spaces
Protection domain
(b) RPC/RMI (within one computer) boundary
Thread 1 Thread 2
User 1 User 2
Kernel 1 Kernel 2
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.12
RPC delay against parameter size
RPC delay
Requested data
size (bytes)
0 1000 2000
Packet
size
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.13
A lightweight remote procedure call
Client Server
A stack
A
Kernel
2. Trap to Kernel 3. Upcall 5. Return (trap)
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.14
Times for serialized and concurrent invocations
Receive
unmarshal
process results
Client Server Client Server
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.15
Monolithic kernel and microkernel
S4 .......
S1 S2 S3 S4 .......
.......
S1 S2 S3
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.16
The role of the microkernel
Middleware
Microkernel
Hardware
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 7.17
The architecture of Xen
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
1
8
Figure 7.18
Use of rings of privilege
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
1
9
Figure 7.19
Virtualization of memory management
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
2
0
Figure 7.20
Split device drivers
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
2
1
Figure 7.21
I/O rings
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
2
2
Figure 7.22
The XenoServer Open Platform Architecture
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
2
3