ODU CS 775 - Operating System support

Unformatted text preview:

Slides for Chapter 7: Operating System supportFigure 7.1 System layersFigure 7.2 Core OS functionalityFigure 7.3 Address spaceFigure 7.4 Copy-on-writeFigure 7.5 Client and server with threadsFigure 7.6 Alternative server threading architectures (see also Figure 7.5)Figure 7.7 State associated with execution environments and threadsFigure 7.8 Java thread constructor and management methodsFigure 7.9 Java thread synchronization callsFigure 7.10 Scheduler activationsFigure 7.11 Invocations between address spacesFigure 7.12 RPC delay against parameter sizeFigure 7.13 A lightweight remote procedure callFigure 7.14 Times for serialized and concurrent invocationsFigure 7.15 Monolithic kernel and microkernelFigure 7.16 The role of the microkernelFigure 7.17 The architecture of XenFigure 7.18 Use of rings of privilegeFigure 7.19 Virtualization of memory managementFigure 7.20 Split device driversFigure 7.21 I/O ringsFigure 7.22 The XenoServer Open Platform ArchitectureFrom Coulouris, Dollimore, Kindberg and BlairDistributed Systems: Concepts and DesignEdition 5, © Addison-Wesley 2012 Slides for Chapter 7: Operating System supportInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.1System layersApplications, servicesComputer & PlatformMiddlewareOS: kernel,libraries & servers network hardwareOS1Computer & network hardwareNode 1 Node 2Processes, threads,communication, ...OS2Processes, threads,communication, ...Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.2Core OS functionalityCommunicationmanagerThread manager Memory managerSupervisorProcess managerInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.3Address spaceStackTextHeapAuxiliaryregions02NInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.4Copy-on-writea) Before write b) After writeSharedframeA's pagetableB's pagetableProcess A’s address space Process B’s address spaceKernelRA RBRB copiedfrom RAInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.5Client and server with threadsServerN threadsInput-outputClientThread 2 makesT1Thread 1requests to servergenerates resultsRequestsReceipt &queuingInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.6Alternative server threading architectures (see also Figure 7.5)a. Thread-per-request b. Thread-per-connection c. Thread-per-objectremoteworkersI/OremoteremoteI/Oper-connection threads per-object threadsobjectsobjectsobjectsInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.7State associated with execution environments and threadsExecution environment ThreadAddress space tables Saved processor registersCommunication interfaces, open files Priority and execution state (such asBLOCKED)Semaphores, other synchronizationobjectsSoftware interrupt handling informationList of thread identifiers Execution environment identifierPages of address space resident in memory; hardware cache entriesInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.8Java thread constructor and management methods Thread(ThreadGroup group, Runnable target, String name) Creates a new thread in the SUSPENDED state, which will belong to group and be identified as name; the thread will execute the run() method of target.setPriority(int newPriority), getPriority()Set and return the thread’s priority.run()A thread executes the run() method of its target object, if it has one, and otherwise its own run() method (Thread implements Runnable).start()Change the state of the thread from SUSPENDED to RUNNABLE. sleep(int millisecs)Cause the thread to enter the SUSPENDED state for the specified time.yield()Causes the thread to enter the READY state and invoke the scheduler.destroy()Destroy the thread.Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.9Java thread synchronization calls 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.Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.10Scheduler activationsProcessAProcessBVirtual processorsKernelProcessKernelP idleP neededP addedSA blockedSA unblockedSA preemptedA. Assignment of virtual processors to processesB. Events between user-level scheduler & kernel Key: P = processor; SA = scheduler activationInstructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.11Invocations between address spacesControl transfer viatrap instructionUser KernelThreadUser 1User 2Control transfer viaprivileged instructionsThread 1 Thread 2Protection domainboundary(a) System call(b) RPC/RMI (within one computer)Kernel(c) RPC/RMI (between computers)User 1 User 2Thread 1NetworkThread 2Kernel 2Kernel 1Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.12RPC delay against parameter size10002000RPC delayRequested datasize (bytes)Packetsize0Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 7.13A


View Full Document

ODU CS 775 - Operating System support

Download Operating System support
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Operating System support and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Operating System support 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?