SlideShare a Scribd company logo
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.
Processing management
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.
Processing management
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.
Processing management
• 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)
Processing management
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
Processing management
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..
Processing management
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.
Processing management
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.
Processing management
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.
Processing management
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
Processing management
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
Processing management
Processing management
.
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 os
Sumant Diwakar
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
Peter Tröger
 
Processor management
Processor managementProcessor management
Processor management
dev3993
 
Lecture 5 process concept
Lecture 5   process conceptLecture 5   process concept
Lecture 5 process concept
Pradeep Kumar TS
 
水晶礦脈
水晶礦脈水晶礦脈
水晶礦脈
guest2571e4
 
Process
ProcessProcess
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
Shipra Swati
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
Karan Thakkar
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Deepika Balichwal
 
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 management
Arnav 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 - Engineering
Yogesh Santhan
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
Damian 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 & Deadlock
Ajit Nayak
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
lodhran-hayat
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Management
ghayour abbas
 
Lesson 7 Process Control Block
Lesson 7 Process Control BlockLesson 7 Process Control Block
Lesson 7 Process Control Block
Laguna State Polytechnic University
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Prasunjeet Soni
 

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 system
Mark 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
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
Rakibul Rakib
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
HikaTariku
 
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
Amanuelmergia
 
OS ppt.pdf
OS ppt.pdfOS ppt.pdf
OS ppt.pdf
PavanKumarPNVS
 
UNIT I-Processes.pptx
UNIT I-Processes.pptxUNIT I-Processes.pptx
UNIT I-Processes.pptx
GaneshKumar537286
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
Amanuelmergia
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
AyushSharma651966
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdf
Amanuelmergia
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
Mani Deepak Choudhry
 
Operating System.pptx
Operating System.pptxOperating System.pptx
Operating System.pptx
VanshikaRajput33
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
MeghaSharma474761
 
Operating system
Operating systemOperating system
Operating system
Prof. Dr. K. Adisesha
 
Operating System
Operating SystemOperating System
Operating System
GowriLatha1
 
Intro Basic of OS .ppt
Intro Basic of OS .pptIntro Basic of OS .ppt
Intro Basic of OS .ppt
Varsha506533
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Scheduling
ghayour abbas
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
Taufeeq8
 
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.pptx
DivyaKS18
 

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

Three stages of Interphase
Three stages of InterphaseThree stages of Interphase
Three stages of Interphase
Kateri Manglicmot
 
Counter Reformation
Counter ReformationCounter Reformation
Counter Reformation
Kateri Manglicmot
 
Introduction to Biology
Introduction to BiologyIntroduction to Biology
Introduction to Biology
Kateri Manglicmot
 
Kingdom Protista
Kingdom ProtistaKingdom Protista
Kingdom Protista
Kateri Manglicmot
 
Kingdom Plantae
Kingdom PlantaeKingdom Plantae
Kingdom Plantae
Kateri Manglicmot
 
Acquisition Payment Process
Acquisition Payment ProcessAcquisition Payment Process
Acquisition Payment Process
Kateri Manglicmot
 
Sales Collection Process
Sales Collection ProcessSales Collection Process
Sales Collection Process
Kateri Manglicmot
 
Project Cost Management
Project Cost ManagementProject Cost Management
Project Cost Management
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

IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Muhammad Ali
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
Figma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdfFigma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdf
Management Institute of Skills Development
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
Anant Gupta
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
Jimmy Lai
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
Ivanti
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
HackersList
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 

Recently uploaded (20)

IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
Figma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdfFigma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdf
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 

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.
  • 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.
  • 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.
  • 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)
  • 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
  • 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..
  • 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.
  • 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.
  • 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.
  • 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
  • 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.
  • 40. .