Chapter #1 Operating System
Chapter #1 Operating System
Types of O.S
DOS O.S
Windows
UNIX O.S
Mac O.S
DOS Operating System
DOS : Disk Operating System
First Operating System Used for PC
Single-User Operating System
Single Task Operating System
Developed 1980 by Microsoft when IBM assigned a
project to Microsoft for the development of 16-bit OS
Some most commonly used Dos commands are
below
CD: Change the current directory
Copy : Copies a file
DEL: Delete a file
EDIT: Start an editor to create or edit plain text files.
Format: format a disk to accept DOS files
Help: Displays Information about a command
Windows OS
Is a software that acts as an interface between
computer hardware components and user
Most commonly used OS
Base on GUI
History of windows
First window operating system Window 1.0 lunch
on Nov 20 1985
Window 2.0 lunched December 9 1987 supported
desktop icons
Window 95 lunched on august 24 1995
Window 98 XP lunched june 25 1998
Vista October 25 2001 and 2006
Window 7 lunched October 2009
Window 8 lunched October 2012
Features of windows OS
Graphical Interface
User Friendly
Best for running PCs
Not expensive for home users
Supported by most of the software's.
UNIX Operating System
Multitasking and multi-user operating system
computer
Developed by Dennis Ritchie and their group
Supported GUI
Types of Operating System
Batch Processing Operating System:
Is the type of operating system which collects
jobs in the batches before being processed by the
CPU
Jobs store in Queues until the computer ready for
processing
When fetches a job from the job queue then there
no interaction of user with computer to interrupt
the processing job until completion
Students exam data store in Batch processing
Electricity and telephone bills are processed
under the batch processing system
Multiprogramming operating system
in Batch Os has the problem that processor often remain idle
when the process under execution due to external events
Input output device are slow as compare to processor
For the elimination this problem developed Multi-
programming Operating system
Allow multiple computer programs simultaneously in single
processor
Example typing in Ms word with listening to music with
background internet explore is downloading some pages
from internet.
Working in window 7, XP and Linux environment is
multiprogramming
Make efficient use of the processor by interleaving multiple
actives jobs
Utilize and increase CPU execution
Multi-Tasking Operating System
Used to perform multiple task/Program on CPU at a time
Example program 1, program 2 ….. Program 5 to run
same time on CPU
Multiple users run on single CPU User 1 , User 2 …..
User 5
Using-time sharing to assign time for program or user
Switch program or user very fast speed
Time sharing system also called time Slice or Quantum
Each program/process has same time
Working on Queue
Process/program assign time expires and the process
still remains incomplete its added at the back of the
ready queue for its next turn
Advantages of Time sharing operating system
Minimizes response time
Supports user interactivity
Process doesn’t wait for long time
All process get equal chances for execution
Time sharing Vs Multitasking Operating system
Multi-Tasking operating system is used in a
broad sense vs Time sharing OS have a
short time slices given to each process
Multi tasking Os there is no time slice
Multi tasking Os the process residing in the
system
Time sharing Vs Parallel Processing operating
system
Time sharing operating system multiple task perform by
single processor
Every user provide time slice
Too much load on single process
Heat up processor
Slow processing
Parallel process having multiple processor to perform
single or multiple task or Users
No time sharing
Time sharing example single cashier and users/tasks
having two line queue
Parallel process example two cashier and user/task having
two line queue
Ms word typing ,grammar checking same time etc at same
time in parallel processing
High speed processor
Real time operating system
Input given to system and produce
output/Response in limited time
Use for special purpose application software
Industrial purpose
Embedded system( hardware base system)
Example ATM Machine,
Microwave oven response in limited time
Space research use to find rocket position etc
Multi-processor operating system
System having multiple Central Processing Unit
And Operating system install on Multiple Central
Processing Unit is called Multiple processing
operating system
CPU-1 CPU-1 etc using single Memory
/Input/output /busess to share resources
To perform multiple task in short time because
run in parallel on multiple Processor
Reliable in the situations of failure of one
processor
Fail one CPU running execution continues
Example at a time songs listing , word typing,
downloading etc
Advantages and disadvantages of Multiprocessor Operating
System
Increased Processing Power – biggest advantages of a multiprocessor
system, handle more tasks at once, means that it can handle more
complex tasks, such as video editing or rendering, more quickly and
efficiently
Improved Performance –improve performance by distributing tasks
among different processors, This means that each processor can focus on a
specific task, which can lead to faster processing times and better overall
performance
Cost-Effective –cost-effective, as it can provide better performance
without the need for expensive individual processors,
Disadvantages of Multiprocessor System
Increased Complexity – One of the biggest disadvantages of a
multiprocessor system, more complex than a single-processor system,
because it requires specialized software and hardware to manage the
multiple processors, which can be more difficult to set up and maintain
Higher Cost – more expensive than single-processor systems
Compatibility Issues –it can have compatibility issues with certain
software and hardware, This is because some programs may not be
designed to work with multiple processors, which can lead to errors and
other issues
Power Consumption –consume more power than single-processor
systems, which can lead to higher energy bills, require more energy to run
Key Difference Between Multiprocessing and
Multiprogramming
Multiprocessing refers to the availability of more than one
processor per system that may execute multiple sets of
instructions simultaneously vs
Multiprogramming is the process of running multiple programs in
the main memory at the same time
The processing of jobs takes less time Vs
The processing of the jobs takes longer
More than one CPU is required Vs
Only one CPU is required in multiprogramming
This allows for the simultaneous execution of many processes Vs
One process can be run at a time in this method
Parallel Processing in Operating System
The processor works simultaneously in the system
Task is divided into subparts
subparts are then distributed among the available
processors in the system
completes the job on the shortest possible time
Consider the single-processor system as the one-man
company. In a one-man company the owner takes a task
finishes it and further takes another task to accomplish
if the owner has to expand his business, he has to hire
more people. Hiring more people will distribute the
workload and allow him to finish the jobs faster. He will
also be able to increase his capacity for doing jobs. Or we
can say he will able to accept more jobs than earlier. This
strategy is similar to parallel processing
Distributed Operating System
Several computer systems connected through a single
communication channel
These systems have their individual processors and Memory
These processors communicate through high-speed buses
Individual systems that connect through a single channel are
considered as a single unit
Resources should b shared
It hides where is data and how to access the data
Advantages of Distributed OS
The load on the system decreases
If one system stops it will not affect the other
The system shares a workload that makes calculations easy
Disadvantages of Distributed OS
The cost for set up is more.
Failure of the main system will affect the whole system.
Programming is complex.
Embedded Operating System
Specialized operating system (OS) designed to perform a
specific task for a device that is not a compute
Designed for use in embedded computer systems
limited features
Also refers to a "real-time operating system“
Perform specified tasks for non-computer devices
Allows the executing programming codes that deliver
access to devices to complete their jobs
Design for small Machines
The embedded operating system is commonly used in
various areas, including car navigation systems, multimedia
players, airplane navigation systems, and medical
equipment
Single- User Operating and Multi-User Operating Systems
Operating system can be divide in to two categories
Single User and Multiple Operating System
Single operating system useable by single
allows a single user to perform only one task at a time
Execute a single process at a time on a single processor
Example Batch Operating System
Multi_User Operating System
Allows the permission of multiple users for accessing a
single machine at a time
Multiple users accessing a single machine at a time
Example Time sharing Operating System, Unix etc.
Operating System Functions
An operating system is a piece of software that
manages files, manages memory, manages
processes, handles input and output, and controls
peripheral devices like disk drives and printers,
among other things
Operating system Functions are below:
Process Management
Memory Management
File Management
Input/output System Management
Secondary Storage Management
Network Management
Protection System
Command-interpreter
Process Management
The operating system determines which
processes have access to the processor
how much processing time every process
has in a multiprogramming environment
It keeps track of how processes are
progressing.
A traffic controller is a program that
accomplishes this duty.
Allocates a processor-based CPU to a
process. When a process is no longer
needed, the processor is de-allocated
Memory Management
The operating system is in charge of managing the
primary memory
The main memory consists of a vast array of bytes or
words, each of which is allocated an address
A program must first be loaded into the main memory
before it can be executed
For memory management, the OS performs the
following tasks:
The OS keeps track of primary memory – meaning,
which user program can use which bytes of memory,
memory addresses that have already been assigned, as
well as memory addresses yet to be used.
The OS determines the order in which processes would
be permitted memory access and for how long in
multiprogramming.
It allocates memory to the process when the process
asks for it and de-allocates memory when the process
exits or performs an I/O activity.
File Management
It organized into directories for efficient or
easy navigation and usage
These directories may contain other
Protecting system
Command Interpreter
computer
2nd is GUI Graphical User Interface using Graphics to communicate
with computer
Process Management
Functions Of OS
Process Management
Process is the execution of a program that performs the actions specified in that
program
The OS helps you to create, schedule, and terminates the processes
which is used by CPU
A process created by the main process is called a child process
controlled with the help of PCB(Process Control Block). You can consider
it as the brain of the process
The Process is in Sequential Fashion(mean Codding running in 1 st line
the 2nd then it end)
There are Five states in operating system, they are:
New State: When a process is first created or is initialized by the
operating system it is in the new state
In this state, the process is being prepared to enter the ready state
Ready State: When a process is ready to execute it is in the ready
state.
In this state, the process is waiting for the CPU to be allocated to it so
that it can start executing its instructions
A process can remain in the ready state for an indeterminate period,
waiting for the CPU to become available
Functions Of OS
Running State: When the CPU is allocated to a process, it enters the
running state
the process executes its instructions and uses system resources such as
memory, CPU, and I/O devices
one process can be in the running state at a time, and the operating
system
Blocked State/Waiting state: Sometimes, a process needs to wait for a
particular event, such as user input or data from a disk drive
In such cases, the process enters the blocked state
The process is not using the CPU, but it is not ready to run either
The process remains in the blocked state until the event it is waiting for
occurs
Terminated State: The terminated state is reached when a process
completes its execution or terminates by the operating system
In this state, the process no longer uses any system resources, and its
memory space is deallocated
Suspended State: When a process is temporarily removed from the
main memory and is stored on the disk to free up memory,
The process is not actively executing, and its memory space is saved on
the disk
When the process is needed again, it is loaded back into the main
memory and resumes execution
Process State Diagram
Processes Vs Threads
Process: Program In Execution
Has its own data and files (P1 P2)
Process run is separate memory
No sharing of data
Every process has its own data and files
Processes run is separate memory space
memory