What is an Operating System-Introduction,system components,functions,types
What is an Operating System-Introduction,system components,functions,types
1
1. Hardware – provides basic computing resources (CPU, memory, I/O devices).
2. Operating system – controls and coordinates the use of the hardware among the various
application programs for the various users.
3. Applications programs – define the ways in which the system resources are used to
solve the computing problems of the users (compilers, database systems, video games,
business programs).
4. Users –try to solve different problems (people, machines, other computers). The user
view the computer system in terms of set of application.
Classes of operating systems
They can be designed as:
Proprietary o/s – designed for use by specific computer architecture. e.g. MS DOS, PC
DOS that runs on IBM and compatible computers using the Intel series of
microprocessors.
Generic o/s – designed for use by a wide variety of computer architectures e.g. UNIX
that runs on both Intel and Motorola Microprocessors
Operating system functions
a) Process Management
Process - fundamental concept in OS
a. Process is a program in execution.
b. Process needs resources - CPU time, memory, files/data and I/O devices.
OS is responsible for the following process management activities.
Process creation and deletion
Process suspension and resumption
Process synchronization and interprocess communication
Process interactions - deadlock detection, avoidance and correction
2
Managing multiple processes within memory - keep track of which parts of
memory are used by which processes. Manage the sharing of memory between
processes.
Determining which processes to load when memory becomes available.
3
Directory creation and deletion
Supporting primitives for file/directory manipulation.
Mapping files to disks (secondary storage).
Backup files on archival media (tapes).
4
f) Multiprocessing / Parallel processing – allows the simultaneous or parallel execution of
programs by a computer that has 2 or more CPU’s
g) Multithreading – support several simultaneous functions with the same application.
h) Inter-processing / Dynamic linking – allows any change made in one application to be
automatically reflected in any related linked applications e.g. a link between word processing
and financial applications (linked together).
i) Time sharing – allows multiple users to access a single computer found on a large computer
o/s where many users need access at the same time.
j) Virtual storage – o/s with the capability of virtual storage called virtual memory, allows you
to use a secondary storage device as an extension of main memory.
k) Real Time Processing – allows a computer to control or to monitor the task performances of
other machines and people by responding to input data in a specified amount of time. To
control processes immediate response is usually necessary.
5
OPERATING SYSTEM DESIGN AND IMPLEMENTATION
Design and Implementation of OS is not “solvable”, but some approaches have proven
successful. Internal structure of different Operating Systems can vary widely. The design starts
by defining goals and specifications and this is affected by choice of hardware and type of
system.
In guiding the design operating systems the user and system goals are taken into consideration.
User goals –operating system should be convenient to use, easy to learn, reliable, safe, and
fast.
System Goals – operating systems should be easy to design, implement, and maintain, as
well as flexible, reliable, error- free, and efficient
Important principles to separate during design are:
Policy: What will be done? (decide what will be done)
Mechanism: How to do it? (determine how to do something)
The separation of policy from mechanism is a very important principle since it allows maximum
flexibility if policy decisions are to be changed later.
Types of structures
a) Simple Structure / Monolithic systems
It has also been subtitled “The Big Mess” i.e. no structure where the o/s is viewed as a collection
of procedures which can call each other. There is no information hiding (procedures can view
each other) and basically suggests a basic structure for the o/s which includes:
Main Program – invokes service procedure
A set of service procedures – which carry system calls.
A set of utility procedures that help the service procedures
Example of MS DOS
MS-DOS –written to provide the most functionality in the least space. It is not divided into
modules. Although MS-DOS has some structure, its interfaces and levels of functionality are not
well separated (no information hiding).
6
b) Layered Approach
The operating system is divided into a number of layers (levels), each built on top of lower
layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.
With modularity, layers are selected such that each uses functions (operations) and services of
only lower-level layers.
7
e) Virtual Machines
A virtual machine takes the layered approach to its logical conclusion. It treats hardware and the
operating system kernel as though they were all hardware. A virtual machine provides an
interface identical to the underlying bare hardware. The operating system creates the illusion of
multiple processes, each executing on its own processor with its own (virtual) memory.
The resources of the physical computer are shared to create the virtual machines. CPU
scheduling can create the appearance that users have their own processor. Spooling and a file
system can provide virtual card readers and virtual line printers. A normal user time-sharing
terminal serves as the virtual machine operator’s console
Machine 1 Machine 2
lient File Server
Kernel Kernel
NETWORK
The kernel handles communication between clients and servers. The server processes run as user
mode processes and no in kernel mode, they do not have direct access to the hardware (hard for
hardware to crash). It has also been adapted to distributed systems.
8
SYSTEMS
1. Mainframe Systems
Batch Systems
Reduced setup time by batching similar jobs which were then run through the computer
as a group. But the CPU sat idle during the transition from one job to another.
Automatic job sequencing was required; i.e. automatically transferring control from one
job to another. This led to the creation of the first rudimentary/basic operating systems.
Resident Monitor: a procedure for automatically transferring control from one job to the
next. It is always (resident) in memory.
When the computer was turned on, RM was invoked,
It would then transfer control to a program
A Batch Operating system therefore reads a stream of separate jobs (from a card
reader), each with its own control cards that predefine what the job does. Job output is
printed on a line printer (on-line processing).
But there is lack of interaction between the user and the job while that job is
executing
2. Desktop Systems
Personal computers (PCs) – computer system dedicated to a single user.
I/O devices – keyboards, mice, display screens, small printers etc replaced card readers
and line printers.
Smaller & less expensive than mainframe systems.
Main goal of PC OS is User convenience and responsiveness rather than CPU and
peripheral utilization.
Can adopt technology developed for larger operating system often individuals have sole
use of computer and do not need advanced CPU utilization of protection features.
May run several different types of operating systems (MSDOS, Windows, Apple MacOS,
UNIX, Linux.
Multi-Processor Systems
3. Parallel Systems
Other than Single processor systems (systems with only one main CPU) there is a new
trend toward multiprocessor systems (systems having more than one CPU in close
communication).
Tightly coupled system – systems that have more than one processor in close
communication, sharing the computer bus, clock, memory and peripheral devices.
communication usually takes place through the shared memory.
Advantages of tightly coupled systems:
Increased throughput: Increasing No. of processors gets more work done in a
shorter period of time. Speed up ratio of n processors is not n but rather less; since
when multiple processors cooperate on a task, a certain amount of overhead is
incurred in keeping everything working correctly, & contention for shared
resources all lower the expected gain.
Economical; these systems save money compared to several single systems.
Sharing of peripheral devices, cabinets, power supplies, disks.
Models used in Multiple-processor systems
1.Symmetric Multiprocessing Model (SMP)
Each processor runs and identical copy of the operating system & the copies
communicate with each other as needed.
Many processes (N processes if N CPUs exist) can run at once without performance
deterioration.
9
Most modern operating systems support SMP
Ex. Encore’s version of UNIX for Multimax computer.
2.Asymmetric Multiprocessing
Each processor is assigned a specific task; master processor schedules & allocates work
to slave processors (Master- Slave Relationship) or slave processors have predefined
tasks.
More common in extremely large systems, where the most time consuming activities is
processing I/O
10
These Include;
Personal Digital Assistants (PDAs) e.g. palm pilots, cellular telephones
Issues:
Limited memory; i.e. btn 512KB and 8MB.this is due to limited size-most
devices are 5 Inches by 3 Inches.
Slow processors; processors run at a fraction of the speed of a PC processor.
Faster processors require more power. Thus a handheld device would need a large
battery that requires to be replaced/recharged frequently. For portability of
handheld devices, small-slower processors which consume less power are used.
PROCESSOR
Control Unit
Registers
INPUT 11
MEMORY OUTPUT
INPUT DEVICES
Input is any data and instructions entered into the memory of a computer.
Input devices is any hardware component that allows users to enter data and instructions into a
computer
Instructions entered into the computer can be in form of:
i) Programs – Series of instructions that tells a computer what to do how to do it.
ii) Command – an instruction that causes a program to perform a specific action. Users
issue command by typing or pressing keys on keyboard, click a mouse button, speaking
into a microphone or touching an area of a screen.
iii) User response – an instruction a user issues by replying to a question displayed by a
program.
SYSTEM UNIT
It is a case that contains electronic components of the computer used to process data. Many
electric components and most storage devices are part of the system unit. Other devices such as
keyboards, mouse, microphone, monitor, printer, and scanner are all connected to the system
unit. Parts of the system unit include:
a) Mother Board (System board)
It is the main circuit board of the computer system unit. Many electronic components are
attached to it.
b) Processor (Central Processing Unit)
Interprets and carries out the basic instructions that operate a computer. It impacts on
overall computing power and manages most of a computer’s operations.
12
Examples of Processor Manufacturers: Intel Corporation (Xeon MP, Itanium, Pentium,
80486, Celeron). AMD (Opteron, Athlon MP, Duron). Motorola (68040, 68030)
Motorola/IBM(Power PC). Transmeta (Efficeon, Crusoe)
Parts of a processor
i) Control Unit (CU)
Component of the processor that directs and co-ordinates most of the operations
in the computer.
It interprets each instruction issued by a program then initiates the appropriate
action to carry out the instruction.
ii) Arithmetic and Logic Unit (ALU)
Performs arithmetic comparison and other operations. Also includes basic
calculations such as addition, subtraction, multiplication and division.
iii) Registers
A processor contains small high speed storage locations called registers that
temporarily hold data and instructions.
Register functions include storing the locations from where an instruction was
fetched, storing an instruction while the CU decodes it, storing data while the
ALU computes it and storing these results of a calculation.
Buses
Address bus – carry device address that identifies a device being communicated
Data Bus – carry data to or from a device
Control Bus – transmit I/O Commands
System Clock – The processor relies on a small quartz crystal circuit called
system clock to control the timing of all computer operations. Just as your heart
beats at a regular rate to keep you body functioning, the system clock generates
regular electronic pulses or ticks that set the operating pace of components of the
system unit. The pace of the system clock, called clock speed is measured by no
of ticks per second (current personal computer processors have clock speeds in
gigahertz. Giga is a prefix that stands for billions and hertz is one cycle per
second; thus one gigahertz equals one billion ticks of the system clock per
second)
c) MEMORY
Consists of electronic components that store instructions waiting to be executed by the processor,
data needed by those instructions and results of processed data (Information). Memory usually
consists of one or more chips on the motherboard. Memory sizes are given in terms of number of
bytes the device has available for storage:
Types of memory
i) Volatile – when power of computer is turned off it loses its contents.
ii) Non – volatile – Doesn’t lose its contents when power is removed from computer
Volatile
13
RAM (Random Access Memory) – Main memory which consists of memory chips that can read
from and written to by the processor and other devices. The processor interprets and executes a
program’s instructions while the program is in the RAM. RAM can accommodate multiple
programs simultaneously. Examples of RAM include:
Non – Volatile
ROM (Read Only Memory) - are chips storing permanent data and instructions. Data on most
ROM chips cannot be modified hence the name read only. Manufacturers of ROM chips often
record data and instructions or information on chips (firmware).
SECONDARY STORAGE
Storage holds data, instructions and information for future use. A storage medium also called
secondary storage is the physical material on which a computer keeps data, instructions and
information.
Examples include:
i) Floppy Disks (Magnetic Disks)
ii) Hard Disks (Magnetic Disks)
iii) Magnetic Tapes (Magnetic Disks)
iv) Compact Disks (Optical Discs)
v) Digital Versatile Disks (DVD) -(Optical Discs)
vi) PC Cards
vii) Flash Memory
viii) Microfiche
Capacity is the number of bytes (Characters) a storage medium can hold. Terms used by
manufacturers to measure capacity are same as those used for memory.
Typical sizes for devices include
Floppy Disks – 1.44 Megabytes
Hard Disks – 80 Gigabytes
Flash Memory – 512 MB
Compact Disc – 700 MB
DVD – 4.7 GB
Secondary Storages are used to supplement the Primary storage. Their typical uses include:
a) Storing the operating system, Application software, user data and information
b) Software back ups
c) Transportation of files
task
Differentiate between primary and secondary storage
Magnetic Disks – use magnetic materials to store items such as data, instructions, and
information on a disk’s surface. Depending on how the magnetic particles are aligned, they
represent either a 0 bit or a 1 bit. Examples are floppy disks, Zip Disks, Hard Disks.
Optical Discs – Is a type of storage media that consists of a flat, round, portable disc made of
metal, plastic, and lacquer that is written and read by a laser. They primarily store software,
data, digital photographs, movies and music. Some optical discs are read only – meaning users
14
cannot write (save) on media. Others are read/write – allows users to save on discs. Examples
include: CD (Compact Discs), DVD (Digital Versatile Disc)/ (Digital Video Disc).
USB Flash Drives – is a flash memory storage device that plugs in a USB port on a computer or
mobile device. They are convenient for mobile users because they are small and light weight
enough to be transported in a pocket. Experts predict that USB flash drives will become the
mobile user’s primary portable storage device, eventually making the floppy disk obsolete.
Assignment 2
Explain the following storage devices
a) Smart Cards
b) Microfilm and Microfiche
c) PC Cards
d) Magnetic Tapes
OUTPUT
Output is data that has been processed into a useful form. A computer generates several types of
output depending on hardware and software being used and the requirements of the user. These
types may include: Text, Graphics, Audio, and Video.
An output device is any type of hardware component that conveys information to one or more
people.
Examples of Output devices include:
a) Display devices – give output that is visually conveyed sometimes called soft copy.
Examples include:
- Monitor (Display device packaged as a separate device)
- Flat Panels Displays (is a lightweight display device with a shallow depth and flat
screen and that typically uses Liquid Crystal Display-LCD)
b) Printers – is an output device that produces text and graphics on a physical medium such
as paper or transparency film. Printed information, called hard copy, exists physically and
is a more permanent form of output. Examples of types of printers include:
- Non Impact printers (Ink Jet Printers, Photo Printers, Laser Printers, Mobile
Printers)
- Impact Printers (Dot Matrix, Line Printers)
c) Speakers and Head sets – Produce music speech or other sounds such as beeps.
d) Plotters and Large formats Printers – are sophisticated printers used to produce high
quality drawings such as blue prints, maps and circuit diagrams.
e) Other Output Devices - Fax Machines, Multifunction Peripherals (printer, scanner, and
photocopy) and Data Projectors.
15
COMPUTER SOFTWARE
Software is a set of electronic instructions consisting of complex codes (also known as programs)
that make the computer perform tasks. In other words, software tells the computer what to do.
Some programs exist primarily for the computer's use and help the computer perform and
manage its own tasks. Other types of programs exist primarily for the user and enable the
computer to perform tasks, such as creating documents or drawing pictures. Computer software
is divided into two major categories: System and application software.
SYSTEM SOFTWARE
Consists of the programs that control and maintain the operating of the computer and its devices.
It serves as an important interface between the user, application software and hardware. Types of
system software are:
a) Operating system
b) Utility programs
Operating System – are a set of programs containing instructions that co-ordinate all the
activities among computers hardware resources. Basic function of the operating system include:
Memory management
Process Management
File Management
Device Management
Providing security
Utility Programs – They are included with most operating systems and provide the following
functions:
Managing files
Viewing images
Securing a computer from unauthorized access,
Uninstalling programs.
Scanning disks (deletes and corrects physical and logical problems on a hard disk and
searches and removes unnecessary file).
Disk Defragmenter – reorganizes the file sand unused space on a computer’s hard disk so
that the operating system accesses data more quickly and programs run faster).
Diagnostic Utility – Compiles technical information about your computer’s hardware and
certain system software programs and prepares a report outlining any identified problem.
Back up utility - allows users to copy or back up selected files or an entire hard disk to
another storage medium.
16