Os Al 01
Os Al 01
Systems
Dr Damitha Karunaratna
University of Colombo school of computing
Topics to discuss
• Components of a computer system.
• Different types of software.
• What is an operating system(OS)?
• Input/Output devices.
• Need of an operating system.
• Main functions of an OS.
• Different Types of Oss
• How the OS get loaded
Operating Systems 2
Components of a Computer
System
hardware—electronic, mechanical, optical
devices.
software—programs.
Software saved on the storage media.
Software burned into hardware – Firmware
Users – Computer Users, machines, other
computers. Liveware?????
Operating Systems 3
Different types of Software
Application Software
Systems Software
Operating system
System utilities : utilities are smaller and
more simple than applications.
Operating Systems 4
Types of Software
Transient Component
Operating Systems 5
Input/Output Devices
Reading/writing data from a peripheral device is a complex task.
•Each device has its own hardware controller.
•Each device controller is managed by a separate software - device
driver
•Input/output is slow when compared with CPU processing.
Operating Systems 6
What is an operating
system(OS)?
A program that
acts as an
intermediary
between a user of
a computer and
the computer
hardware.
Operating Systems 7
What is an operating
system(OS)?
Operating Systems 8
What is an operating
system(OS)?
Operating Systems 9
Why we need an OS?
◦ Computer hardware is complex.
◦ Each type of Computer hardware is different.
◦ Instruction required to manage different hardware
components are different.
◦ Many processes are active at any given time and
compete for resources.
Operating Systems 10
Why we need an OS?
◦ Typically application programs have to do many independent
activities such as reading data from the console, reading data from
hard drive, perform various types of computations, print results on
the printer etc.
◦ Can a programmer expect to handle all hardware devices required for
his program by using the different instructions provided by the different
devices? For example when writing data to the hard disk should the
programmer worry about how the data is organized on the hard disk.
◦ Can a running program be allowed to change the code of another
program.
◦ Should a erroneous program halt the entire system.
◦ Should a single program be allowed to use CPU all the time.
◦ If two different programs try to access the same sharable resource
simultaneously, should it be allowed (example Printer)
Operating Systems 11
The role of an OS
Allow different applications to share resources of a
computer simultaneously(arbitration, multiplexing).
An operating system provides orderly and controlled
allocation of the resources among processes (jobs) that
are competing for them.
Implements useful abstractions (interfaces)
Implements common mechanisms for applications to use
hardware.
Hide complexities of hardware devices
Programmers need not be aware of the low level details of
the hardware devices.
Operating Systems 12
Main objectives of an OS
Convenience: Make the computer more convenient to
use
◦ Provide easy to use interface for a normal users.
◦ Hide the complexity of the hardware devices from the
application developer.
Operating Systems 13
What is an operating
system(OS)?
Kernel : Part of the
O/S that resides in
the main memory
all the time.
Operating Systems 14
Virtual Machines ?
Applications
Virtual Interfaces
Operating System
Physical Interfaces
Hardware
Operating Systems 15
Different types of OSs(Based on
the processor)
• Windows/Linux – For personal computers
• Unix,z/OS, OS/390, VM – For mainframes
• MacOs – For Macs
• X Server, Windows Server – Server Operating
Systems
• Symbian,Android – Embedded OS - For mobile
phones.
Operating Systems 16
Different types of OSs(Based on
the users)
• Single user – Allows only a single user to use the
OS at any given time. The use may run several
processes at the same time.
• Example - DOS
Operating Systems 17
Different types of OSs(Based on
the users and Tasks)
• Multi User- Allows multiple users to access a
computer system at the same time
• Example UNIX, Mainframe OSs and Internet
servers.
Operating Systems 18
Different types of OSs(Based on
the number of tasks)
• Single Task– Allows only one running program at
any given time.
• Multi Task - A multi-tasking operating system
allows more than one program to be running at
the same time.
Operating Systems 19
Different types of OSs
• Real Time – OS is designed to run applications with
very precise timing and with a high degree of
reliability.
• The main objective of real-time operating systems is
their quick and predictable response to events.
• These types of OS are needed in situations where
downtime is costly or a program delay could cause a
safety hazard.
Operating Systems 20
Services provided by an OS
Process Management
Storage (external) management
Memory management
I/O device management
Management of the File System
Networking
User Interface
Protection
Operating Systems 21
Services provided by an
OS….
Error detection and response
◦ Hardware errors: memory error or device failure
◦ Software errors: arithmetic errors, access forbidden
memory locations
Accounting
◦ collect statistics (billing)
◦ monitor performance
Operating Systems 22
Types of User Interfaces
Command Line Interface(CLI) – Character Based
Operating Systems 23
Types of User Interfaces
Graphical User Interface(GUI)
Operating Systems 24
OS and Processors
Can any OS run on any
processor?
Operating systems are software
Operating systems are designed
and developed for a specific CPU
family.
◦ Macintosh OS: Motorola 680xx,
PowerPC Gx, Intel
◦ DOS: Intel CPUs
◦ Windows 9x and XP: Intel 80386,
80486, and Pentium CPUs
◦ Linux: Intel CPUs
◦ MS NT & 2000: Intel CPUs
Operating Systems 25
Compatibility of Software
Question
Will software developed for one operating
system work on another?
For example will MS Word for Macintosh run
on a PC with Windows XP?
Operating Systems 26
Compatibility of Software
Question
Will software developed for one operating system
work on another?
Answer
No (unless there is special emulation software or
hardware). The software is typically developed
separately for each operating system.
Operating Systems 27
How the OS get loaded??
When the computer is switched on, CPU loads the boot program from
ROM(BIOS in PCs).
The main tasks of the boot program.
◦ Checks the essential hardware components and examine the machine
configuration (number of CPUs, capacity of main memory, type of hardware
devices).
◦ Builds a configuration structure.
◦ Loads the OS and provides it the configuration structure.
Operating Systems 28
Topics discussed
• Components of a computer system.
• Different types of software.
• What is an operating system(OS)?
• Input/Output devices.
• Need of an operating system.
• Main functions of an OS.
• Different Types of Oss
• How the OS get loaded
Operating Systems 29