SlideShare a Scribd company logo
Operating System
Process
Submitted by,
M. Kavitha
M. Sc(CS&IT)
Nadar Saraswathi College
of Arts & Science,
Theni
Process
It is a program under execution several process it request
the processor and run to execution.
There are two process.
Active entity Passive entity
(Process is under (Process is not under
execution)
execution)
Process
Process State
Dispatcher
Process A
Process B
Process C
0
100
5000
8000
12000
Main MemoryAddress
8000
Program CounterNext
instruction
to be
execution
Process State :
* A processor is to execute machine
instruction residing in main memory.
* These instruction to provided in a
program.
* A processor may interleave the
execution of a number of program over
time.
* There are five type of process state.
New - Create the instruction
Ready - Process is ready for
execution
Running - Instruction or processor to
under execution.
Wait - The process is waiting for I/O
device for external even to worker.
Terminate - The process has finish the
execution.
An individual process by listing the sequence of
instruction that execute for that process it referred to as a
trace of the process.
Trace of process
A
Trace of process
B
Trace of process C
5000 8000 12000
5001 8001 12001
5002 8002 12002
5003 8003 12003
5004 12004
5005 12005
5006 12006
5007 12007
5008 12008
5009 12009
5010 12010
5011 12011
5000 – Starting address of program of process A
8000 – Starting address of program of process B
12000 – Starting address of program of process C
New RunningReady
Blocked
Terminate
Admin
Dispatcher
Release
Event
Occurs
Event
Wait
Scheduler
dispatcher
For Example,
(it is program module
for taking the
job from queue & stack
to the processor)
Processor
Jn
…
..
J4
J3
J2
J1
Queue
(Data Structure)
FIFO
Scheduler
dispatcher
Two – State Process Model :
Five State Process Model :
Creation & Termination of
processes
Create the object to the operating system, it
can be used the data structure.
Termination is a stop and then execution.
There are two type process
1. Normal
2. Up normal
Spawning Process
P1
{
b=5;
- - - -
-- - -
C= a+b;
-- - - -
}
P2
{
-- - -
- - -
a= 1;
- - - -
}
Sub
Process
Child
Process
Parent Process
Jn . . . . . . . . . . J2 J1
. . . . . . . . . . J2
. . . . . . . . . . J1
Jn . . . . . . . . . .
Dispatcher CPU
J1 Event Q1
J2 Event Q2
Jn Event Qn
Wait
Wait
Wait
Printer
I/O device
Networks
Suspend Process
Need for Swapping :
A process is a under execution if need
any external input or I/O device it will be
suspended from main memory and moved
to hard disk.
More than process it stored in main
memory or RAM its maintain the process is
a operating system.
Ready – Main memory and available
for execution.
Blocked – In main memory wait for
event.
Blocked/Suspend – In secondary
memory.
Ready/Suspend – In secondary
memory ready for execution. So then it will
be moved to main memory.
Process Description :
* It is a sequence of events.
* It does not tell the reader it describes
how as a general description of how a
process happens, step by step.
* Deals with process and procedures
and is characterized by the detailing of a
series of steps.
P1 P2 Pn
Processor I/O I/OI/O
Main
Memory
. . . . . . . .
Virtual Memory
Process Descriptions :
Job Dispatcher Process
Memory
Device
Files
Process
Structure of Operating System Control Tables
Memory
Table
File Table
I/O Table
Process Table
Process 1
Process 2
Process n
Process 1
Process n
Process image
Process image
Running
Ready
Blocked
Process Identification
Process State Information
Process Control Information
User Stack
Private User Address Space (P1)
(Program, Data)
Shared Address Space (P2)
PCB
PCB
PCB
PCB
PCB
PCB
PCB
Process
ImagePCB - Program
Control Block
Process Control
Modes of execution
1. Most privileged (Operating System,
kernel, System function)
There are three type of most privileged
* Process Management
* Memory Management
* I/O Management
2. Less privileged (User program)
Creation of Process
1. Process ID – assign.
2. Space allocation.
3. Creation of PCB.
4. Set links between PCB and process.
Process Switching
1. Interrupt
2. Trap
3. Interrupt handler
4. Context Switching
There are two interrupts
* Clock interrupt
* I/O interrupt
Process Control Block (PCB)
Identifier: A unique identifier associated
with this process, to distinguish it from all other
processes.
State: If the process is currently executing,
it is in the running state.
Priority: Priority level relative to other
processes.
Program counter: The address of the next
instruction in the program to be executed.
Memory pointers: Includes pointers to the
program code and data associated with this process,
plus any memory blocks shared with other processes.
Context data: These are data that are present
in registers in the processor while the process is
executing.
I/O status information: Includes outstanding
I/O requests, I/O devices (e.g., tape drives) assigned
to this process, a list of files in use by the process,
and so on.
Accounting information: May include the
amount of processor time and clock time used, time
limits, account numbers, and so
Processes and Threads
Processes :
1. Unit of resource ownership :
A process allocated a virtual
address space to hold the process image,
and from time to time the process may be
assigned main memory.
* I/O channels.
* I/O devices
* Files
2. Unit of dispatching :
* A process is an execution path
(trace) through one or more programs.
* This execution may be interleaved
with that of other processes.
* A process has an execution state
* Running
* Ready etc.,
Threads :
1. It is a separate program is a part of execution
and the sub program it is a flow of execution.
2. Dispatching is a particular set of program or
unit from a normal program it’s known as threads.
process 1
{
-- - - - -
- - - - - -
C=p2.a+b;
-- - - - -
- - - - - -
Print( );
-- - - - -
}
Thread 1
{
-- - - - -
- - - - - -
- - - - - -
C=p2.a+b;
-- - - - -
- - - - - -
- - - - - -
}
Thread 2
{
-- - - - -
- - - - - -
- - - - - -
-- - - - - -
Print ( );
-- - - - -
- - - - - -
}
Use of Threads :
1. Foreground and background work.
2. Asynchronous processing.
3. Speed execution.
4. Organizing programs.
Concurrency
The concurrency is a simultaneous
execution of multiple process it is called
concurrency.
* Multiprogramming
* Multiprocessing
* Distributed processing
Multiprogramming :
It is execution of multiple processes
with the single processor system.
Multiprocessing :
Execution of multiple processes with the
multi processor computer.
Distributed processing :
The management of multiple processes
execution on multiple, distributed computer
system.
There are three different contexts :
* Multiple application :
The processing time of the computer
to be dynamically shared the job or number
or application.
* Structured application :
It is an execution of the modular
design and structured program a set of
concurrent process.
* Operating System Structure :
The system programmer and the
operating system are themselves
implemented as a set of processes.
Time
P1
P2
P3
Interleaving
Mutual Exclusion
* It is a two process request for same
resource but any one process is allowed to
enter into critical session and other process
has to wait.
Mutual Exclusion Software Approach :
* It execute on a single-processor or a
multiprocessor machine with shared main
memory.
* It is used to Dekker’s Algorithm.
First Attempt :
P1 uses the ‘cs’ if 1 is written on
the board of igloo or else wait.
Second Attempt :
cs
P1 P2
1
P1
(T)
P2
(F)
CS (P1)
Separate igloos for each process
and status is maintain (True/False).
Third Attempt :
* If P1 fails in cs the P2 is blocked.
* If P1 fails outside cs then P2 is not
blocked
P1
(F)
P2
(T)
CS (P2)
P1 P2 CS ( )Refr
esh
Semaphores
* In concurrent processing some signals
are given to all processes indication ‘Run’
or ‘Stop’.
* This signal is raised by a variable
called semaphore.
* Then software for the signals.
There are three operation on semaphore.
1. A semaphore may be initialized to a
non-negative value.
2. The wait operation decrements the
semaphore value. If the value becomes
negative, then the process executing the wait
is blocked.
3. The signal operation increments the
semaphore value. If the value is not positive a
process blocked a wait operation is unblocked.
Message Passing
Message passing provides a mechanism to
allow processes to communicate and to
synchronize their actions without sharing the same
address space.
send (destination, message)
receive (source, message)
Synchronization :
Synchronization Addressing Format
Send Direct Content
Length
blocking
non-blocking
send
receive
fixed
variable
explicit
implicit
Receive Indirect Queuing Discipline
blocking
non-blocking
test for arrival
static
dynamic
ownership
FIFO
Priority
Message Format : Addressing :
Header . . . . . . . .
Body
.…
Source
Destination
Message Length
Control Information
Message Type
Message Contents
P1
Pn Qn
Q1
Mailbox
Sending
Process
Receiving
Process
P1
Pn
Port Q
Thank Q!

More Related Content

What's hot

Process concept
Process conceptProcess concept
Process concept
jangezkhan
 
3 process management
3 process management3 process management
3 process management
Dr. Loganathan R
 
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
 
Chapter 3: Processes
Chapter 3: ProcessesChapter 3: Processes
Chapter 3: Processes
Shafaan Khaliq Bhatti
 
Unit 4
Unit  4Unit  4
Unit 4
pm_ghate
 
Operating System 3
Operating System 3Operating System 3
Operating System 3tech2click
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
Wave Digitech
 
Process of operating system
Process of operating systemProcess of operating system
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
 
水晶礦脈
水晶礦脈水晶礦脈
水晶礦脈
guest2571e4
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
Mukesh Chinta
 
Lecture 2 process
Lecture 2   processLecture 2   process
Lecture 2 process
Kumbirai Junior Muzavazi
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
Chetan Mahawar
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
Talha Shaikh
 
process creation OS
process creation OSprocess creation OS
process creation OS
Kiran Kumar Thota
 
Process threads operating system.
Process threads operating system.Process threads operating system.
Process threads operating system.
Reham Maher El-Safarini
 
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
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
priyadeosarkar91
 

What's hot (19)

Process concept
Process conceptProcess concept
Process concept
 
3 process management
3 process management3 process management
3 process 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
 
Lecture 5 process concept
Lecture 5   process conceptLecture 5   process concept
Lecture 5 process concept
 
Chapter 3: Processes
Chapter 3: ProcessesChapter 3: Processes
Chapter 3: Processes
 
Unit 4
Unit  4Unit  4
Unit 4
 
Operating System 3
Operating System 3Operating System 3
Operating System 3
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
 
Process of operating system
Process of operating systemProcess of operating system
Process of operating system
 
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 (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Lecture 2 process
Lecture 2   processLecture 2   process
Lecture 2 process
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
 
process creation OS
process creation OSprocess creation OS
process creation OS
 
Process threads operating system.
Process threads operating system.Process threads operating system.
Process threads operating system.
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 

Similar to Process

OS (1).pptx
OS (1).pptxOS (1).pptx
OS (1).pptx
KumarMit2
 
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
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
aakritii765
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2Gaurav Meena
 
Process management
Process managementProcess management
Process management
Akshay Ithape
 
Process
ProcessProcess
LP-Unit3.docx
LP-Unit3.docxLP-Unit3.docx
LP-Unit3.docx
SeetharamNageshAppe1
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
Mohammad Almuiet
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
AyushSharma651966
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
Rakibul Rakib
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2) rohassanie
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
Krupali Mistry
 
Operating System
Operating SystemOperating System
Operating System
Subhasis Dash
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
Emertxe Information Technologies Pvt Ltd
 
Lecture_Slide_4.pptx
Lecture_Slide_4.pptxLecture_Slide_4.pptx
Lecture_Slide_4.pptx
DiptoRoy21
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
MeghaSharma474761
 
Operating system
Operating systemOperating system
Operating system
Mark Muhama
 
3.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v23.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v2
Acácio Oliveira
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
Kathirvel Ayyaswamy
 
Completeosnotes
CompleteosnotesCompleteosnotes
Completeosnotes
LakshmiSarvani6
 

Similar to Process (20)

OS (1).pptx
OS (1).pptxOS (1).pptx
OS (1).pptx
 
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
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2
 
Process management
Process managementProcess management
Process management
 
Process
ProcessProcess
Process
 
LP-Unit3.docx
LP-Unit3.docxLP-Unit3.docx
LP-Unit3.docx
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2)
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
Operating System
Operating SystemOperating System
Operating System
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Lecture_Slide_4.pptx
Lecture_Slide_4.pptxLecture_Slide_4.pptx
Lecture_Slide_4.pptx
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
Operating system
Operating systemOperating system
Operating system
 
3.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v23.5 create, monitor and kill processes v2
3.5 create, monitor and kill processes v2
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
Completeosnotes
CompleteosnotesCompleteosnotes
Completeosnotes
 

More from kavitha muneeshwaran

Physical Security
Physical SecurityPhysical Security
Physical Security
kavitha muneeshwaran
 
Digital Audio
Digital AudioDigital Audio
Digital Audio
kavitha muneeshwaran
 
Data structure
Data structureData structure
Data structure
kavitha muneeshwaran
 
Internet Programming with Java
Internet Programming with JavaInternet Programming with Java
Internet Programming with Java
kavitha muneeshwaran
 
Digital image processing
Digital image processing  Digital image processing
Digital image processing
kavitha muneeshwaran
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
kavitha muneeshwaran
 
Data Integration and Transformation in Data mining
Data Integration and Transformation in Data miningData Integration and Transformation in Data mining
Data Integration and Transformation in Data mining
kavitha muneeshwaran
 
Transaction Management - Deadlock Handling
Transaction Management - Deadlock HandlingTransaction Management - Deadlock Handling
Transaction Management - Deadlock Handling
kavitha muneeshwaran
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
kavitha muneeshwaran
 
C and C++ functions
C and C++ functionsC and C++ functions
C and C++ functions
kavitha muneeshwaran
 
I/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architectureI/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architecture
kavitha muneeshwaran
 
narrow Band ISDN
narrow Band ISDNnarrow Band ISDN
narrow Band ISDN
kavitha muneeshwaran
 

More from kavitha muneeshwaran (13)

Physical Security
Physical SecurityPhysical Security
Physical Security
 
Digital Audio
Digital AudioDigital Audio
Digital Audio
 
Java
JavaJava
Java
 
Data structure
Data structureData structure
Data structure
 
Internet Programming with Java
Internet Programming with JavaInternet Programming with Java
Internet Programming with Java
 
Digital image processing
Digital image processing  Digital image processing
Digital image processing
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
 
Data Integration and Transformation in Data mining
Data Integration and Transformation in Data miningData Integration and Transformation in Data mining
Data Integration and Transformation in Data mining
 
Transaction Management - Deadlock Handling
Transaction Management - Deadlock HandlingTransaction Management - Deadlock Handling
Transaction Management - Deadlock Handling
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
C and C++ functions
C and C++ functionsC and C++ functions
C and C++ functions
 
I/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architectureI/O system in intel 80386 microcomputer architecture
I/O system in intel 80386 microcomputer architecture
 
narrow Band ISDN
narrow Band ISDNnarrow Band ISDN
narrow Band ISDN
 

Recently uploaded

BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 

Recently uploaded (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 

Process

  • 1. Operating System Process Submitted by, M. Kavitha M. Sc(CS&IT) Nadar Saraswathi College of Arts & Science, Theni
  • 2. Process It is a program under execution several process it request the processor and run to execution. There are two process. Active entity Passive entity (Process is under (Process is not under execution) execution) Process
  • 3. Process State Dispatcher Process A Process B Process C 0 100 5000 8000 12000 Main MemoryAddress 8000 Program CounterNext instruction to be execution
  • 4. Process State : * A processor is to execute machine instruction residing in main memory. * These instruction to provided in a program. * A processor may interleave the execution of a number of program over time. * There are five type of process state.
  • 5. New - Create the instruction Ready - Process is ready for execution Running - Instruction or processor to under execution. Wait - The process is waiting for I/O device for external even to worker. Terminate - The process has finish the execution.
  • 6. An individual process by listing the sequence of instruction that execute for that process it referred to as a trace of the process. Trace of process A Trace of process B Trace of process C 5000 8000 12000 5001 8001 12001 5002 8002 12002 5003 8003 12003 5004 12004 5005 12005 5006 12006 5007 12007 5008 12008 5009 12009 5010 12010 5011 12011
  • 7. 5000 – Starting address of program of process A 8000 – Starting address of program of process B 12000 – Starting address of program of process C New RunningReady Blocked Terminate Admin Dispatcher Release Event Occurs Event Wait Scheduler dispatcher
  • 8. For Example, (it is program module for taking the job from queue & stack to the processor) Processor Jn … .. J4 J3 J2 J1 Queue (Data Structure) FIFO Scheduler dispatcher
  • 9. Two – State Process Model :
  • 11.
  • 12. Creation & Termination of processes Create the object to the operating system, it can be used the data structure. Termination is a stop and then execution. There are two type process 1. Normal 2. Up normal
  • 13. Spawning Process P1 { b=5; - - - - -- - - C= a+b; -- - - - } P2 { -- - - - - - a= 1; - - - - } Sub Process Child Process Parent Process
  • 14. Jn . . . . . . . . . . J2 J1 . . . . . . . . . . J2 . . . . . . . . . . J1 Jn . . . . . . . . . . Dispatcher CPU J1 Event Q1 J2 Event Q2 Jn Event Qn Wait Wait Wait Printer I/O device Networks
  • 15. Suspend Process Need for Swapping : A process is a under execution if need any external input or I/O device it will be suspended from main memory and moved to hard disk. More than process it stored in main memory or RAM its maintain the process is a operating system.
  • 16. Ready – Main memory and available for execution. Blocked – In main memory wait for event. Blocked/Suspend – In secondary memory. Ready/Suspend – In secondary memory ready for execution. So then it will be moved to main memory.
  • 17. Process Description : * It is a sequence of events. * It does not tell the reader it describes how as a general description of how a process happens, step by step. * Deals with process and procedures and is characterized by the detailing of a series of steps.
  • 18. P1 P2 Pn Processor I/O I/OI/O Main Memory . . . . . . . . Virtual Memory Process Descriptions : Job Dispatcher Process
  • 19. Memory Device Files Process Structure of Operating System Control Tables Memory Table File Table I/O Table Process Table Process 1 Process 2 Process n Process 1 Process n Process image Process image
  • 20. Running Ready Blocked Process Identification Process State Information Process Control Information User Stack Private User Address Space (P1) (Program, Data) Shared Address Space (P2) PCB PCB PCB PCB PCB PCB PCB Process ImagePCB - Program Control Block
  • 21. Process Control Modes of execution 1. Most privileged (Operating System, kernel, System function) There are three type of most privileged * Process Management * Memory Management * I/O Management 2. Less privileged (User program)
  • 22. Creation of Process 1. Process ID – assign. 2. Space allocation. 3. Creation of PCB. 4. Set links between PCB and process.
  • 23. Process Switching 1. Interrupt 2. Trap 3. Interrupt handler 4. Context Switching There are two interrupts * Clock interrupt * I/O interrupt
  • 24. Process Control Block (PCB) Identifier: A unique identifier associated with this process, to distinguish it from all other processes. State: If the process is currently executing, it is in the running state. Priority: Priority level relative to other processes. Program counter: The address of the next instruction in the program to be executed.
  • 25. Memory pointers: Includes pointers to the program code and data associated with this process, plus any memory blocks shared with other processes. Context data: These are data that are present in registers in the processor while the process is executing. I/O status information: Includes outstanding I/O requests, I/O devices (e.g., tape drives) assigned to this process, a list of files in use by the process, and so on. Accounting information: May include the amount of processor time and clock time used, time limits, account numbers, and so
  • 26.
  • 27. Processes and Threads Processes : 1. Unit of resource ownership : A process allocated a virtual address space to hold the process image, and from time to time the process may be assigned main memory. * I/O channels. * I/O devices * Files
  • 28. 2. Unit of dispatching : * A process is an execution path (trace) through one or more programs. * This execution may be interleaved with that of other processes. * A process has an execution state * Running * Ready etc.,
  • 29. Threads : 1. It is a separate program is a part of execution and the sub program it is a flow of execution. 2. Dispatching is a particular set of program or unit from a normal program it’s known as threads. process 1 { -- - - - - - - - - - - C=p2.a+b; -- - - - - - - - - - - Print( ); -- - - - - } Thread 1 { -- - - - - - - - - - - - - - - - - C=p2.a+b; -- - - - - - - - - - - - - - - - - } Thread 2 { -- - - - - - - - - - - - - - - - - -- - - - - - Print ( ); -- - - - - - - - - - - }
  • 30. Use of Threads : 1. Foreground and background work. 2. Asynchronous processing. 3. Speed execution. 4. Organizing programs.
  • 31. Concurrency The concurrency is a simultaneous execution of multiple process it is called concurrency. * Multiprogramming * Multiprocessing * Distributed processing
  • 32. Multiprogramming : It is execution of multiple processes with the single processor system. Multiprocessing : Execution of multiple processes with the multi processor computer. Distributed processing : The management of multiple processes execution on multiple, distributed computer system.
  • 33. There are three different contexts : * Multiple application : The processing time of the computer to be dynamically shared the job or number or application. * Structured application : It is an execution of the modular design and structured program a set of concurrent process.
  • 34. * Operating System Structure : The system programmer and the operating system are themselves implemented as a set of processes. Time P1 P2 P3 Interleaving
  • 35. Mutual Exclusion * It is a two process request for same resource but any one process is allowed to enter into critical session and other process has to wait. Mutual Exclusion Software Approach : * It execute on a single-processor or a multiprocessor machine with shared main memory.
  • 36. * It is used to Dekker’s Algorithm. First Attempt : P1 uses the ‘cs’ if 1 is written on the board of igloo or else wait. Second Attempt : cs P1 P2 1 P1 (T) P2 (F) CS (P1)
  • 37. Separate igloos for each process and status is maintain (True/False). Third Attempt : * If P1 fails in cs the P2 is blocked. * If P1 fails outside cs then P2 is not blocked P1 (F) P2 (T) CS (P2) P1 P2 CS ( )Refr esh
  • 38. Semaphores * In concurrent processing some signals are given to all processes indication ‘Run’ or ‘Stop’. * This signal is raised by a variable called semaphore. * Then software for the signals.
  • 39. There are three operation on semaphore. 1. A semaphore may be initialized to a non-negative value. 2. The wait operation decrements the semaphore value. If the value becomes negative, then the process executing the wait is blocked. 3. The signal operation increments the semaphore value. If the value is not positive a process blocked a wait operation is unblocked.
  • 40. Message Passing Message passing provides a mechanism to allow processes to communicate and to synchronize their actions without sharing the same address space. send (destination, message) receive (source, message)
  • 41. Synchronization : Synchronization Addressing Format Send Direct Content Length blocking non-blocking send receive fixed variable explicit implicit Receive Indirect Queuing Discipline blocking non-blocking test for arrival static dynamic ownership FIFO Priority
  • 42. Message Format : Addressing : Header . . . . . . . . Body .… Source Destination Message Length Control Information Message Type Message Contents P1 Pn Qn Q1 Mailbox Sending Process Receiving Process P1 Pn Port Q