0% found this document useful (0 votes)
12 views23 pages

Operating System

The document provides an overview of operating systems (OS), detailing their objectives, functions, and various types such as batch, multiprogramming, and real-time systems. It explains key concepts like resource management, process management, and system calls, along with the structure of processes and threads. Additionally, it discusses the importance of the Process Control Block (PCB) in managing process information.

Uploaded by

banshiart83
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views23 pages

Operating System

The document provides an overview of operating systems (OS), detailing their objectives, functions, and various types such as batch, multiprogramming, and real-time systems. It explains key concepts like resource management, process management, and system calls, along with the structure of processes and threads. Additionally, it discusses the importance of the Process Control Block (PCB) in managing process information.

Uploaded by

banshiart83
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Unit 1

Operating System
• An operating system (OS) is a
program that acts as an interface
between the system hardware and
the user. Moreover, it handles all the
interactions between the
software and the hardware.

Objectives of OS :
The primary goals of an operating
system

Convenience : An operating system


improves the use of a machine.
Efficiency : An operating system
enables the efficient use of resources.
This is due to less time spent
configuring the system.
An operating system enables the
efficient use of resources. This is due to
less time spent configuring the system.
Management of system resources –
It guarantees that resources are shared
fairly among various processes and
users.

Functions of Operating
System :
Resource Management : The
operating system manages and
allocates memory, CPU time, and other
hardware resources among the various
programs and processes running on the
computer.
Process Management: The operating
system is responsible for starting,
stopping, and managing processes and
programs. It also controls the
scheduling of processes and allocates
resources to them.
Memory Management: The operating
system manages the computer’s
Security: The operating system
provides a secure environment for the
user, applications, and data by
implementing security policies and
mechanisms such as access controls
and encryption.

Batch Operating System :


• In the 1970s, Batch processing was
very popular. In this technique,
similar types of jobs were batched
together and executed in time.
People were used to having a single
computer which was called a
mainframe.
• In Batch operating system, access is
• The system put all of the jobs in a
queue on the basis of first come first
serve and then executes the jobs one
by one. The users collect their
respective output when all the jobs
get executed.

Disadvantages
There are five jobs J1, J2, J3, J4, and J5,
present in the batch. If the execution
time of J1 is very high, then the other
four jobs will never be executed, or
they will have to wait for a very long
time. Hence the other processes get
starved.
Multiprogramming Operating
System :

• Multi-Programming Operating System


be simply illustrated as more than
one program is present in the main
memory and any one of them can be
kept in execution. This is basically
used for better execution of
resources.
• In a multiprogramming environment,
when a process does its I/O, The CPU
can start the execution of other
processes. Therefore,
multiprogramming improves the
efficiency of the system.

• It increased as the CPU always had


Multi-Processing Operating
System :

• Multi-Processing Operating System is


a type of Operating System in which
more than one CPU is used for the
execution of resources. It betters the
throughput of the System.

• As it has several processors, so, if


one processor fails, we can proceed
with another processor.
• Disadvantages :
• Due to the multiple CPU, it can be
more complex and somehow difficult
to understand.
Multi-Tasking Operating
System :

• Multitasking Operating System is


simply a multiprogramming
Operating System with having facility
of a Round-Robin Scheduling
Algorithm. It can run multiple
programs simultaneously.
• It comes with proper memory
management.
• There are two types of Multi-Tasking
Systems
preemptive multitasking, the
operating system can initiate a context
switching from the running process to
another process.
cooperative multitasking, the
operating system never initiates
context switching from the running
process to another process.
Time-Sharing Operating
Systems

• Each task is given some time to


execute so that all the tasks work
smoothly.
• Each user gets the time of the CPU as
they use a single system. These
systems are also known as
Multitasking Systems.
• The task can be from a single user or
different users also. The time that
each task gets to execute is called
quantum. Ex : IBM VM/CMS,TSO
(Time Sharing Option), Windows
Terminal Services

• One must have to take care of the


Distributed Operating
System :
• Distributed systems are also used to
manage the resources of multiple
computers.
• Multiple computers are connected via
a single communication channel.
Every system has its own processor
and memory.
• Resources like disk, computer, CPU,
network interface, nodes, etc
• t is more reliable as a failure of one
system will not impact the other
computers or the overall system.
• All computers work independently.
• Costly setup. If the server fails, then
the whole system will fail.
Real-Time Operating System :
• The time interval required to process
and respond to inputs is very small.
This time interval is called response
time.
• Real-time systems are used when
there are time requirements that are
very strict like missile systems, air
traffic control systems, robots, etc.
Two Types of Real-Time Operating
Systems:
Hard Real-Time Systems: Hard Real-
Time OSs are meant for applications
where time constraints are very strict
and even the shortest possible delay is
not acceptable.
Soft Real-Time Systems: These OSs
are for applications where time-
constraint is less strict.
Real-Time Operating System :
• A personal computer (PC) is a
microcomputer designed for use by
one person at a time.
• By the 1980s, technological
advances made it feasible to build a
small computer that an individual
could own and use as a word
processor and for other computing
functions.
• The three most common operating
systems for personal computers are
Microsoft Windows, macOS, and
Linux.

• Parallel Operating System


• Parallel operating systems are
designed to speed up the execution
of programs by dividing them into
multiple segments.
• It is used for dealing with multiple
processors simultaneously by using
computer resources which include a
single computer with multiple
processors and several computers
connected by a network to form a
cluster of parallel processing.
Operating System Services :
• Operating system is a software that
acts as an intermediary between the
user and computer hardware.
• Program Execution : Operating
System that manages how a program
is going to be executed. It loads the
program into the memory after which
it is executed.
• The order in which they are executed
depends on the CPU Scheduling
Algorithms.
• When the program is in execution,
the Operating System also handles
deadlock i.e. no two processes come
for execution at the same time.
• File Management : The operating
system helps in managing files also.
If a program needs access to a file, it
is the operating system that grants
access.
• These permissions include read-only,
read-write, etc. It also provides a
platform for the user to create, and
delete files.
• The Operating System decides how
the data should be manipulated and
stored.
• Memory Management : OS first
• it prevents program from using
unnecessary memory.
• Process Management : Process
management refers to the
techniques and strategies used to
control their processes to achieve
their goals efficiently and effectively.
• It involves identifying the steps
involved in completing a task
• Resource Management : System
resources are shared between
various processes.
• It is the Operating system that
manages resource sharing.
• It also manages the CPU time among
processes using CPU Scheduling
Algorithms.
• It also controls input-output devices.
• Error Handling : The Operating
System also handles the error
occurring in the CPU, in Input-Output
devices, etc. It also ensures that an
error does not occur frequently and
fixes the errors.
• It also prevents the process from
coming to a deadlock.
• Security and Protection :
Operating device affords safety to
the statistics and packages of a
System Calls :
• A user program can interact with the
operating system using a system call.
• A number of services are requested
by the program, and the OS responds
by launching a number of systems
calls to fulfill the request.
• A system call is initiated by the
program executing a specific
instruction, which triggers a switch to
kernel mode .
• System calls are essential for the
proper functioning of an operating
system, as they provide a
standardized way for programs to
access system resources.

• when the process is under execution


process executes the process makes
a system call.
Types of System Calls :

• Process Control: It handles the


system calls for process creation,
deletion, etc. Examples of process
control system calls are: Load,
Execute, Abort, and Wait for Signal
events for process.
• File Management: File
manipulation events like Creating,
Deleting, Reading Writing etc are
being classified under file
management system calls.
• Device Management: Device
Management system calls are being
used to request the device, release
the device, and logically attach and
detach the device.
• Information Maintenance: This
type of system call is used to
maintain the information about the
system like time and date.
• Communications: In order to have
interprocess communications like
Examples
Types of System Calls :

• Process Control: It handles the


system calls for process creation,
deletion, etc. Examples of process
control system calls are: Load,
Execute, Abort, and Wait for Signal
events for process.
• File Management: File
manipulation events like Creating,
Deleting, Reading Writing etc are
being classified under file
management system calls.
• Device Management: Device
Management system calls are being
used to request the device, release
the device, and logically attach and
detach the device.
• Information Maintenance: This
type of system call is used to
maintain the information about the
system like time and date.
• Communications: In order to have
interprocess communications like
Process Concept :
• When a program is loaded into the
memory and it becomes a process
• it can be divided into four sections ─
stack, heap, text and data.

• Stack : The process Stack contains


the temporary data such as
method/function parameters, return
address and local variables.
• Heap : This is dynamically allocated
memory to a process during its run
time.
• Text : This includes the current
activity represented by the value of
Program Counter and the contents of
the processor's registers.
• Data : This section contains the
global and static variables.
• A part of a computer program that
Process In Memory :

Start :This is the initial state when a


process is first started/created.
Ready : The process is waiting to be
assigned to a processor. Ready
processes are waiting to have the
processor allocated to them by the
operating system so that they can run.
Process may come into this state after
Start state or while running it by but
interrupted by the scheduler to assign
CPU to some other process.
Running : Once the process has been
assigned to a processor by the OS
scheduler, the process state is set to
running and the processor executes its
instructions.
Waiting : Process moves into the
waiting state if it needs to wait for a
resource, such as waiting for user input,
or waiting for a file to become available.
Terminated or Exit : Once the process
Threads :
• A thread is a single sequential flow of
execution of tasks of a process so it is
also known as thread of execution or
thread of control.
• there can be more than one thread
inside a process.
• Each thread of the same process
makes use of a separate program
counter and a stack
• Thread is often referred to as a
lightweight process.

Types of Thread :
1. User Level Thread:
• User-level threads are implemented
and managed by the user and the
kernel is not aware of it.
• User-level threads are implemented
using user-level libraries and the OS
• User-level thread is faster to create
and manage compared to kernel-level
thread.
• Context switching in user-level
threads is faster.

2. Kernel level Thread:


• Kernel level threads are implemented
and managed by the OS.
• Kernel level threads are implemented
using system calls and Kernel level
threads are recognized by the OS.
• Kernel-level threads are slower to
create and manage compared to user-
level threads.

• The semantics of fork() and exec()


system calls: The fork() call is used to
create a duplicate child process.
• The exec() call replaces the whole
process that called it including all the
threads in the process with a new
Process Control Block (PCB)
• Process Control Block is a data
structure that contains information of
the process related to it.
• The process control block is also
known as a task control block, entry of
the process table, etc.
• It is very important for process
management as the data structuring
for processes is done in terms of the
PCB. It also defines the current state
of the operating system.

• Process ID: When a new process is


created by the user, the operating
system assigns a unique ID i.e. a
• OS can handle most N processes at a
time. process-ID will get the values
from 0 to N-1.
• Process State: It stores the
respective State of the process.
• Pointer : It is a Stack pointer which is
required to be saved when the process
is switched from one State to another
to retain the current position of the
process.
• Process Counter : It is Stores the
Counter which Contains the address of
the next instruction that is to be
Executed for the process.
• Register : These are the CPU
registers which includes: accumulator,
base registers and general purpose
registers.
• Memory limits : This field Contains
the informati about memory
management System used by
Operating System. This may include
the pag tables, segment tables etc.
• Open file list : This information
includes the list of files opened for a
process.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy