You are on page 1of 19

OPERATING SYSTEM

• Abbreviated as OS, and is system software


• It is a collection of software (both application and system, often referred to as package
software
• It is an intermediary between a user and computer hardware
• It provides a user an interface (GUI/ CLI /CUI) so that the user can interact with a
computer (or any other electronic device) easily and conveniently)
• The most important functionality of OS is allocation & de-allocation of computer
resources (memory, processor, files, IO devices etc.)
• Some examples include are Windows, Unix, Linux, Xenix, MS-DOS, Macintosh, Solaris,
Red Hate etc.
TYPES OF OPERATING SYSTEM
• There are two main types of OS;
1. Single User OS
2. Multiuser OS

Single User OS
• Further divided into the following
1. Single User, Single Task OS
2. Single User, Multitask OS
Single User, Single Task OSs
• As the name indicates, they enable one user to perform one task at a time.
The example included is MS-DOS

Single User, Multitask OSs


• They enable a single user to perform multiple tasks simultaneously.
The examples included are Windows, Unix, Linux etc.
TYPES OF OPERATING SYSTEM
Multiuser Multitask OS
• This type of OS serves more than one user at a time
• Wherein each user can perform multiple tasks simultaneously
Linux & Unix are examples
TYPES OF OPERATING SYSTEM
Batch OS
• Similar jobs are batched together
• Before execution, all jobs are stored in job queues
• The CPU fetches a job, one after another, from a job queue
• In these OSs, users do not interact with a computer directly
• Users prepare his/her jobs on an off-line devices like punch cards and submit them to the
computer operator.
• An operator collects jobs having the same requirement and group them into batches

Disadvantages
• A processor remains idle due to
external events
• Throughput decreases
TYPES OF OPERATING SYSTEM
Multiprogramming OS
• In multiprogramming OSs, multiple programs are executed simultaneously.
• In multiprogramming environment, several programs, aka jobs, are active in main
memory i.e. they are ready to run.
Types:
• Pre-emption: a process is forcefully removed from the CPU as in time-sharing or
multitasking.
• Non pre-emption: a process is not removed until its completion.

Advantages
• Efficient use of a processor by interleaving multiple jobs
• Increased CPU utilization (no idleness)
• Better memory utilization

Degree of Multiprogramming
- The number of processes that can reside in the ready state.
TYPES OF OPERATING SYSTEM
Multitasking OS
• It is an extension to multiprogramming
• The only difference is switching of jobs;
• In multitasking OS, OS switches jobs quickly on a single processor.
Examples: Windows 2000, Solaris, Windows XP etc.

Time-Sharing OS
• Basically, time sharing OS is an extension to multitasking OS;
• Time-sharing OS and Multitasking OS are the same except that processes are assigned to
the CPU into fixed small slices / quantum;
• Multiple users access the system simultaneously through their terminals as well;

Multitasking vs. Time-Sharing OSs


▪ time-sharing OSs have a short time slices given to each process whereas
▪ multitasking OSs have no time slice assigned to each process;
TYPES OF OPERATING SYSTEM
Advantages
• Minimizes response time
• Reduces CPU idleness or idle time
• All process gets equal change for execution
• A process does not have to wait for a long time

Disadvantages
- Data Communication problem
- Reliability
- Security
TYPES OF OPERATING SYSTEM
Real-Time OS
• This type of OS provides a required level of service in a bounded-response time.
• It executes jobs/processes within time constraints.

Types:

Hard Real-Time OS
• guarantees that critical tasks complete on time
• secondary storage is limited or missing and the data is stored in ROM
• virtual memory is almost never found

Soft Real-Time OS
• Soft real-time systems are less restrictive.
• a minor delay (in microseconds) is acceptable.
TYPES OF OPERATING SYSTEM
Distributed OS
• This type of OS manages a group of independent computers (networked together)
• It makes them appear to users as a single computer
• They are useful where distributed applications are running on multiple applications.
• Processors of DOS communicate with each other.
• Also referred to as loosely coupled system.
Example: LOCUS
DIFFERENCE BETWEEN
Process Thread

A program under execution by the A dispatchable unit of a process that


processor (CPU) is called a process. can be executed sequentially and is
Or interruptible.
An instance of a program running on a Or
computer is called a process. A separate flow of a process.
Or
A lightweight process.
A process has one or more threads. All threads lie within a process(s).

A process requires more resources. A thread requires relatively less


resources.

A process requires more time for A thread requires less time for creation.
creation, and the same for termination.
Processes are independent; they don’t Threads may share some memory
share memory. between peer threads.
PROCESS MODEL
Seven states process model has the following states.

1. New (a process is about to be created)


2. Ready (a process is created and is ready to be assigned to the CPU for processing)
3. Running (a process is under execution)
4. Blocked/Waiting (waiting for some external event to happen such as IO completion etc.)
5. Ready Suspended (lack of main memory caused processes to move to secondary
memory)
6. Blocked/Waiting Suspended (processes performing IO are moved from blocked state to
ready suspended due to lack of main memory)
7. Terminate / Exit (a process has finished its execution or is dead / killed)
PROCESS MODEL
FUNCTIONS OF OS
The major functions performed by an OS are listed below:
• Memory Management
• Process Management
• Processor Management
• IO Devices Management
• Secondary Storage Devices Management
• Network Management
• Security / Protection
• Command line Interpreter
• Program Execution
• Handling I/O operations
• Error Detection and Correction etc.
FUNCTIONS OF OS
Memory Management
• MM refers to the management of primary memory (RAM & ROM)
• Following activities are performed w.r.t MM
1. It keeps tracks MM i.e. what parts of it are un used, and by whom; and what parts of it
are free / not in use
2. It decided which process will get memory, when and how much.
3. Allocates memory when a process makes a request
4. De-allocates when the process no longer needs it
FUNCTIONS OF OS
Processor & Process Management
• In multiprogramming environment, OS decides which process gets a processor, when and
for how much time; this is called process scheduling.
• Following activities are performed w.r.t PM
1. It keeps tracks the CPU (processor) and a status of a process. A program responsible for
this tracking is called traffic controller.
2. Allocates the CPU to a process
3. Deallocates when the processor is no longer required.
4. It also manages processes switching
FUNCTIONS OF OS
Processor & Process Management
• In multiprogramming environment, OS decides which process gets a processor, when and
for how much time; this is called process scheduling.
• Following activities are performed w.r.t PM
1. It keeps tracks the CPU (processor) and a status of a process. A program responsible for
this tracking is called traffic controller.
2. Allocates the CPU to a process
3. Deallocates when the processor is no longer required.
4. It also manages processes switching
FUNCTIONS OF OS
IO Devices Management
• OS manages IO devices via their respective device drivers;
• Device Manager is a major component of OS that manages these devices
• Perform the following activities:
1. Keeps tracks all connected devices; a program responsible for this is called I/O
Controller.
2. Decides which process will get the device, when and for how much time.
3. Allocates the device when a process makes a request
4. De-allocates when the process no longer wants it

Note: A process may request for more than one devices at a time
FUNCTIONS OF OS
Files Management
• Data stored in a computer in files.
• These files are arranged and organized in directories and sub-directories.
• These files are arranged in such manner for efficient/easy navigation and usage.
• File Manager is a tool responsible for managing these files.
• It keeps track where information/data is stored, user access settings, status of every file
etc.
• It is also responsible for manipulation of data in files etc.
• These facilities are collectively known as file system.
FUNCTIONS OF OS
Other functions performed by OS are
– Secondary storage management
– Security
– Network Management etc.

You might also like