SlideShare a Scribd company logo
1 of 45
Operating System – Grp. 2
It is an integral part of
any modern-day
operating system (OS).
The OS must:
• Allocate resources to
processes
• Enable processes to
share and exchange
information
• Protect the resources
• Enable synchronization.
It is also known as
multitasking. It is a
system executing many
processes concurrently. It
requires that the
processor be allocated to
each process for a period
of time and de-allocate at
an appropriate moment. If
the processor is de-
allocated during the
execution of a process, it
must be done in a way
that it can be restarted
later as easily as
The processor at any
instant can only be
executing one instruction
from one program but
several processes can be
sustained over a period
of time by assigning each
process to the processor
at intervals while the
remainder become
temporarily inactive.
*Concurrent Execution –
number of processes being
executed over a period of
time instead of at the same
1. The process issues a
system call
(sometimes called a
software interrupt);
*For example, an I/O
request occurs requesting to
access a file on hard disk.
2. A hardware interrupt
occurs;
*For example, a key was
pressed on the keyboard, or
a timer runs out.
*Context Switch (Context
Change) – the stopping of
one process and starting (or
restarting) of another
process.
In a very simple system
designed for running only
a single application, it
may be possible to have
all the processes that will
ever be needed be
present when the system
comes up. In general-
purpose systems,
however, some way is
needed to create and
terminate processes as
needed during operation.
There are four principal
events that cause a
process to be created:
1. System Initialization
2. Execution of process
creation system call by
a running process.
3. A user request to create
a new process
4. Initiation of a batch job
When an OS is booted,
typically several
processes are created.
Some of these are
foreground processes,
that interacts with a user
and perform work for
them. Other are
background processes,
which are not associated
with particular users, but
instead have some
specific function.
There are several steps
involved in process
creation:
1. Validation of the parent
process (whether it has
sufficient authorization
to create a process).
2. Upon successful
validation, the parent
process is copied.
3. Each new process gets
its own user space.
• Batch job issues halt instructions
• User logs off
• Process executes a service request to terminate
• Error and fault conditions
• Normal completion
• Time limit exceeded
• Memory unavailable
• Bounds violation (Ex: attempted access of 11th
element of a 10-element array)
• Protection Error (Ex: attempted write to read-only
file)
• Arithmetic error (Ex: attempted division by zero)
The OS’s principal responsibility is in
controlling the execution of processes. This includes
determining the interleaving pattern for execution and
allocation of resources to process. One part of
designing an OS is to describe the behavior that we
would like each process to exhibit. The simplest
model is based on the fact that a process in being
executed or not.
Thus, a process may be considered to be in
one of two states:
1. NOT RUNNING
2. RUNNING
• The need to represent and keep track of each
process
• The state of a process
• The queuing of NON RUNNING processes
Although the two-state process management
model is a perfectly valid design for an OS, the
absence of a BLOCKED state means that the
processor lies idle when the active process changes
from CPU cycles to I/O cycles. This design does not
make efficient use of the processor. The three-state
process management model is designed to
overcome this problem, by introducing a new state
called the BLOCKED state. This state describes any
process which is waiting for an I/O event to take
place. In this case, an I/O event can mean the use of
some device or a signal from another process.
• RUNNING: The process that is currently being
executed.
• READY: A process that is queuing and prepared to
execute when given the opportunity.
• BLOCKED: A process that cannot execute until
some event occurs, such as the completion of an
I/O operation.
• RUNNING → READY
The most common reason for this transition is that the
running process has reached the maximum allowable time
for uninterrupted execution; time-out occurs. Other reasons
can be the imposition of priority levels as determined by the
scheduling policy used for the Low Level Scheduler, and
the arrival of a higher priority process into the READY state.
• RUNNING → BLOCKED
A process is put into the BLOCKED state if it requests
something for which it must wait. A request to the OS is
usually in the form of a system call, (i.e. a call from the
running process to a function that is part of the OS code).
For example, requesting a file from disk or a saving a
section of code or data from memory to a file on disk..
While the three state model is sufficient to
describe the behavior of processes with the given
events, we have to extend the model to allow for
other possible events, and for more sophisticated
design. In particular, the use of a portion of the hard
disk to emulate main memory (so called virtual
memory) requires additional states to describe the
state of processes which are suspended from main
memory, and placed in virtual memory (on disk). Of
course, such processes can, at a future time, be
resumed by being transferred back into main
memory. The Medium Level Scheduler controls these
events.
• BLOCKED → SUSPEND BLOCKED
If a process in the RUNNING state requires more memory,
then at least one BLOCKED process can be swapped out
of memory onto disk. The transition can also be made for
the BLOCKED process if there are READY processes
available, and the OS determines that the READY process
it would like to dispatch requires more main memory to
maintain adequate performance.
• SUSPEND BLOCKED → SUSPEND READY
A process in the SUSPEND BLOCKED state is moved to
the SUSPEND READY state when the event for which it has
been waiting occurs. Note that this requires the state
information concerning suspended processes be accessible
to the OS.
• SUSPEND READY → READY
When there are no READY processes in main memory, the
OS will need to bring one in to continue execution. In
addition, it might be the case that a process in the READY
SUSPEND state has higher priority than any of the
processes in the READY state. In that case, the OS
designer may dictate that it is more important to get at the
higher priority process than to minimize swapping.
• SUSPENDED but READY
Normally, the OS would be designed so that the preference
would be to suspend a BLOCKED process rather than
a READY one.
Each process in the system is represented by
a data structure called a Process Control
Block (PCB), or Process Descriptor in Linux, which
performs the same function as a traveller's passport.
The PCB contains the basic information about the job
including:
• What it is?
• Where it is going?
• How much of its processing has been completed?
• Where it is stored?
• How much it has “spent” in using resources?
• Process Identification: Each process is uniquely
identified by the user’s identification and a pointer
connecting it to its descriptor.
• Process Status: This indicates the current status
of the
process; READY,RUNNING, BLOCKED, READY
SUSPEND, BLOCKED SUSPEND.
• Process State: This contains all of the information
needed to indicate the current state of the job.
• Accounting: This contains information used mainly
for billing purposes and for performance
measurement. It indicates what kind of resources
the process has used and for how long.
Contemporary processors incorporate a mode
bit to define the execution capability of a program in
the processor. This bit can be set to kernel mode or
user mode. Kernel mode is also commonly referred
to as supervisor mode, monitor mode or ring 0 (zero).
In kernel mode, the processor can execute every
instruction in its hardware repertoire, whereas in
user mode, it can only execute a subset of the
instructions.
Instructions that can be executed only in kernel
mode are called kernel, privileged or protected
instructions to distinguish them from the user mode
instructions.
We frequently refer to two classes of memory:
1. User Space
2. System Space (or kernel, supervisor or protected
space)
In general, the mode bit extends the operating
system's protection rights. The mode bit is set by the
user mode trap instruction, also called a supervisor
call instruction. This instruction sets the mode bit,
and branches to a fixed location in the system space.
Since only system code is loaded in the system
space, only system code can be invoked via a trap.
When the OS has completed the supervisor call, it
resets the mode bit to user mode prior to the return.
The parts of the OS critical to its correct operation
execute in kernel mode, while other software (such as generic
system software) and all application programs execute in user
mode. This fundamental distinction is usually the irrefutable
distinction between the operating system and other system
software.
The part of the system executing in kernel supervisor
state is called the kernel, or nucleus of the OS. The kernel
operates as trusted software, meaning that when it was
designed and implemented, it was intended to implement
protection mechanisms that could not be covertly changed
through the actions of untrusted software executing in user
space. Extensions to the OS execute in user mode, so the OS
does not rely on the correctness of those parts of the system
software for correct operation of the OS.
Hence, a fundamental design decision for any function
to be incorporated into the OS is whether it needs to be
implemented in the kernel. If it is implemented in the kernel, it
will execute in kernel space, and have access to other parts of
the kernel. It will also be trusted software by the other parts of
1. System Call
The user process uses the trap
instruction. The idea is that the
system call should appear to be
an ordinary procedure call to the
application program; the
OS provides a library of user
functions with names
corresponding to each actual
system call. Each of these stub
functions contains a trap to the
OS function. When the application
program calls the stub, it executes
the trap instruction, which
switches the CPU to kernel mode,
and then branches, to the entry
point of the function which is to be
invoked. When the function
completes, it switches the
processor to user mode and then
returns control to the user
process; thus simulating a normal
procedure return.
2. Message Passing
The user process constructs a
message, that describes the
desired service. Then it uses a
trusted send function to pass the
message to a trusted OS
process. The send function
serves the same purpose as the
trap; that is, it carefully checks
the message, switches the
processor to kernel mode, and
then delivers the message to a
process that implements the
target functions. Meanwhile, the
user process waits for the result
of the service request with a
message receive operation.
When the OS process completes
the operation, it sends a message
back to the user process.
Get ¼ sheet of paper.
Write your name, the date today
and number you papers: 1 – 15.
.
Processing management
Processing management
Processing management
Processing management
Processing management

More Related Content

What's hot

Process management in os
Process management in osProcess management in os
Process management in osSumant Diwakar
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesPeter Tröger
 
Processor management
Processor managementProcessor management
Processor managementdev3993
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of ProcessShipra Swati
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its conceptsKaran Thakkar
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Mukesh Chinta
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process managementArnav Chowdhury
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringYogesh Santhan
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor ManagementDamian T. Gordon
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockAjit Nayak
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Managementghayour abbas
 

What's hot (19)

Process management in os
Process management in osProcess management in os
Process management in os
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
Processor management
Processor managementProcessor management
Processor management
 
Lecture 5 process concept
Lecture 5   process conceptLecture 5   process concept
Lecture 5 process concept
 
水晶礦脈
水晶礦脈水晶礦脈
水晶礦脈
 
Process
ProcessProcess
Process
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Management
 
Lesson 7 Process Control Block
Lesson 7 Process Control BlockLesson 7 Process Control Block
Lesson 7 Process Control Block
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 

Similar to Processing management

Operating system
Operating systemOperating system
Operating systemMark Muhama
 
Process management- This ppt contains all required information regarding oper...
Process management- This ppt contains all required information regarding oper...Process management- This ppt contains all required information regarding oper...
Process management- This ppt contains all required information regarding oper...ApurvaLaddha
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxAmanuelmergia
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxAmanuelmergia
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdfAmanuelmergia
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationMani Deepak Choudhry
 
Operating System
Operating SystemOperating System
Operating SystemGowriLatha1
 
Intro Basic of OS .ppt
Intro Basic of OS .pptIntro Basic of OS .ppt
Intro Basic of OS .pptVarsha506533
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Schedulingghayour abbas
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfTaufeeq8
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)WajeehaBaig
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptxDivyaKS18
 

Similar to Processing management (20)

Operating system
Operating systemOperating system
Operating system
 
Process management- This ppt contains all required information regarding oper...
Process management- This ppt contains all required information regarding oper...Process management- This ppt contains all required information regarding oper...
Process management- This ppt contains all required information regarding oper...
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptx
 
OS ppt.pdf
OS ppt.pdfOS ppt.pdf
OS ppt.pdf
 
UNIT I-Processes.pptx
UNIT I-Processes.pptxUNIT I-Processes.pptx
UNIT I-Processes.pptx
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdf
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
Operating System.pptx
Operating System.pptxOperating System.pptx
Operating System.pptx
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
Operating system
Operating systemOperating system
Operating system
 
Operating System
Operating SystemOperating System
Operating System
 
Intro Basic of OS .ppt
Intro Basic of OS .pptIntro Basic of OS .ppt
Intro Basic of OS .ppt
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Scheduling
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
 

More from Kateri Manglicmot

More from Kateri Manglicmot (8)

Three stages of Interphase
Three stages of InterphaseThree stages of Interphase
Three stages of Interphase
 
Counter Reformation
Counter ReformationCounter Reformation
Counter Reformation
 
Introduction to Biology
Introduction to BiologyIntroduction to Biology
Introduction to Biology
 
Kingdom Protista
Kingdom ProtistaKingdom Protista
Kingdom Protista
 
Kingdom Plantae
Kingdom PlantaeKingdom Plantae
Kingdom Plantae
 
Acquisition Payment Process
Acquisition Payment ProcessAcquisition Payment Process
Acquisition Payment Process
 
Sales Collection Process
Sales Collection ProcessSales Collection Process
Sales Collection Process
 
Project Cost Management
Project Cost ManagementProject Cost Management
Project Cost Management
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Processing management

  • 2. It is an integral part of any modern-day operating system (OS). The OS must: • Allocate resources to processes • Enable processes to share and exchange information • Protect the resources • Enable synchronization.
  • 3.
  • 4. It is also known as multitasking. It is a system executing many processes concurrently. It requires that the processor be allocated to each process for a period of time and de-allocate at an appropriate moment. If the processor is de- allocated during the execution of a process, it must be done in a way that it can be restarted later as easily as The processor at any instant can only be executing one instruction from one program but several processes can be sustained over a period of time by assigning each process to the processor at intervals while the remainder become temporarily inactive. *Concurrent Execution – number of processes being executed over a period of time instead of at the same
  • 5. 1. The process issues a system call (sometimes called a software interrupt); *For example, an I/O request occurs requesting to access a file on hard disk. 2. A hardware interrupt occurs; *For example, a key was pressed on the keyboard, or a timer runs out. *Context Switch (Context Change) – the stopping of one process and starting (or restarting) of another process.
  • 6.
  • 7. In a very simple system designed for running only a single application, it may be possible to have all the processes that will ever be needed be present when the system comes up. In general- purpose systems, however, some way is needed to create and terminate processes as needed during operation. There are four principal events that cause a process to be created: 1. System Initialization 2. Execution of process creation system call by a running process. 3. A user request to create a new process 4. Initiation of a batch job
  • 8. When an OS is booted, typically several processes are created. Some of these are foreground processes, that interacts with a user and perform work for them. Other are background processes, which are not associated with particular users, but instead have some specific function. There are several steps involved in process creation: 1. Validation of the parent process (whether it has sufficient authorization to create a process). 2. Upon successful validation, the parent process is copied. 3. Each new process gets its own user space.
  • 9.
  • 10. • Batch job issues halt instructions • User logs off • Process executes a service request to terminate • Error and fault conditions • Normal completion • Time limit exceeded • Memory unavailable • Bounds violation (Ex: attempted access of 11th element of a 10-element array) • Protection Error (Ex: attempted write to read-only file) • Arithmetic error (Ex: attempted division by zero)
  • 11.
  • 12. The OS’s principal responsibility is in controlling the execution of processes. This includes determining the interleaving pattern for execution and allocation of resources to process. One part of designing an OS is to describe the behavior that we would like each process to exhibit. The simplest model is based on the fact that a process in being executed or not. Thus, a process may be considered to be in one of two states: 1. NOT RUNNING 2. RUNNING
  • 13. • The need to represent and keep track of each process • The state of a process • The queuing of NON RUNNING processes
  • 14.
  • 15. Although the two-state process management model is a perfectly valid design for an OS, the absence of a BLOCKED state means that the processor lies idle when the active process changes from CPU cycles to I/O cycles. This design does not make efficient use of the processor. The three-state process management model is designed to overcome this problem, by introducing a new state called the BLOCKED state. This state describes any process which is waiting for an I/O event to take place. In this case, an I/O event can mean the use of some device or a signal from another process.
  • 16. • RUNNING: The process that is currently being executed. • READY: A process that is queuing and prepared to execute when given the opportunity. • BLOCKED: A process that cannot execute until some event occurs, such as the completion of an I/O operation.
  • 17. • RUNNING → READY The most common reason for this transition is that the running process has reached the maximum allowable time for uninterrupted execution; time-out occurs. Other reasons can be the imposition of priority levels as determined by the scheduling policy used for the Low Level Scheduler, and the arrival of a higher priority process into the READY state. • RUNNING → BLOCKED A process is put into the BLOCKED state if it requests something for which it must wait. A request to the OS is usually in the form of a system call, (i.e. a call from the running process to a function that is part of the OS code). For example, requesting a file from disk or a saving a section of code or data from memory to a file on disk..
  • 18.
  • 19. While the three state model is sufficient to describe the behavior of processes with the given events, we have to extend the model to allow for other possible events, and for more sophisticated design. In particular, the use of a portion of the hard disk to emulate main memory (so called virtual memory) requires additional states to describe the state of processes which are suspended from main memory, and placed in virtual memory (on disk). Of course, such processes can, at a future time, be resumed by being transferred back into main memory. The Medium Level Scheduler controls these events.
  • 20. • BLOCKED → SUSPEND BLOCKED If a process in the RUNNING state requires more memory, then at least one BLOCKED process can be swapped out of memory onto disk. The transition can also be made for the BLOCKED process if there are READY processes available, and the OS determines that the READY process it would like to dispatch requires more main memory to maintain adequate performance. • SUSPEND BLOCKED → SUSPEND READY A process in the SUSPEND BLOCKED state is moved to the SUSPEND READY state when the event for which it has been waiting occurs. Note that this requires the state information concerning suspended processes be accessible to the OS.
  • 21. • SUSPEND READY → READY When there are no READY processes in main memory, the OS will need to bring one in to continue execution. In addition, it might be the case that a process in the READY SUSPEND state has higher priority than any of the processes in the READY state. In that case, the OS designer may dictate that it is more important to get at the higher priority process than to minimize swapping. • SUSPENDED but READY Normally, the OS would be designed so that the preference would be to suspend a BLOCKED process rather than a READY one.
  • 22.
  • 23. Each process in the system is represented by a data structure called a Process Control Block (PCB), or Process Descriptor in Linux, which performs the same function as a traveller's passport. The PCB contains the basic information about the job including: • What it is? • Where it is going? • How much of its processing has been completed? • Where it is stored? • How much it has “spent” in using resources?
  • 24. • Process Identification: Each process is uniquely identified by the user’s identification and a pointer connecting it to its descriptor. • Process Status: This indicates the current status of the process; READY,RUNNING, BLOCKED, READY SUSPEND, BLOCKED SUSPEND. • Process State: This contains all of the information needed to indicate the current state of the job. • Accounting: This contains information used mainly for billing purposes and for performance measurement. It indicates what kind of resources the process has used and for how long.
  • 25.
  • 26. Contemporary processors incorporate a mode bit to define the execution capability of a program in the processor. This bit can be set to kernel mode or user mode. Kernel mode is also commonly referred to as supervisor mode, monitor mode or ring 0 (zero). In kernel mode, the processor can execute every instruction in its hardware repertoire, whereas in user mode, it can only execute a subset of the instructions. Instructions that can be executed only in kernel mode are called kernel, privileged or protected instructions to distinguish them from the user mode instructions.
  • 27. We frequently refer to two classes of memory: 1. User Space 2. System Space (or kernel, supervisor or protected space) In general, the mode bit extends the operating system's protection rights. The mode bit is set by the user mode trap instruction, also called a supervisor call instruction. This instruction sets the mode bit, and branches to a fixed location in the system space. Since only system code is loaded in the system space, only system code can be invoked via a trap. When the OS has completed the supervisor call, it resets the mode bit to user mode prior to the return.
  • 28.
  • 29. The parts of the OS critical to its correct operation execute in kernel mode, while other software (such as generic system software) and all application programs execute in user mode. This fundamental distinction is usually the irrefutable distinction between the operating system and other system software. The part of the system executing in kernel supervisor state is called the kernel, or nucleus of the OS. The kernel operates as trusted software, meaning that when it was designed and implemented, it was intended to implement protection mechanisms that could not be covertly changed through the actions of untrusted software executing in user space. Extensions to the OS execute in user mode, so the OS does not rely on the correctness of those parts of the system software for correct operation of the OS. Hence, a fundamental design decision for any function to be incorporated into the OS is whether it needs to be implemented in the kernel. If it is implemented in the kernel, it will execute in kernel space, and have access to other parts of the kernel. It will also be trusted software by the other parts of
  • 30.
  • 31. 1. System Call The user process uses the trap instruction. The idea is that the system call should appear to be an ordinary procedure call to the application program; the OS provides a library of user functions with names corresponding to each actual system call. Each of these stub functions contains a trap to the OS function. When the application program calls the stub, it executes the trap instruction, which switches the CPU to kernel mode, and then branches, to the entry point of the function which is to be invoked. When the function completes, it switches the processor to user mode and then returns control to the user process; thus simulating a normal procedure return. 2. Message Passing The user process constructs a message, that describes the desired service. Then it uses a trusted send function to pass the message to a trusted OS process. The send function serves the same purpose as the trap; that is, it carefully checks the message, switches the processor to kernel mode, and then delivers the message to a process that implements the target functions. Meanwhile, the user process waits for the result of the service request with a message receive operation. When the OS process completes the operation, it sends a message back to the user process.
  • 32. Get ¼ sheet of paper. Write your name, the date today and number you papers: 1 – 15.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. .