1.3.6 Operating Systems
1.3.6 Operating Systems
Operating System
The software that controls the allocation and usage of hardware resources such as memory, central
processing unit (CPU) time, disk space, and peripheral devices. The operating system is the
foundation software on which applications depend. Popular operating systems include Windows 98,
Windows NT, Mac OS, and UNIX. Acronym: OS
R
TASKS OF OPERATING SYSTEM
Hardware Management
KU
Software Management
Memory Management
File Management
Multiprogramming
Multitasking
Batch Processing
Interrupt Management
A
Virtual Storage
Spooling
Buffer
Multiprocessing
Time Sharing
Time Slice
TH
Turnaround Time
Polling
etc…
Spooling: The feature of the operating system of storing a data document in a queue, where it awaits
its turn to be printed.
ED
Multiprogramming: A form of processing in which a computer holds more than one program in
memory and works on them in round-robin fashion-that is, by sharing out the processor's time so that
each program receives some attention some of the time. This way of working is in contrast to using
the processor to run one program at a time.
HM
Multitasking: A form of processing supported by most current operating systems in which a computer
works on multiple tasks-roughly, separate "pieces" of work-seemingly at the same time by parceling
out the processor's time among the different tasks. Multitasking can be either cooperative or
preemptive. In the former, the operating system relies on the task to voluntarily cede control to
another task; in the latter, the operating system decides which task receives priority.
Multiprocessing: A mode of operation in which two or more connected and roughly equal
processing units each carry out one or more processes (programs or sets of instructions) in tandem.
In multiprocessing, each processing unit works on a different set of instructions or on different parts
of the same process. The objective is increased speed or computing power, the same as in parallel
A
Virtual Storage: Memory that appears to an application to be larger and more uniform than it is.
Virtual memory may be partially simulated by secondary storage such as a hard disk. Applications
access memory through virtual addresses, which are translated (mapped) by special hardware and
software onto physical addresses. Acronym: VM. Also called disk memory.
Time Sharing: The feature of a network based operating system by means of which more than on or
all the workstations can share the time of processing and accessing the same data at the same time
is called time sharing.
OR
It is the feature of network based operating system in which the operating system assigns equal
amount of time to each terminal / workstation to perform a single task in the server.
Time Slice: A brief period of time during which a particular task is given control of the microprocessor
in a time-sharing multitasking environment.
R
Turnaround Time: The time between submitting a job and receiving the output is known as
turnaround time.
KU
Polling: The process of periodically determining the status of each device in a set so that the active
program can process the events generated by each device, such as whether a mouse button was
pressed or whether new data is available at a serial port.
This can be contrasted with event-driven processing, in which the operating system alerts a program
or routine to the occurrence of an event by means of an interrupt or message rather than having to
A
check each device in turn.
• delete
• file security
• de-fragment
• rename
• calculate file size/space left
• automatic backup
HM
• directories
It deals with the loading of applications software into memory and controls the execution, or
‘running’ of them. It also provides a way for applications software to communicate with the
computer’s hardware.
It deals with any errors that occur when a program is being run, or when data is being transferred
somewhere, and informs the user if necessary. It manages system security, which involves:
Monitoring and restricting access to programs and data.
Preventing unauthorised access to the system.
USER-BASED TASKING
Single-user, single task
As the name implies, this operating system is designed to manage the computer so that one user
can effectively do one thing at a time. The Palm OS for Palm handheld computers is a good
example of a modern single-user, single-task operating system.
R
Single-user, multi-tasking
This is the type of operating system most people use on their desktop and laptop computers
today. Microsoft's Windows and Apple's MacOS platforms are both examples of operating
KU
systems that will let a single user have several programs in operation at the same time. For
example, it's entirely possible for a Windows user to be writing a note in a word processor while
downloading a file from the Internet while printing the text of an e-mail message.
Multi-user
A multi-user operating system allows many different users to take advantage of the computer's
A
resources simultaneously. The operating system must make sure that the requirements of the
various users are balanced, and that each of the programs they are using has sufficient and
separate resources so that a problem with one user doesn't affect the entire community of users.
Unix, VMS and mainframe operating systems, such as MVS, are examples of multi-user operating
systems.
TH
MODES (METHODS) OF OPERATING SYSTEM
A processing method is the way that a particular operating system deals with input. There are three
main types of processing method: real-time, transaction and batch processing.
Batch processing Systems
Online processing Systems
Real-time Processing systems
A batch processing system does not respond to input straight away. Instead, input is collected
ED
together into a ‘batch’ while the system is off-line. When a batch is ready to be processed the
system goes on-line to carry out the processing of the data.
Batch processing is non-interactive. This means that the user cannot get an immediate response
to input as they would with an interactive system.
HM
Examples of applications that use batch processing include producing gas, electricity or water
bills and marking OMR sheets from multiple choice examinations.
Real-time processing systems process input data so quickly that the resulting output can affect
further input. It is used for applications where it is essential that the computer responds straight
away to input.
Examples of applications where real-time processing is used are missile defence systems,
automatic pilot systems on aircraft and monitoring intensive care patients in a hospital.
A
Transaction, or on-line, processing, is used for applications where input needs to be dealt with
straight away but it is not critical if there is a slight delay in the time that it takes for the computer
to respond to requests.
Examples of applications where transaction processing is used include the on-line seat booking
systems used by airlines and the stock control systems used by catalogue companies like Argos.
A system where transaction processing is used will always give an up-to-the-minute picture of the
current situation.
UTILITY PROGRAMS
Utility programs are usually supplied along with an operating system. They are used to carry out
routine tasks that are often needed by a user such as:
Compressing a file to save space on backing storage
Defragmenting a disk drive
Recovering data from damaged file
Checking a disk for faults and repairing them
R
Formatting a floppy diskChecking the files on a disk for computer viruses
KU
People need a way of interacting with machines such as computers, PDAs, mobile phones, ATM
machines etc.
A User Interface is the method/environment of software that enables you to provide instructions and
to control the device.
A
Following are the types of User Interfaces:
Main Interfaces
Command Line Interface (CLI) or Text based
Graphical User Interface (GUI)
TH
Additional Interfaces
Menu based
Form based
Natural language
Extended Interfaces
Gesture Driven
ED
MAIN INTERFACES
Command Line Interface (CLI) or Text based
Many years ago when computers were not very powerful they could not display the colourful
graphics required for a GUI. The only interface available to most computer uses was the
HM
command line.
The user would see nothing but a black screen. They would have to type a command to make
anything happen. e.g. To copy a text file called NOTES from a floppy disc to the hard drive the
user would have to type: C:\> COPY A:\NOTES.TXT C:\
A
R
KU
Screenshot from the MS DOS operating system using a command line interface.
A
Command-line interfaces are still used today on many servers.
These computers need to use all of their computing power running networks, etc. so they do not
use GUIs.
GUIs are quite easy to use due to the visual nature of the interface – the user has lots of visual
clues as to what things do. However, to display all of the nice graphics required by a GUI takes
a lot of computing power so quite a powerful computer is needed.
HM
A
ADDITIONAL INTERFACES
Menu Driven
A menu driven interface is commonly used on cash machines (also known as automated teller
machines, or ATMs), ticket machines and information kiosks (for example in a museum). They
provide a simple and easy to use interface comprised of a series of menus and sub-menus which
the user accesses by pressing buttons, often on a touch-screen device.
R
KU
A
TH
Form based
A form-based interface uses text-boxes, drop-down menus, text areas, check boxes, radio boxes
and buttons to create an electronic form which a user completes in order to enter data into a
system. This is commonly used on websites to gather data from a user, or in call centres to allow
ED
Natural language
A natural language interface is a spoken interface where the user interacts with the computer
by talking to it. Sometimes referred to as a 'conversational interface', this interface simulates
having a conversation with a computer. Made famous by science fiction (such as in Star Trek),
natural language systems are not yet advanced enough to be in wide-spread use. Commonly
used by telephone systems as an alternative to the user pressing numbered buttons the user can
speak their responses instead.
This is the kind of interface used by the popular iPhone application called Siri.
R
KU
A
EXTENDED INTERFACES
Gesture Driven
TH
A recent innovation in user-interfaces is the gesture-driven interface. This is an interface which is
controlled by a human making physical gestures which are then detected by the computer. The
idea was discussed at the TED conference by Pranav Mistry who invented the Sixth Sense device.
This uses cameras to detect human motion which it uses to determine what the user wants to do.
Other examples include the increasing use on touch-screen devices (such as mobile phones and
tablet computers) of gestures such as 'pinching' to zoom in and out. Some games consoles are
starting to use gesture driven interfaces. The Wii was the first such console which used a hand-
ED
held controller to detect gestures. More recently the xBox introduced a system similar to
SixthSense which uses a camera to detect motion.
HM
A
More on:
YouTube: Pranav Mistry presenting the Sixth Sense device at the TED conference
https://www.youtube.com/watch?v=fQEHtvNsfKE
http://www.pranavmistry.com/projects/sixthsense/
Interrupt
An interrupt is a signal to the processor emitted by hardware or software indicating an event that
R
needs immediate attention.
An interrupt alerts the processor to a high-priority condition requiring the interruption of the current
KU
code the processor is executing. The processor responds by suspending its current activities, saving
its state, and executing a function called an interrupt handler (or an interrupt service routine, ISR) to
deal with the event. This interruption is temporary, and, after the interrupt handler finishes, the
processor resumes normal activities.
Types of Interrupts
There are two types of interrupts: hardware interrupts and software interrupts.
A
Hardware interrupts are used by devices to communicate that they require attention from the
operating system. Internally, hardware interrupts are implemented using electronic alerting signals
that are sent to the processor from an external device, which is either a part of the computer itself,
such as a disk controller, or an external peripheral. For example, pressing a key on the keyboard or
TH
moving the mouse triggers hardware interrupts that cause the processor to read the keystroke or
mouse position. Unlike the software type (described below), hardware interrupts are asynchronous
and can occur in the middle of instruction execution, requiring additional care in programming. The
act of initiating a hardware interrupt is referred to as an interrupt request (IRQ).
A software interrupt is caused either by an exceptional condition in the processor itself, or a special
instruction in the instruction set which causes an interrupt when it is executed. The former is often
called a trap or exception and is used for errors or events occurring during program execution that
ED
are exceptional enough that they cannot be handled within the program itself. For example, if the
processor's arithmetic logic unit is commanded to divide a number by zero, this impossible demand
will cause a divide-by-zero exception, perhaps causing the computer to abandon the calculation
or display an error message. Software interrupt instructions function similarly to subroutine calls and
are used for a variety of purposes, such as to request services from low-level system software such as
device drivers. For example, computers often use software interrupt instructions to communicate
HM
with the disk controller to request data be read or written to the disk.
So, an interrupt can stop the CPU from what it is doing and instead start it doing something else.
What would happen if a lot of interrupts happened at the same time? How does the CPU know
which one to deal with first?
The CPU knows which interrupt to handle first because there are a hierarchy of interrupts. This is
because some interrupts are more important than others.
INTERRUPT EXAMPLES
Reset Button pressed
Power Supply failure
Hardware commands
Power-down command (screen off, hibernate etc)
These send a physical signal to the CPU via the interrupt chip.
Software is also allowed to issue interrupts to the CPU. For
example software has detected that an error has occurred
Program / Software
and will issue a software interrupt for the CPU to run some
instructions to try to clear the error.
R
Input / Output devices Hard Disk
Optical Disk
Printer
KU
Graphics tablet
So as you see, there are levels of interrupts that are more important than others. This is called the
'interrupt priority'
A
BUFFER
Temporary store/memory that holds data being transferred between devices often used to
compensate for different speeds of devices examples printer, disk, etc
Types of Buffers
Print buffer
TH
The print buffer stores a number of 'jobs' that have been sent to the printer by people. The picture
below shows a typical printer buffer in action. It shows the name of the document to be printed,
its status i.e. whether it is being printer or sitting waiting its turn and other information.
ED
Think about when your class are doing a piece of work in the computer/ICT suite. Near the end
of the lesson your teacher will sometimes say, 'put your name on your work and send it to print'.
30 students all do what they are told and press the 'print' icon at the same time.
HM
Now although the printer can print jobs out work pretty quickly, it can only deal with one request
at a time. So what happens is every time someone presses 'print', the job is queued up in the
buffer memory and stored until the printer has finished printing one piece of work and is ready to
tackle the next.
DVD buffer
When you want to 'burn' some files or software onto a DVD, a buffer is used.
A
R
KU
A
An application loads the burner buffer with data to be stored on a DVD, then the actual burner
software spends the next few minutes storing it onto a blank DVD. Meanwhile the original
software application gets on with other things.
TH
The important thing about burning a DVD is that it does not run out of data from start to end of
session, otherwise the DVD process fails. So the buffer very carefully speeds up and slows down
the burn rate so make sure this does not happen. This is an important characteristic of a buffer -
it can control the rate at which data comes in and out of it.
One is 'buffer overflow'. This is when the buffer is full up and cannot accept any more data. When
this happens, the application may crash or freeze. You have probably experienced this with a
network printer. Sometimes when the whole class sends their work to print at the same time the printer
suddenly stops printing anything and a red light starts to flash. The network technician then needs to
clear the buffer before the printer can begin work again.
Another problem is 'buffer underflow' when the buffer is empty and yet the receiving application is
still expecting data. For instance, if a DVD recorder runs out of data whilst recording a DVD then the
disk will be unusable. The application controlling the buffer must make sure that it can handle
overflow and underflow properly.
DEVICE DRIVERS
A driver is a piece of software that converts commands such as 'PRINT', into instructions that the
particular piece of hardware (printer) can understand.
R
KU
A
The operating system is usually pre-loaded with drivers for all of the hardware it needs to control.
Driver. However, as time goes by, new hardware is developed and the operating system won't have
TH
the correct driver. So, the manufacturer of the hardware will provide the correct 'driver' on a disk or
as a download from their web site.
Any piece of hardware that communicates with the CPU needs a driver, for instance inside the
computer itself there will be drivers for the sound card, graphics card, network card and peripherals
such as printer, scanner, digital camera, mp3 player and so on.
Each operating system needs its own driver for the same hardware device. This is why a 'Windows'
driver for a certain printer is not likely to work in a different operating system such as Linux and vice
ED
versa.
2008 MJ 01B
2008 MJ 02
2007 ON 01C
2007 ON 08
2007 MJ 01C
2007 MJ 04
2006 MJ 04
2005 ON 01D
2005 MJ 02
2004 ON 01E
2004 ON 09
2004 MJ 05
2003 MJ 06
2003 MJ 08
2002 ON 06C
2002 ON 08
R
2002 MJ 05
2001 ON 06
KU
A
TH
ED
HM
A