CS 3733 Operating Systems Introduction
Skim Chapters 1-3 if SGG
Read Chapter 1 of USP
Early Systems
- In the beginning there was only hardware.
- At first, everything was done by wiring plugboards.
- Later it was done with switches from the console.
- The programmer was the computer operator.
- You would sign up for a certain amount of time to use the machine
(say an hour) and you had to be done by then.
- You had to start from scratch each time.
- The entire system was at the immediate disposal of the
programmer/operator.
- No protection: only one user at a time.
- Machines became more complicated with
- card readers
- line printers
- magnetic tape
- assemblers
- loaders
- linkers
- libraries of common routines including I/O drivers.
- Later professional computer operators were used as well
as batch operation.
- The programmer provided cards and tapes and the
operator ran the job.
- Debugging was done off line.
- The operator would sort the programs into batches that
used similar resources --- all FORTRAN programs were run together
so that the FORTRAN compiler tape would only
have to be mounted once!
- Automatic job sequencing
- This was a procedure to automatically transfer control from one
job to another.
- A small program called the resident monitor was used for this.
- When a program was terminated, control would transfer to the
resident monitor which would choose another job to initiate.
- Still a problem of managing resources.
- Card readers were slow (20 cards/sec)
- Assemblers could assemble faster (say, 200 lines per second).
- During assembly the CPU could only operate at 10%.
- Solution: Load cards onto magnetic tape off line (using a small
dedicated computer).
- Output would be handled similarly.
- How was this change done? --- device independence
- When a program (such as an assembler) required the next card,
it would call another program, a device driver, to get it.
- The assembler would not have to know anything about the device,
other than that it gets a line of data.
- It could be a card reader or a tape drive or a disk drive of any type.
- Buffering and Spooling
- Buffering --- A method of overlapping the I/O of a job
with its execution.
After data has been read and while the CPU starts execution,
the input device is instructed to begin the next input
immediately so that it is in memory when it is requested.
- Spooling ---
Simultaneous Peripheral Operation
On-Line
Using a disk or similar device as a large buffer,
for reading as far ahead as possible on input devices or
storing output files until the output device (or devices)
are ready for them.
- Buffering overlaps the I/O of a job with its own computation.
- Spooling overlaps the I/O of a job with the computation of
all other jobs.
- Spooling can be used to provide a job pool}
- Multiprogramming
- Several jobs from the job pool are kept in memory.
- The OS picks and begins execution of one of these jobs.
- If the job needs to wait for an I/O device the OS switches
to executing another job.
- When that job needs to wait the OS switches to another job.
- The CPU therefore can be kept busy more of the time.
- We say these jobs are being run concurrently.
- This is an aspect of operating systems that adds much of
its complexity.
- Time Sharing (also called multitasking)
- This is an extension of multiprogramming.
- No job is allowed to use the CPU for more than a certain time,
called the quantum.
- A timer is set when a job enters the CPU.
- If the timer expires before the job request I/O, another job
is chosen for execution.
- If the quantum is small compared to a human time scale, it seems
as if many jobs are running simultaneously.
- This allows for a high degree of interaction between the user and the
computer without the associated inefficiency as the CPU waits for
the user to push a key.
- Similar to when only one person could use a computer at a time.
- Note: if there is only one CPU, at most one user job can be running
at any time.
- Distributed Systems
- There are two schemes for using several physical processors for
computation.
- In tightly coupled systems processors share memory and a clock.
- In loosely coupled systems each processor has its own
local memory but they share communication lines.
- These loosely coupled systems are referred to as
distributed systems.
- Here are some advantages:
- Resource sharing --- files, printers, software
- Computation Speed Up
A computation may be broken into parts, each done on a different
processor.
- Reliability --- If one processor goes down, the rest will
still be able to do useful work.
- Communication --- Mail and the Web
- Real-Time Systems
Usually used to control devices.
- Single User Systems
- PCs were originally designed as single-user systems with single-user
operating systems.
- Now PCs can act as servers and do multitasking.
- Peer to peer computing.
- Hand Held Systems
- Most of these are considerably more powerful than than mainframes
of 40 years ago.
- Some do networking and multitasking.
- How many times have we come full circle?