0% found this document useful (0 votes)
265 views7 pages

OS 1 Process Management

This document discusses different types of operating systems including batch, time-sharing, distributed, network, and real-time operating systems. It describes the key characteristics of each type, such as batch operating systems running jobs in batches managed by an operator, time-sharing systems giving each user some CPU time through multitasking, distributed systems allowing remote access across connected systems, network systems managing resources over a server, and real-time systems having strict time constraints for tasks like air traffic control. The document also covers the two main modes that operating systems use - user mode for running applications and kernel mode for privileged instructions like interrupts and I/O handling.

Uploaded by

Ritesh Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
265 views7 pages

OS 1 Process Management

This document discusses different types of operating systems including batch, time-sharing, distributed, network, and real-time operating systems. It describes the key characteristics of each type, such as batch operating systems running jobs in batches managed by an operator, time-sharing systems giving each user some CPU time through multitasking, distributed systems allowing remote access across connected systems, network systems managing resources over a server, and real-time systems having strict time constraints for tasks like air traffic control. The document also covers the two main modes that operating systems use - user mode for running applications and kernel mode for privileged instructions like interrupts and I/O handling.

Uploaded by

Ritesh Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 7

OPERATING SYSTEMS

PROCESS MANAGEMENT
1
Introduction to Operating System
An Operating System is software responsible for performing all the basic tasks in a computer
system like managing files, processes, and memory. An operating system behaves as a manager
for all the resources, hence also known as a resource manager. In simple words, an operating
system is defined as an interface between user and hardware.

1. TYPES OF OPERATING SYSTEMS


The following are some of the commonly used operating systems:
1.1. Batch Operating System –
Batch operating systems do not communicate directly with computers. There exists an
operator who collects all similar kinds of jobs together (i.e., jobs having the exact
requirement) and then groups them into batches. The operator is responsible for sorting
appointments of similar needs.
Advantages of Batch Operating System:
● Batch operating system processors know the time it takes to complete a process. It
is very tough to guess the time needed by any process to complete.
● Batch operating systems are shareable between multiple users.
● It has a concise ideal time.
● Manageable operating system, the large amount of work can be managed easily.
Disadvantages of Batch Operating System:
● The computer’s operator should be smart enough to differentiate between different
processes with similar needs.
● Debugging is tough.
● It is expensive and less cost-efficient
● The system can get into starvation mode if any job fails.
Examples: It is used in Payroll System, Bank Statements etc.
1.2. Time-Sharing Operating Systems –
Batch operating system processors know the time it takes to complete a process. Each
user gets some time on the CPU if they use a single system. These systems are also
called Multitasking Systems. The unit of time that each process takes are called
quantum. After this period, the operating system will move on to the next task.
Advantages of Time-Sharing OS:
● Every process gets equal time to execute.
● Software duplication chances are low.
● CPU idle time may be reduced.
Disadvantages of Time-Sharing OS:
● The system is not reliable
● Difficult to maintain security and integrity of users program and data.
● It can cause data communication issues.
Examples: It is used in Multics, Unix etc.
1.3. Distributed Operating System –
Distributed operating systems are a recent advancement in computer technology, and
these operating systems are being broadly accepted all over the world. Various
independent interconnected computers communicate with each other using a shared
communication network. Independent (autonomous) systems have their own CPU and
memory uni. These systems are also known as loosely coupled systems or distributed
systems.
Distributed system’s processors may differ in size and functioning. The major advantage
of loosely coupled operating systems is that one user can access the software or files
which are not actually present on his system but present on some other system connected
within this network, i.e., remote access of files and software and other data is enabled
within the devices connected within that network.
Advantages of Distributed Operating System:
● If one system fails it will not affect the other systems in the network communication,
all the systems are independent of each other.
● Electronic mail (e-mail) increases the data transmission speed.
● Sharable resources result in fast and durable computation.
● It reduces the load on the host system.
● Scalable in nature, i.e., so many computer systems can be added once a system is
being installed.
● Data processing speed is high, so delay in data processing is reduced.
Disadvantages of Distributed Operating System:
● If the main host fails, the entire network will be hampered.
● It doesn’t have any well-defined language yet for establishment.
● Highly expensive and not readily available.
● Complex system design.
● Very difficult to understand.
Examples: It is used in LOCUS etc.
1.4. Network Operating System –
Network OS runs on a server and can manage data, users, applications, groups, security,
and other network functions. These types of operating systems share files, applications,
printers, security, and other network functions over a small network. One important
aspect of Networked operating systems is that all the users are aware of the underlying
configuration of the system, of all the users within the network, their individual
connections etc. and these computers are also known as tightly coupled systems.
Advantages of Network Operating System:
● Network OS have highly stable centralized servers
● All the security issues are handled through servers.
● Scalable and reliable systems, we can add new technologies and can up-grade
hardware easily.
● Remote access of the server is possible from various locations and various kind of
systems.
Disadvantages of Network Operating System:
● Servers are costly.
● Each user must depend on a central server for most operations.
● Regular maintenance and updates are required.
Examples: It is widely used in Microsoft Windows Server 2003, Microsoft Windows Server
2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD etc.
1.5. Real-Time Operating System –
In real-time operating systems, a small-time interval is required to process and respond
to input data. This small-time interval is called response time.
These OSs are used when time requirements are very strict, like in missile systems, air
traffic control systems, robots etc.
The real-time operating system is further divided into two types:
● Hard Real-Time Systems: These OSs are designed for applications where time
constraints are very strict, and even the shortest possible delay is not acceptable. Such
operating systems are built for life-saviour applications like automatic parachutes or
airbags, which are needed to be readily available in case of an accident. Virtual
memory is never found in these systems.
● Soft Real-Time Systems: These OSs are for those applications where time-constraint
is less strict.
Advantages of RTOS:
● Maximum Consumption: It utilizes each device and consumes almost all resources.
● Task Shifting: Time assigned for shifting tasks, i.e., switching between different
processes in these systems is very less. As with previous systems, switching from
one job to another takes about 10 microseconds, while on newer systems it only
takes 3 microseconds.
● Focus on Application: Real-time OSs focus on running applications and give less
importance to the applications present in the queue.
● Real-time operating system in embedded systems: It can be used in embedded
systems such as transport and others, because the size of the program in the RTOS
is small.
● Error Free: RTOS need to be error-free, and they are free from errors.
● Memory Allocation: Memory allocation is perfectly managed in RTOS.
Disadvantages of RTOS:
● Limited Tasks: Very few tasks can run simultaneously, and it concentrates on few
applications to avoid errors.
● Use heavy system resources: Sometimes, it makes use of expensive resources.
● Complex Algorithms: Complex Algorithms - Use a complex algorithm that is
difficult to write and difficult to implement.
● Device driver and interrupt signals: It requires specific device drivers and
interrupts signals so that it can give a response earliest to the interrupts.
● Thread Priority: It is best not to prioritize a thread because these systems change
tasks very little.
Examples: Scientific experiments, medical imaging systems, industrial control systems,
weapon systems, robots, air traffic control systems, etc.

2. MODES OF OPERATION IN OS

Operating system operates in two modes; one is known as User mode and the other is Kernel
mode.
2.1. User Mode
The system is considered to be in user mode when the operating system launches a
custom application, such as a word processor control. A switch to kernel mode from
user mode occurs when application requests help from the operating system, or a
system call or interrupt occurs.
In the user mode the mode bit is set to 1. Mode bit is changed from 1 to 0 when
changed from user mode to kernel mode.
2.2. Kernel Mode
When the system starts up or boots in the system, it is in kernel mode and then the OS
is loaded, it executes all applications in the user mode. There are some privileged
instructions on computers that can only be executed in kernel mode. These privileged
instructions are interrupts, handle input and output, and so on. If privileged instructions
are executed in user mode, it will be illegal, and a trap is generated.
In the kernel mode the mode bit is set to 0. Mode bit is changed from 0 to 1 when
switching from kernel mode to user mode.
Necessity of Dual Mode (User Mode and Kernel Mode) in Operating System
The lack of a dual mode in an operating system can cause some serious problems. Some
of these issues are −
A running user program can accidentally wipe out from the system by overwriting the
running program with user data.
Multiple processes can be overwritten in the same system at the same time, which will
give disastrous results.
Such issues could have occurred in the MS-DOS OS which had no mode bit so no dual
mode.

3. PROCESS LIFE CYCLE

Fig-2: Process state Diagram


1. New State-
New state:- When a program is present in secondary memory and starts executing, it is
said to be in a new state.
2. Ready State-
When a process is loaded into the main memory and is ready for execution, so the process
moves from a new state to a ready state
The process waits for its execution by the processor in the ready state.
In a multiprogramming environment, many processes may be present in the ready state
at the same time.
3. Run State-
A process moves to run state from ready state after CPU is assigned to the process for
execution.
4. Terminate State-
• A process moves to terminate state from run state after its execution is completed.
• After entering the termination state, the context (PCB) of the process is removed by the
operating system.
5. Block/Wait State-
• A process moves to block or wait state from run state if it requires an I/O operation or
some blocked resource during its execution.
• After the I/O operation is completed or a blocked resource becomes available, the
process moves to the ready state again for the execution.
6. Suspend Ready State-
• A process moves to suspend ready from ready state if a process arrives with higher
priority and it must be executed but the main memory is full.
• Moving a process with lower priority from ready state to suspend ready state makes space
for a higher priority process in the ready queue.
• Process remains in the suspended ready state until the main memory becomes
available to store the process.
• Once the main memory is available, the process is brought back to the ready state.
7. Suspend Wait State-
• A process moves to suspend wait state from wait state if the main memory is full and a
process with higher priority has to be executed.
• Moving a process with lower priority to suspend wait state from waiting state makes space
for higher priority processes in the ready queue.
• After the resource becomes available, the process is moved to the suspend ready state.
• Once the main memory is available, the process is brought back to the ready state.

You might also like