Introductory Notes
What is an Operating System?
- Provide an environment in which programs and users can work.
- To be precise, extract the problems that are common
to all programs or users on the system,
and provide the solutions to them,
so that programs and users can get on with doing
the real work (that they are using the computer for
in the first place).
- For example, the programmer writing a program
does not normally need to know about the physical layout
of the hard disk - he wants to be able to work with "files"
(as does the user).
- Not wanting PROGRAMMERS to have to REINVENT THE WHEEL each time:
- file systems - Where does this file go on the physical disk?
What if it grows bigger than the slot initially assigned to it?
- user interfaces - If I move a window, how do I re-draw the
window underneath? What pixels do I set to draw the letter 'A'?
These are not questions for each programmer.
They have better things to do.
These are questions for the OS.
- Bundling lots of utilities so that USERS have most programs they
need already installed.
Any utility that 90 percent of users need
ends up bundled with the OS.
- A current omission in Windows seems to be no graphical FTP utility.
Question - Are these "part of OS" or not?
- Clever OS algorithms squeeze the most usage out of
slow machines and limited resources
- Wanting to run multiple programs on one machine,
ideally overlapping in time.
e.g. A web browser and a text editor. Take it for granted.
- Wanting multiple users to be able to share one machine
at the same time (mainframes).
Most people have their own CPU now,
but still share CPUs via web servers and file servers.
- HIDE the reality of the system from the programs and users.
- Hide the fact that my program is scattered all over memory,
and is even being constantly moved around in memory.
- Hide the fact that my file is physically scattered all over the disk
(or even multiple disks),
and is even being moved around the disk.
- Hide the fact that my program shares memory with lots of
running system programs and multiple other user's programs,
all of which are being constantly moved around.
- Hide the fact that my program is not actually running
constantly, but is actually getting little timeslices of the CPU,
in between it going off to service other programs.
Principles that an OS will work by
Principles will include things like:
- Respond to the user interface as quick as possible.
Everything else can wait.
- Only load into memory the absolute minimum that we need
to work with.
We can load other stuff if and when needed.
- Only write to disk the absolute minimum we need to make the changes.
- When deleting large areas of memory or disk, just put markers
at the
start of block and end of block
showing it is free to be overwritten if and when needed in the future.
There is no need to actually go through every location
and scrub it clean.
The whole history of Operating Systems / Computers
can be summarised as:
"Never enough".
Never enough CPU speed.
Never enough disk space.
Never enough memory.
Never enough bandwidth.
Never enough screen size.
Never enough battery life time.
No sign of there being enough anytime soon either.
Disk space looks solved,
but around the corner is:
full read-write digital movies on disk in the file system.
And then we'll realise disk space isn't solved yet either.