QMCS 360
Class Notes, # 3
Dr. Rick Smith
Quantitative Methods
and
Computer Science
Dr. Smith Home
|
Research
|
Classes
|
Blackboard
|
Cryptosmith
|
QMCS Home
|
UST A-Z
|
UST Home
last update:
Thursday, September 15, 2005
Homework Assignment - working it out
OS Evolution
Running without an OS
Loading a job
Copy from some storage device into RAM
Start it running
"Loader"
Running a job
Collecting "output"
Batching #1
Collect up 2 or more "jobs"
Running them in order - 1 by 1
Job "stops" and operator loads up the next one
Or, job jumps back to a monitor and loads the next one automatically
Batching #2
Collect up 2 or more "jobs"
Run them concurrently - "Multiprogramming"
Issues
Process management
Taking turns
No "Hogging the processor"
Memory management
Getting and using a specific amount
Option: Predefined amount
Option: Amount based on the job - specified in control
Option: Amount based on the program's size when loaded
Keeping your references to yourself - protection
Resource allocation - i/o
Keeping references to onesself
Deadlocking over excessive needs
Identifying files and devices ahead of time
Timesharing
People log in and dynamically demand more and more
Dynamic file access, device access, memory access
Security issues with remote access
Summary of OS capabilities
Proceess management
Taking turns to keep the processor busy
Taking turns to ensure that everyone finishes running
Don't focus on work that doesn't need hurry
Giving good response time
Memory management
Giving programs enough to get started
Keeping programs from banging on each other
Giving programs as much as they need within reason
I/O Management
Ensuring efficient operation
Ensure programs take turns in a fair manner
Prevent programs from interfereing with each other
File management
Give programs the essential functions (create, modify, rename, move, delete, etc.)
Provide protection as needed between users
Ensure that concurrent accesses work "correctly"
BREAK
PROCESSES
The simple case - Programs sharing RAM and hard drive
Take turns running while one is delayed
What makes one stop and the other run?
1. If one has run "too long" (quantum, time slice, ...)
2. If one is waiting for the hard drive
Process management data
When we stop a process, we have to save information about it
Program counter
Accumulators, registers
Stack pointer
Range of RAM being used
What it's waiting for (i/o, next "turn")
Process "state" - an indicator that the process is running, or why the process stopped
What is a state diagram?
Diagram with boxes indicating what the process is doing
Arrows indicate new "state" based on "events"
When an event occurs, the process may or may not change states
System may take some actions when a state needs to change
That's kind of a separate issue from the "state model" which really cares about events and states
The 2-state model (p. 115)
The 5-state model (p. 118)
Queueing models
Identify where a process needs to wait, insert a queue there.
Arrows indicate where a process goes after waiting in a queue.
A more complex case: "swapping" or "segmentation"
What if part of the program is missing, and must be read in from the hard drive?
Answer: you fix the state diagram to incorporate those issues
You also fix the process management data to include more info