Provide hardware support to differentiate between at least two modes of

Provide hardware support to differentiate between at

This preview shows page 13 - 24 out of 38 pages.

Provide hardware support to differentiate between at ° least two modes of operation: 1. User mode -- execution done on behalf of a user. 2. Monitor mode (supervisor/kernel/system mode) -- execution done on behalf of operating system.
Image of page 13
Dual-mode operation(cont.) ° Mode bit added to computer hardware to indicate the current mode: monitor(0) or user(1). User ° When an interrupt or fault occurs, hardware switches to monitor mode. ° Privileged instructions only in monitor mode. Monitor Set user mode Interrupt/ fault
Image of page 14
I/O Protection ° All I/O instructions are privileged instructions. ° Must ensure that a user program could never gain control of the computer in monitor mode, for e.g. a user program that as part of its execution, stores a new address in the interrupt vector.
Image of page 15
Memory Protection ° Must provide memory protection at least for the interrupt vector and the interrupt service routines. ° To provide memory protection, add two registers that determine the range of legal 0 256000 3000040 300040 Base register monitor Job1 0 addresses a program may address. ± Base Register - holds smallest legal physical memory address. ± Limit register - contains the size of the range. ° Memory outside the defined range is protected. 420940 880000 1024000 120900 Limit register Job 2 Job 4 Job 3
Image of page 16
Hardware Address Protection
Image of page 17
Protection Hardware (cont.) ° When executing in monitor mode, the OS has unrestricted access to both monitor and users’ memory. The load instructions for the base and limit registers ° are privileged instructions.
Image of page 18
CPU Protection ° Timer - interrupts computer after specified period to ensure that OS maintains control. ± Timer is decremented every clock tick. ± When timer reaches a value of 0, an interrupt occurs. Timer is commonly used to implement time sharing. ° ° Timer is also used to compute the current time. ° Load timer is a privileged instruction.
Image of page 19
General System Architecture ° Given the I/O instructions are privileged, how do users perform I/O? ° Via system calls - the method used by a process to request action by the operating system.
Image of page 20
Operating System Structures ° Operating System Components ± Process Management, Memory Management, Secondary Storage Management, I/O System Management, File Management, Protection System, Networking, Command- Interpreter. ° Operating System Services, System calls, System Programs ° Virtual Machine Structure and Organization ° A Structural Approach to Operating Systems ° OS Design and Implementation
Image of page 21
Operating System Services ° Services that provide user-interfaces to OS ° Program execution - load program into memory and run it ° I/O Operations - since users cannot execute I/O operations directly ° File System Manipulation - read, write, create, delete files ° Communications - interprocess and intersystem ° Error Detection - in hardware, I/O devices, user programs ° Services for providing efficient system operation ° Resource Allocation - for simultaneously executing jobs ° Accounting - for account billing and usage statistics ° Protection - ensure access to system resources is controlled
Image of page 22
System Calls ° Interface between running program and the OS.
Image of page 23
Image of page 24

You've reached the end of your free preview.

Want to read all 38 pages?

  • One '20

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors