INTRODUCTION TO
COMPUTING AND
PROGRAMMING
Lecture # 8
OPERATING SYSTEMS
By:
Dr. Fahad Rehman Abro
The first program that runs on your computer
is OS.
Acts as the interface between software and
hardware.
Introduction Set of program that manages functioning and
resources (hardware or peripheral devices).
Controls and monitor the execution
applications.
It performs basic tasks, such as input from
keyboard, sending output to the monitor,
managing files and directories.
Introduction
Windows, Linux, and Android are examples of
operating systems that enable the user to use
programs like MS Office, Notepad, and games on
the computer or mobile phone. It is necessary to
have at least one operating system installed in the
computer to run basic programs like browsers.
History of operating Systems
• The first computer, Z1, was made in 1936 – 1938. Unfortunately, this
computer ran without an operating system.
• Twenty years later, the first-ever operating system was made in 1956.
• In the 1960s, bell labs started working on building UNIX, the first
multitasking operating system.
• In 1977 the apple series came into existence. Apple Dos 3.3 was the first
disk operating system.
• In 1981, Microsoft built the first operating system called DOS by purchasing
86 – DOS software from a Seattle company.
• The most famous Microsoft windows came into existence in 1985 when
MS-DOS was paired with GUI, a graphics environment.
Functions of
Operating
System
Processor Management
• An OS manages the working of a processor by
allocating various jobs to it.
• It also ensures that each process and application
receives enough time by the processor to function
properly.
Memory Management
An OS manages the sharing
of the internal memory
(RAM, ROM, Cache) among
the multiple applications to
ensure the proper execution
of every process.
Device Management
• An OS controls the working of all the I/O
devices.
• Receives the requests from these
devices, perform the specific tasks, and
communicate backs to the requesting
processes.
File Management
• An OS keeps a track of the
information regarding the
creation, deletion, transfer,
copy and storage of files in
an organized way.
• Maintains the integrity of
the data stored in these
files; including directory
structures.
Security
The operating system provides various techniques which
assure the integrity and confidentiality of user data.
Following security measures are used to protect user
data:
• Protection against unauthorized access through login.
• Protection against intrusion by keeping Firefall active.
• Protecting the system memory against malicious access.
• Displaying messages related to system vulnerabilities.
Error Detection
• An OS checks the system from time-to-time
for any kind of external threat or malicious
software activity.
• It checks the hardware for any type of
damage, display and appropriate alert to the
users.
Job Scheduling
• In a multitasking operating system
where multiple programs run at the
same time, OS determines which
applications should run in what
order.
• It also checks how much should be
given to each task.
TYPES OF OPERATING
SYSTEM
Batch OS
Single User OS
Distributed OS
Multitasking OS OS TYPES
Network OS
Real-Time OS
Graphical User Interface OS
First OS for second-generation computers.
Does not directly interact with computer. An
operator takes up similar jobs & groups them
into a batch, and then these batches are
Batch executed one by one on first-come, first, serve
principle.
Operating
System
Examples of Batch OS: payroll system, bank
statements, data entry, etc.
Batch Operating System
Advantages of Batch OS
Execution time taken for similar jobs is higher.
Multiple users can share batch systems.
Managing large works becomes easy in batch systems.
The idle time for a single batch is very less.
Disadvantages of OS
It is hard to debug batch systems.
If a job fails, then the other jobs have to wait for an unknown time till the issue is resolved.
Batch systems are sometimes costly.
Single User OS
• Support only one user to do one thing
at one time.
• Most popular single user OS by
Microsoft were:
• MS Dos
• Windows version 3.1
• Windows 95
Distributed OS
• distributed operating system connects
multiple independent computers through
a communication channel.
• The computers are known as loosely
coupled systems since they have their own
CPU and memory.
• The systems can run processes of different
sizes and functions.
• A major benefit is users can access files on
remote systems, not just their own.
Distributed OS
• Remote access enables accessing resources
on any system connected to the network.
• Distributed OS are used widely today to
share information and resources.
• They allow load balancing by distributing
work across systems.
• If one system fails, others can still operate,
improving reliability.
• Resources like printers and storage devices
can be shared across the network.
• Advantages of Distributed OS
• Failure of one system will not affect the other systems
because all the computers are independent of each
other.
• The load on the host system is reduced.
• The size of the network is easily scalable as many
computers can be added to the network.
• As the workload and resources are shared therefore the
calculations are performed at a higher speed.
Distributed OS • Data exchange speed is increased with the help of
electronic mail.
• Disadvantages of Distributed OS
• The setup cost is high.
• Software used for such systems is highly complex.
• Failure of the main network will lead to the failure of the
whole system.
Multitasking OS
• Ability to perform more than one task at a single instant of time
• Capable of doing multiple tasks or executing process while using common
processing
• The time allotted to execute one task is called a quantum, and as soon as the time
to execute one task is completed, the system switches over to another task.
• Advantages of Multitasking OS
• Each task gets equal time for execution.
• The idle time for the CPU will be the lowest.
• There are very few chances for the duplication
of the software.
Multitasking • Disadvantages of Multitasking OS
OS • Processes with higher priority cannot be
executed first as equal priority is given to each
process or task.
• Various user data is needed to be taken care of
from unauthorized access.
• Sometimes there is a data communication
problem.
Network OS
• Run on servers managing network functions
• Enable sharing of files, apps, printers, etc. over LANs
• Centralized control over network resources
• Facilitate collaboration between network users
• Messaging platforms for communication
• Manage network storage, backups, restoration
• Monitor performance and troubleshoot issues
• Examples: Windows Server, Mac OS X Server, Linux distros like Red Hat, Novell NetWare, UNIX OS.
• Advantages of Network OS
• New technologies and hardware can easily upgrade the systems.
• Security of the system is managed over servers.
• Servers can be accessed remotely from different locations and systems.
• The centralized servers are stable.
• Disadvantages of Network OS
• Server costs are high.
• Regular updates and maintenance are required.
• Users are dependent on the central location for the maximum number of
operations.
Network OS
Real Time OS
• Designed for real-time systems with precise timing constraints
• Useful when many events occur within strict deadlines
• Common in embedded systems like medical devices, industrial control
systems, robotics, etc.
• Limited or no virtual memory in favor of performance
• Examples include VxWorks, QNX, FreeRTOS, RTEMS, LynxOS, PikeOS
Real Time OS
• Key metrics are responsiveness, reliability, precision timing
• Main functions: fast interrupt handling, task scheduling, I/O control
• Challenging to program due to tight timing constraints
• Overall, enable real-time monitoring and control of time-critical systems
Advantages of Real-Time OS
• It provides more output from all the resources as there is maximum utilization of
systems.
• It provides the best management of memory allocation.
• These systems are always error-free.
• These operating systems focus more on running applications than those in the queue.
• Shifting from one task to another takes very little time.
Disadvantages of Real-Time OS
Real Time OS • System resources are extremely expensive and are not so good.
• The algorithms used are very complex.
• Only limited tasks can run at a single time.
• In such systems, we cannot set thread priority as these systems cannot switch tasks
easily.
Examples of Real-Time OS: Medical imaging systems, robots, etc.
Based on Graphics and
Interactive in nature
Graphical Menus and Icons are available
User Interface to perform operations
OS Access the operations by just
clicking
Windows, Mac, Linux
Difference in
32-bit and
64-bit