chap8 - William Stallings Computer Organization and...

Info iconThis preview shows pages 1–23. Sign up to view the full content.

View Full Document Right Arrow Icon
William Stallings Computer Organization and Architecture Chapter 8 Operating System Support P239
Background image of page 1

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

View Full DocumentRight Arrow Icon
Objectives and Functions Convenience Making the computer easier to use Efficiency Allowing better use of computer resources
Background image of page 2
Layers and Views of a Computer System Go to
Background image of page 3

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

View Full DocumentRight Arrow Icon
Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System access Error detection and response hardware,  software Accounting P240
Background image of page 4
O/S as a Resource Manager
Background image of page 5

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

View Full DocumentRight Arrow Icon
Memory layout for resident monitor
Background image of page 6
Desirable Hardware Features Memory protection To protect the Monitor Timer To prevent a job monopolizing the system Privileged instructions Only executed by Monitor e.g. I/O Interrupts Allows for relinquishing and regaining control
Background image of page 7

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

View Full DocumentRight Arrow Icon
Multi-programmed Batch Systems I/O devices very slow When one program is waiting for I/O, another  can use the CPU 20ns 60ns 12ms CPU Cache Memory Disk 3GHz 800MHz 3 times 1,000,000 times
Background image of page 8
Single Program for I/O for I/O
Background image of page 9

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

View Full DocumentRight Arrow Icon
Multi-Programming with Two Programs for I/O for I/O for I/O for I/O
Background image of page 10
Multi-Programming with Three Programs Go to
Background image of page 11

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

View Full DocumentRight Arrow Icon
Time Sharing Systems Allow  users  to interact directly with the computer i.e. Interactive Multi-programming allows a number of users to  interact with the computer
Background image of page 12
Scheduling Key to multi-programming Long term Short term I/O P250
Background image of page 13

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

View Full DocumentRight Arrow Icon
Process States
Background image of page 14
Process Control Block Identifier State Priority Program counter Memory pointers Context data I/O status Accounting information PCB
Background image of page 15

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

View Full DocumentRight Arrow Icon
Scheduling Example Go to
Background image of page 16
Machine language   Memory   CPU   PCB 1000 LDA 2000 1001 MPY 2001 1002 MPY 2002 1003 STA 2003 2000 2 2001 3.14 2002 6.5 1004 PC IR AC ALU control unit ….. proc1 ready 2 1004 1000 (AC) ….. …. proc1 proc2 Identifier State Priority Program counter Memory pointers Context data I/O status Accounting information 3000 3001 3002
Background image of page 17

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

View Full DocumentRight Arrow Icon
Key Elements of O/S P255
Background image of page 18
Memory Management Uni-program Memory split into two One for Operating System (monitor) One for currently executing program Multi-program “User” part is sub-divided and shared among active  processes os os P1 P2 P3 P4,P5,P6 P7,P8, Program
Background image of page 19

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

View Full DocumentRight Arrow Icon
Swapping Problem:  I/O is so slow compared with CPU  that even in multi-programming system, CPU  can be idle  most of the time Solutions: Increase main memory  Expensive Leads to larger programs Swapping
Background image of page 20
What is Swapping? Many programs (processes) are stored on  disk As a process in memory completes, it is moved  out of main memory Processes “ swapped” in  as space becomes  available If none of the processes in memory are ready  (i.e. all I/O block ed) Swap out a blocked process to disk Swap in a ready process or a new process But swapping is an I/O process… (P257)
Background image of page 21

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

View Full DocumentRight Arrow Icon
Problem   OS P1 P2 P3 P4, P5, P6, P7 P8, … 4 3 3 Go to
Background image of page 22
Image of page 23
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 71

chap8 - William Stallings Computer Organization and...

This preview shows document pages 1 - 23. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online