Lecture5 - COP 5611 Operating Systems Spring 2010 Dan C...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
1 COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Lecture 5 Last time: Hard/Soft Modularity. Client/Server Organization. Today: Virtualization Threads Virtual memory Bounded buffers Race conditions, locks, semaphores Thread coordination with a bounded buffer Next Time: Processor sharing
Image of page 2
3 Virtualization of the three abstractions Why virtualization Enforce modularity Provide uniform access to resources Virtualization– relating physical with virtual objects Done by the operating system for the three abstractions: Interpreters Threads Storage Virtual memory Communication links Bounded buffers
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Virtualization methods Virtualization simulating the interface to a physical object by: 1. Multiplexing create multiple physical objects from one instance of a physical object. 2. Aggregation create one virtual object from multiple physical objects 3. Emulation construct a virtual object from a different type of a physical object. Emulation in software is slow. Method Physical Resource Virtual Resource Multiplexing processor thread real memory virtual memory communication channel virtual circuit processor server (e.g., Web server) Aggregation disk RAID core multi-core processor Emulation disk RAM disk system (e.g. Macintosh) virtual machine (e.g., Virtual PC) Multiplexing + Emulation real memory + disk virtual memory with paging communication channel + processor TCP protocol
Image of page 4
5 Threads 1. Threads a thread is a virtual processor; a module in execution 1. Multiplexes a physical processor 2. The state of a thread: (1) the reference to the next computational step (the Pc register) + (2) the environment (registers, stack, heap, current objects). 3. Sequence of operations: 1. Load the module’s text 2. Create a thread and lunch the execution of the module in that thread. 4. A module may have several threads. 5. The thread manager implements the thread abstraction. 1. Interrupts processed by the interrupt handler which interacts with the thread manager 2. Exception interrupts caused by the running thread and processed by exception handlers 3. Interrupt handlers run in the context of the OS while exception handlers run in the context of interrupted thread.
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 Virtual memory 1. Virtual memory a scheme to allow each thread to access only its own virtual address space (collection of virtual addresses). 1. Why needed: 1. To implement a memory enforcement mechanism; to prevent a thread running the code of one module from overwriting the data of another module 2. The physical memory may be too small to fit an application; otherwise each application would need to manage its own memory. 2.
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern