Operating System Foundations - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Operating System Foundations

Description:

Don't let any single application hog the processor. Only the OS manages the clock ... Kick out a process when the time expires ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 15
Provided by: umar2
Category:

less

Transcript and Presenter's Notes

Title: Operating System Foundations


1
Operating System Foundations
  • Lecture 2

2
Operating System Functions
Application
Application
Application
Processor
Memory
Mouse
Sound-card
Hard-disk
Frame-buffer
Printer
3
Operating System Functions
Application
Application
Application
Operating System
Processor
Memory
Mouse
Sound-card
Hard-disk
Frame-buffer
Printer
4
OS Functions
  • OS as layer of protection

Process 1
  • Protect
  • Memory
  • I/O

Process 2
Process 3
5
OS Protection
  • Dont let any single application hog the
    processor
  • Only the OS manages the clock
  • Set timers
  • Kick out a process when the time expires
  • Take control of the processor every so often when
    there are system-wide things to do (I/O, memory
    management, scheduling).

6
OS Protection
  • Privileged Instructions
  • Only access via a privilege mode
  • Make a distinction between User and supervisor
    mode
  • Only supervisor mode can mask interupts
  • Only supervisor mode can access memory management
    structures
  • Only supervisor mode can do I/O

7
Operating Systems Functions
  • OS as Abstraction Layer
  • System Call Interface
  • Systems Calls
  • For interacting with Hardware and other processes
  • open(file, read_rights)
  • read (file_id, block_number)
  • alarm(up_call, seconds)
  • send_message(socket_id, message)

8
Scheduling
Application
Application
Application
Operating System Scheduler
Processor
Main Memory
ALU
9
Scheduling
10
Context Switching
Process B
OS
Process A
Save state A
Restore state B
Save state B
Restore state A
11
Memory Management
0x0FFF
Process 1
0x00FF
Process 2
0x00F0
Process 3
0x0000
12
Memory Management
  • An alternative way and intuitively easier to
    understand
  • Process 1 Memory Segment 1,2
  • Process 2 Segment 3
  • Process 3 Memory segment 7,8,9
  • Every memory access is checked in hardware to
    verify that you are only accessing your own
    memory segment
  • OS provides IPC!

13
I/O
  • Operating System as a multiplexer of I/O devices
  • Protect Resources, yet let processes share them

Set User mode (privilges Instruction)
User Mode
Privilege Mode
System Calls, Interrupts
14
I/O
  • Open(device, rights)
  • Privileged Instruction
  • Process -- gt Open Devices Table
Write a Comment
User Comments (0)
About PowerShow.com