Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Search:

CA216      CA249      CA318

CA400      CA651      CA668


Introductory Notes




What is an Operating System?

  1. Provide an environment in which programs and users can work.

    • Extract problems that are common to multiple programs and users on the system, and provide the solutions to them, so that programs and users do not have to.
    • e.g. The programmer writing a program does not need to know about the physical layout of the hard disk - he wants to be able to work with a concept called "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 to be solved by each programmer. They have other things to do. These are questions for the OS.

    • Network utilities - provide API for applications to use.
    • Bundling utilities so that users have many/most programs they need already installed. Editor, browser, calculator, image editor. Could go on.

  2. 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 (web server, ssh to mainframe).

  3. HIDE the reality of the system from the programs and users.

    • Hide the fact that my program is scattered all over memory, is being moved around in memory, and is being swapped out to disk.
    • Hide the fact that my file is physically scattered all over the disk, and is 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 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:

  1. Respond to the user interface as quick as possible. Everything else can wait.

  2. Only load into memory the absolute minimum that we need to work with. We can load more if and when needed.
    For example, just load the initial code to display a program and its menus. Don't load the code to handle specific menu items until they are called (which often never happens).

  3. Only write to disk the absolute minimum we need to make the changes.
    Example: Editing a 5 M file. Added a few lines to the end. Press "Save".

  4. 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.
    Example: Delete a 10 G file.
    See un-deleting files.




"Never enough"

The whole history of Operating Systems / Computers can be summarised as:

"Never enough".

Never enough CPU speed.
Never enough memory (RAM).

Never enough disk space. (Perhaps solved for PCs. 10 T now less than $300.)
Never enough disk space on reliable, redundant, always-on, disk-always-spinning, high-use server. (Much more expensive. 10 T costs around $10,000.)

Never fast enough disk access.

Never enough screen size.
Never enough bandwidth.
Never enough battery life time.



Feeds      w2mind.org

On Internet since 1987.