You are on page 1of 7

What is an Operating System ?

Operating Systems Implementation 2

COMP3300
An operating system is a program that acts as an
intermediary between the hardware of a computer and a
Introduction user and their application programs.
This is often viewed as a layer that simplifies and
standardizes the use of a computer. Also an operating
Department of Computer Science system may be viewed as the resource manager of the
The Australian National University computer system.
The purpose of a good operating system is to perform its
Eric McCreath tasks: efficiently, reliably, securely, conveniently, and
socially.
2004

The Computer System 3 A Modern Computer's Hardware 4

A modern general-purpose computer system's architecture


An abstract view of a computer system. consists of:
CPU
Users Shared Memory
Device Controllers

Application Programs System bus


Memory Controller

Operating System

Modem Display
Memory Disk
Hardware CPU Memory Controller Controller
Controller Controller

System Bus
Relationship between OS/HW 5 OS - The Resource Manager 6

The development of Operating System and computer Operating systems may be viewed as a resource manager. As
architecture have greatly influenced each other. they provide a way of sharing both abstract and physical
Operating system designers may require certain resources resources.
which are more efficiently done in hardware, hence, these Physical resources include resources such as: CPU, memory,
features are added into the architecture. keyboard, monitor, ... etc.
Similarly hardware designers may leave some capabilities to be Abstract resources include : files, file systems, windows,
implemented in software. semaphores, locks, processes, threads, ... etc.
Some examples of the interplay include: Resources may either be:
Memory protection, Space-multiplexed, or


Modems, and Time-multiplexed.


Floating point arithmetic.

Efficiency / Convenience 7 Genesis of the Operating System 8

Around the end of world war 2 researchers such as Howard


Efficiency and convenience are two important factors in the Aiken, John von Neumann, and others built enormous vacuum
design of a system. Often they may be conflicting factors, so a tube calculating engines. Some of these machine had 20,000
balance will usually be found. The point at which this balance vacuum tubes. A single group of people designed, built,
is found will depend on a number of factors including: price, programmed, operated and repaired these machines. Programs
performance, and robustness. As with many technologies, where loaded by plug boards.
efficiency is ususally initially more important, however, as the
technology matures convenience becomes more of a focus. A sign up sheet was used to allocate the computer. Effectively
the sign up sheet was the operating system as it would allocate
As we take a look at the History of Operating System the resource(the entire computer).
Efficiency/Convenience are two important factors to consider.
Attention/ For two main reasons the sign up sheet sheet was not an
Performance Convenience efficient use of the computer:
Performance
Firstly the computer would sit ideal if a user completed their job early.

Efficiency 

Secondly a user may need to re-book more time if they run over their
Time Time booking. This would duplicate set up time.
Punch Cards 9 Enter The Transistor 10

By the early 1950's punch cards replaced the use of plug boards. The introduction of transistors in mid-1950s brought enormous
The introduction of punch-cards improved efficiency. change. Primarily transistor made computers more reliable.
Note that, vacuum tube technology placed hard limits on the
computer system's capabilities. This in tern limited the software
that could be run.

Computers were still large and expensive. The owners of these


computers desired to get as much out of their expensive
devices. This created a separation of personal into: designers,
builders, operators, programmers, and maintenance people.

Jobs 11 Resident Monitor 12

Compilers such as FORTRAN and COBOL appeared. This The OS was small and would be directed by the control cards.
created more work for the operator and degraded the utilization Jobs would be automatically sequenced to reduce idle time. The
of the computer. resident monitor was created for this purpose. The monitor
would be directed by a job control language(JCL). This would
effectively tell the computer what to do with the next sequence
Jobs with similar needs would be batched together. This of cards.
improved utilization. (Note that, the meaning of the word
batch has changed slightly over the years.)

The programmers no-longer directly ran their programs. Rather


they would prepare a job. These jobs would normally consist of
the set of punch cards containing: the program, the data, and
control information.
I/O Devices 13 Slow Devices? 14

I/O devices required careful programming. Rather than the code The mechanical I/O devices were considerably slower than the
being rewritten every time, a library of device drivers was CPU. (e.g. An assembler may be able to process 300 cards per
maintained. second, yet a fast card reader is only able to read 20 cards per
second. So the CPU would be idle 93.3% of the time.)

Not only did this reduce the amount of programming and


improve reliability it also meant that devices began to be
thought of as logical entities rather than purely as physical Card Line
entities. CPU
Reader Printer

Off-line operation 15 Buffering 16

Magnetic tapes could perform I/O operations considerably Buffering is used to overlap I/O with computation. For input,
faster than card readers or line printers. So the information on data is automatically read and stored in a buffer while
the cards were copied onto magnetic tapes and than given to the computation is taking place. When the job requires the data it
main computer. The reverse of the procedure was used for may read directly from the buffer. For output data is placed
output. Hence, the card readers and line printers were operated into a buffer and than output to the device when it is able.
off-line.
Card Tape Tape Line Without Buffering
Reader Drive Drive Printer Input Device
Card Tape Tape Tape
Drive CPU Drive Tape Line
Reader Drive Drive Printer Computation

Card Tape Tape Line With Buffering


Reader Drive Drive Printer
Input Device
Satellite Processing
Computation
A program could be run using different I/O devices(device
independence). Thus, programs were written using logical I/O devices. Time
Buffering 17 Spooling 18

In spooling(Simultaneous Peripheral Operation On-Line) cards


If a job is I/O bound then buffering will not help greatly. are read directly onto a disk. The location of the card image is
That is if a job is just inputting a section of data than the input maintained by the OS. Later when the job is ran input is taken
buffer would be empty and it would simply have to wait as data directly from the disk and output is given directly to the disk.
is received. Once the job is complete the output is sent directly from the
disk drive to the printer. Spooling allows the I/O of one job to
Likewise if a job just wishes to output a section of data the overlap with the computation of another job. Also jobs would
output buffer will quickly fill up. not be delayed during execution due to slow I/O devices.
So buffering is effective in smoothing out the flow of data, The disk drive
however, the throughput will normally only be marginally Disk acts as large buffer
improved. Drive over the I/O of the jobs.

With Buffering
Card Line
Input Device CPU
Computation
Reader Printer
Time

Spooling 19 Multiprogramming 20

Spooling introduced the job pool structure which is an Multiprogramming involves having more than one program in
important precursor for multiprogramming. main memory at once. If one job is waiting for an I/O event
then the CPU can be switched to run another job.
A B C
Input Device to Disk Due to limitations on main memory only a subset of the job
A C B pool will be moved into main memory ready to be run.
Disk to Output Device
Multiprogramming improves CPU utilization.
Computation A C B

Without Spooling
A B C
Input Device to Disk
A B
Disk to Output Device

Computation A B
Multiprogramming 21 Time-Sharing 22

Multiprogramming introduces the basic building blocks of a A natural extension of Multiprogramming is time sharing(or
modern operating system. These include: job scheduling, CPU multitasking) where the CPU is rapidly switched between
scheduling, memory management, and resource management. different jobs. This rapid switching allows users to interact with
Main Memory their programs.
Disk Job A waits for some I/O
OS
Job2
Job5 Job3 A B C A B C B C
Job4
Job 1
Users would now interact with the computer using a keyboard
The turnaround time for batched multiprogrammed systems is and a monitor. This also created a need for an on-line file
considerable. This makes debugging difficult and interacting system.
with your program impossible.
Time-sharing systems became common in the early 1970s.
What could be done?

Personal Computers 23 Types of Operating Systems 24

By 1970 the cost of Mainframe Microcomputer As different computer system have different requirements there
hardware had reduced s s is also a variety of different types of operating system. These
considerably. This allowed 50' Compilers include:
an entire computer to be s Batch Real Time Systems - these need to be able to react in a timely


dedicated to one person. manner.
The personal computer was 60' Multiuser

born. s Parallel Systems - for tasks that require lots of computation.


Operating systems in Fault-tolerant Systems - when it is critical to continue to


70' Compilers
personal computers went s provide a service.
through similar Distributed System - when resources are spread out.

80' Distributed
developmental stages to Multiuser

that of mainframes. s
Multiprocessor
There is a number of other types of operating systems such as
for games machines, OS's for small devices such as PDA's.
Multiprocessor Note that, operating systems will often have overlapping
focuses.
Real Time Systems 25 Parallel Systems 26

Some applications of a computer system, such as industrial


control and robotics, require ridged constraints on response To improve throughput the current trend is towards
times. multiprocessor systems, this introduces a range of
complexities for operating systems.
There are two types of real time systems. First, hard real-time
systems which guarantee that critical tasks complete on time. Systems that have more than one processor sharing the same
Such systems will normally limit secondary storage. Second, bus, clock and memory are known as tightly coupled systems.
soft real-time systems which effectively give high priority to As microprocessors are becoming less expensive some of the
critical tasks. Given their lack of deadline support they are operating systems functionality may be off-loaded to slave
unable to guarantee deadlines. processors. Examples of this would be: disk management,
Both scheduling and memory management are import design graphics processing, or simple IO.
issues for real-time systems.
Linux and Windows NT include soft real-time components.
This support is useful for tasks such as: multimedia, virtual
reality, scientific projects, etc....

Fault-tolerant Systems 27 Distributed Systems 28

Fault-tolerant Systems allow the system to continue to provide In contrast to tightly coupled systems distributed systems or
full or partial services when components break down. This is loosely coupled systems consist of a set of computer systems
also known as graceful degradation. Fault-tolerant systems each with their own independent: processors, memory, bus
require mechanisms to: detect, diagnose, and correct(if clock, and secondary storage. They communicate with each
possible), faults that occur from time to time. other through various communication channels.
There are many advantages in building distributed systems
these include:
Resource sharing


Computation speedup


Reliability


Communications


You might also like