Os PDF
Os PDF
Os PDF
Operating System (OS) is basically a so ware program that manages and handles all
resources of a computer such as hardware and so ware. The first OS was introduced
in the early 1950s known as GMOs. An OS is responsible for managing, handling, and
coordinating overall activities and sharing of computer resources. It acts as an
intermediary among users of computer and computer hardware.
Functions of OS:
There are many functions of the OS. Some of the important functions of OS are given
below:
Types of OS:
Batched OS (Example: Payroll System, Transactions Process, etc.)
Multi-Programmed OS (Example: Windows O/S, UNIX O/S, etc.)
Timesharing OS (Example: Multics, etc.)
Distributed OS (LOCUS, etc.)
Real-Time OS (PSOS, VRTX, etc.)
Benefits:
Such systems are used widely nowadays to improve performance in systems
that are running multiple programs concurrently.
By increasing the number of processors, a greater number of tasks can be
completed in unit time.
One also gets a considerable increase in throughput and is cost-effective also as
all processors share the same resources.
It simply improves the reliability of the computer system.
5. What is GUI?
GUI (Graphical User Interface) is basically a type of user interface that allows users to
use graphics to interact with OS. GUI is created because it is more user-friendly, less
complex, and easier to understand rather than a command-line interface. Its main
goal is to increase efficiency and ease of use. Instead of having to memorize
commands, users can just click on a button to simply execute the procedure.
Examples of GUI include Microso Windows, macOS, Apple’s iOS, etc.
Real Time Operating System (RTOS) is an operating system that is used for real-time
applications i.e., for those applications where data processing should be done in a
fixed and small measure of time. It performs much better on tasks that are needed to
be executed within a short time. It also takes care of execution, monitoring, and all-
controlling processes. It also occupies less memory and consumes fewer resources.
Types of RTOS:
Hard Real-Time
Firm Real-Time
So Real-Time
RTOS is used in Air traffic control systems, Anti-lock Brake Systems, and Heart
pacemakers.
Independent Process
Cooperative Process
Multiple threads running in a process share: Address space, Heap, Static data, Code
segments, File descriptors, Global variables, Child processes, Pending alarms, Signals,
and signal handlers.
Each thread has its own: Program counter, Registers, Stack, and State.
States of Process:
Different states of the process through which process goes are given below:
New State: In this state, a process is just created.
Running: In this state, the CPU starts working on the process’s instructions.
Waiting: In this state, the process cannot run because it just waits for some
event to occur
Ready: In this state, the process has all resources available that are required to
run but it waits to get assigned to a processor because CPUs are not working
currently on instructions passed by the process.
Terminate: In this state, the process is completed I.e., the process has finished
execution.
FCFS (First Come First Serve) is a type of OS scheduling algorithm that executes
processes in the same order in which processes arrive. In simple words, the process
that arrives first will be executed first. It is non-preemptive in nature. FCFS scheduling
may cause the problem of starvation if the burst time of the first process is the
longest among all the jobs. Burst time here means the time that is required in
milliseconds by the process for its execution. It is also considered the easiest and
simplest OS scheduling algorithm as compared to others. Implementation of FCFS is
generally managed with help of the FIFO (First In First Out) queue.
20. What is Reentrancy?
Reentrant is simply a function in which various clients can use and shares a single
copy of a program during a similar period. This concept is generally associated with
OS code and does not deal with concurrency. It has two major functions:
Program code cannot change or modify itself.
Local data for every client process needs to be stored in different disks.
Paging Segmentation
It is invisible to a
It is visible to a programmer.
programmer.
It allows a cumulative
It allows all programs, data, and
total of virtual address
codes to break up into
spaces to cross physical
independent address spaces.
main memory.
Asymmetric Clustering is generally a system in which one of the nodes among all
nodes is in hot standby mode whereas the rest of all nodes run different applications.
It simply uses whole or entire hardware resources therefore it is considered a more
reliable system as compared to others.
Multitasking Multiprocessing
Types of Sockets
Starvation: It is generally a problem that usually occurs when a process has not been
able to get the required resources it needs for progress with its execution for a long
period of time. In this condition, low priority processes get blocked and only high
priority processes proceed towards completion because of which low priority
processes suffer from lack of resources.
Mutex is slower as
Binary semaphores are much
compared to binary
faster as compared to Mutex.
semaphores.
Functions of Kernel:
It is responsible for managing all computer resources such as CPU, memory,
files, processes, etc.
It facilitates or initiates the interaction between components of hardware and
so ware.
It manages RAM memory so that all running processes and programs can work
effectively and efficiently.
It also controls and manages all primary tasks of the OS as well as manages
access and use of various peripherals connected to the computer.
It schedules the work done by the CPU so that the work of each user is executed
as efficiently as possible.
Monolithic Kernel
MicroKernel
Hybrid Kernel
Nano Kernel
Exo Kernel
It is smaller in size as
It is larger in size as compared
compared to the
to a microkernel.
monolithic kernel.
It is easily extendible as
It is hard to as extend as
compared to a monolithic
compared to a microkernel.
kernel.
Kernel: Kernel is a system program that controls all programs running on the
computer. The kernel is basically a bridge between the so ware and hardware of the
system.
Operating System: Operating system is a system program that runs on the computer
to provide an interface to the computer user so that they can easily operate on the
computer.
Kernel OS
It is considered a central
It is considered system so ware.
component of OS
It is generally
responsible for
It is generally responsible for
converting user
managing the resources of
commands into
system.
machine-level
commands.
It simply acts as an
interface between It simply acts as an interface
hardware and between hardware and user.
applications.
Thread: It is a path of execution that is composed of the program counter, thread id,
stack, and set of registers within the process.
Process Thread
Deadlock is generally a situation where a set of processes are blocked as each process
is holding resources and waits to acquire resources held by another process. In this
situation, two or more processes simply try to execute simultaneously and wait for
each to finish their execution because they are dependent on each other. We can see
a hand problem in our system whenever a deadlock occurs in a program. It is one of
the common problems you can see in multiprocessing.
There are basically four necessary conditions for deadlock as given below:
Mutual Exclusion
Hold and Wait
No Pre-emption
Circular Wait or Resource Wait