2.1. OPERATING SYSTEM
WHAT IS AN OPERATING SYSTEM?
- It is a program or a set of programs that
manages the operation of the computer.
- The most frequently used instructions in the
operating system must be stored in main memory and remain there whilst other
programs such as application programs are being executed.
- This portion of the operating system is called
by many different names such as control program, nucleus, monitor, supervisor
or executive.
- See figure 63.1.
LOADING AN OPERATING SYSTEM
- On all large computers and most micros, the
operating system is held on disk and has to be loaded into main memory once
the computer has been switched on, before any other programs can be run.
- The process of loading the operating system is
called booting the system.
- On a microcomputer system, the operating system
is usually held on the hard disk if the system has one. Otherwise it will be
held on a floppy disk, which will be known as a system disk.
- On all computers a small program held in ROM
(the 'loader') will tell the computer where to look for the operating system
and give instructions for loading at least part of it into memory.
- Once part of the operating system has been
loaded, more instructions can be executed to load the rest of the nucleus.
This method of 'pulling itself up by its own bootstraps' is where the
expression 'booting' comes from.
- In smaller hand-held computers the control
program is permanently held in ROM.
MODES OF OPERATION
Operating systems vary considerably in their
capabilities, from relatively simple single user microcomputer systems, to
sophisticated mainframe computers. The modes of operation include:
1) Single program
operation.
- The OS supervises the loading and running of one
program at a time and the input and output of data from and to peripheral
devices.
2) Multiprocessing.
- In larger systems one computer system may have
more than one processor but may still share all or some of the same memory.
3) Multiprogramming.
- This means that two or more programs are being
run concurrently.
- The operating system has to allocate resources
to each program, allowing each one a small amount of processor time before
moving on to the next one.
4) Batch processing.
- There is no interaction between the user and the
computer during batch processing.
- One or more programs are submitted to the
computer as a job and put in a batch queue until it is their turn to be run.
5) Real-time
processing.
- Real-time systems can be of different types;
process control, information storage and retrieval and transaction processing.
- In any of these systems, the data input to the
computer must be processed immediately. A fast response is required but
whereas a few seconds delay may be acceptable in an information retrieval
system, response must be instantaneous in a process control system which might
for example be monitoring a chemical reaction and so on.
- For example, commercial airlines use real-time
processing in their on-board computers and some airlines have a continuously
updated display in the passenger areas for the interest of the passengers. The
on-board computer constantly updates it estimate of arrival time, etc based on
the current readings for wind velocity, direction and so on.
THE FUNCTIONS OF AN OPERATING
SYSTEM
Obviously not all operating systems carry out
precisely the same tasks; a single-programming micro will not need to perform
all the tasks of a multiprogramming, multi-user mainframe computer.
The functions listed below apply to a greater or
lesser extent to many computers and will be explained in more depth in
subsequent Units:
1. Resource allocation
and scheduling.
- All operating systems must have the ability to
load programs into memory and start them running; more complex operating
systems have to allocate CPU time, memory and I/O (input/output) resources to
different processes running concurrently.
2. Memory Management.
- Some or all the computer's memory will be
'partitioned', with different programs running in different partitions.
- The operating system decides on how these
partitions are organised.
- Even in a micro which can only run one program
at a time, some memory management is required.
- the operating system for example will occupy a
different partition from the user's program. See fig. 63.3 - memory
partitioning.
3. Backing-store
Management.
- This includes supervising the creation, updating
and deletion of files.
- A directory of files has to be maintained so
that they can be quickly located when required.
4. Input/Output
Control.
- Reading from and writing to the various
peripherals is controlled by the operating system.
5. Interrupt handling.
- An interrupt may be caused deliberately, as for
example in a time-sharing system where a real-time clock generates interrupts
at regular time intervals to give the next user processor time.
- Interrupts may also be caused by program errors,
hardware malfunctions, or external events such as pressing the 'Break' key.
6. Operator Interface.
- The OS accepts commands from the operator and
responds to them.
7. Security.
- Most multi-user systems provide the ability to
assign login codes and passwords to different users.
8. Utilities.
- Most OS contain utility programs for file
management, editing files, reorganising disk space, making backups and so on.
9. Accounting
facilities.
- Large systems will keep a record of facilities
used by each person such as processor time, number of pages printed and disk
space used.
Resources:
P M Heatcote, [A level Computing, 3rd.
edition], Ashford Colour Press Ltd, Gosport, Hants, 1996.