OS2
OS2
OS2
Shell
Shell handles user interactions. It is the outermost layer of the OS and
manages the interaction between user and operating system by:
Prompting the user to give input
Interpreting the input for the operating system
Handling the output from the operating system.
Shell provides a way to communicate with the OS by either taking the
input from the user or the shell script. A shell script is a sequence of
system commands that are stored in a file.
What is Kernel?
The kernel is the core component of an operating system for a
computer (OS). All other components of the OS rely on the core to
supply them with essential services. It serves as the primary interface
between the OS and the hardware and aids in the control of devices,
networking, file systems, and process and memory management.
Functions of kernel
The kernel is the core component of an operating system, which acts
as an interface between applications, and the data is processed at the
hardware level.
1. Input-Output management
2. Memory Management
3. Process Management for application execution.
4. Device Management
5. System calls control
Earlier, all the basic system services like process and memory
management, interrupt handling, etc., were packaged into a single
module in the kernel space. This type of kernel was called the
Monolithic Kernel. The problem with this approach was that the
whole kernel had to be recompiled for even a small change.
Batch OS
Distributed OS
Multitasking OS
Network OS
Real-OS
Mobile OS
Batch OS
Batch OS is the first operating system for second-generation
computers.
This OS does not directly interact with the computer.
Instead, an operator takes up similar jobs and groups them
together into a batch, and then these batches are executed one
by one based on the first-come, first, serve principle.
Advantages of Batch OS
Disadvantages of OS
If a job fails, then the other jobs have to wait for an unknown
time until the issue is resolved.
Advantages of Distributed OS
Failure of one system will not affect the other systems because
all the computers are independent of each other.
Disadvantages of Distributed OS
Failure of the main network will lead to the failure of the whole
system.
Advantages of Multitasking OS
There are very few chances for the duplication of the software.
Disadvantages of Multitasking OS
Advantages of Network OS
Disadvantages of Network OS
2. Soft real-time OS
The soft real-time OS is the operating system for applications
where time constraint is not very strict.
In a soft real-time system, an important task is prioritized over
less important tasks, and this priority remains active until the
completion of the task.
Furthermore, a time limit is always set for a specific job, enabling
short time delays for future tasks, which is acceptable.
For Example, virtual reality, reservation systems, etc.
Advantages of Real-Time OS
Disadvantages of Real-Time OS
Mobile OS
A mobile OS is an operating system for smartphones, tablets,
and PDA’s.
It is a platform on which other applications can run on mobile
devices.
Advantages of Mobile OS
Disadvantages of Mobile OS
Examples of Mobile OS: Android OS, ios, Symbian OS, and Windows
mobile OS.
Single-tasking vs. multi-tasking operating systems:
Single-tasking operating systems allow only one program to run at a
time, while multi-tasking operating systems allow multiple programs
to run simultaneously.
Processes are basically the programs that are dispatched from the
ready state and are scheduled in the CPU for execution. PCB(Process
Control Block) holds the concept of process. A process can create
other processes which are known as Child Processes. The process
takes more time to terminate and it is isolated means it does not share
the memory with any other process.
The process can have the following states: new, ready, running,
waiting, terminated, and suspended.
1. Interrupts
2. Multitasking
3. User/Kernel switch
Interrupts: When a CPU requests that data be read from a disc, if any
interruptions occur, context switching automatically switches to a
component of the hardware that can handle the interruptions more
quickly.
A handle has been added to the PCB to have the system ready to
run.
It brings the new process to the ‘Ready State’. It controls the Degree
of Multi-programming, i.e., the number of processes present in a
ready state at any point in time. It is important that the long-term
scheduler make a careful selection of both I/O and CPU-bound
processes. I/O-bound tasks are which use much of their time in input
and output operations while CPU-bound processes are which spend
their time on the CPU. The job scheduler increases efficiency by
maintaining a balance between the two. They operate at a high level
and are typically used in batch-processing systems.
It is responsible for selecting one process from the ready state for
scheduling it on the running state. Note: Short-term scheduler only
selects the process to schedule it doesn’t load the process on
running. Here is when all the scheduling algorithms are used. The CPU
scheduler is responsible for ensuring no starvation due to high burst
time processes.The dispatcher is responsible for loading the process
selected by the Short-term scheduler on the CPU (Ready to Running
State) Context switching is done by the dispatcher only. A dispatcher
does the following:
1. Switching context.
Medium-Term Scheduler
It is a process-
It is a job scheduler It is a CPU scheduler
swapping scheduler.
Speed lies in
Generally, Speed is
Speed is the fastest between both short
lesser than short
among all of them. and long-term
term scheduler
schedulers.
Running
1. A newly created process joins the system in a running state
when it is created.
Not running
Independent process.
Co-operating process.
An independent process is not affected by the execution of other
processes while a co-operating process can be affected by other
executing processes. Though one can think that those processes,
which are running independently, will execute very efficiently, in
reality, there are many situations when co-operative nature can be
utilized for increasing computational speed, convenience, and
modularity. Inter-process communication (IPC) is a mechanism that
allows processes to communicate with each other and synchronize
their actions. The communication between these processes can be
seen as a method of co-operation between them. Processes can
communicate with each other through both:
1. Shared Memory
2. Message passing