SlideShare a Scribd company logo
1 of 16
PROCESS
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
M.V B Murali Krishna M
Assistant Professor
B.Tech,M.Tech ,(PhD)
Department of Computer Science &
Engineering
OBJECTIVES
• To introduce the notion of a process -- a program in
execution, which forms the basis of all computation
• To describe the various features of processes, including
scheduling, creation and termination, and communication
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
CONTENT
• Process Concept- (RL- 103 page no)
• Process Control block- (RL - 105 page no)
• Context switching.- (RL - 112 Page.no)
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
WHAT IS A PROCESS?
• A process is a program in execution which then forms the
basis of all computation.
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
PROCESS CONCEPT
Process memory is divided into four sections for efficient working :
1. The Text section is made up of the compiled program code, read in from non-
volatile storage when the program is launched.
2. The Data section is made up of the global and static variables, allocated and
initialized prior to executing the main.
3. The Heap is used for the dynamic memory allocation and is managed via calls to
new, delete, malloc, free, etc.
4. The Stack is used for local variables. Space on the stack is reserved for local
variables when they are declared.
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
CONT..
Program is passive entity, process is active
 Program becomes process when executable file loaded into memory
Execution of program started via GUI mouse clicks,
command line entry of its name, etc
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
PROCESS IN MEMORY
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
PROCESS STATE
As a process executes, it changes state
new: The process is being created
running: Instructions are being executed
waiting: The process is waiting for some event to occur
ready: The process is waiting to be assigned to a processor
terminated: The process has finished execution
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
DIAGRAM OF PROCESS STATE
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
PROCESS CONTROL BLOCK (PCB)
• Each process is represented in the operating system by a
process control block(PCB) –also called a task control
block.
• It contains many pieces of information associated with a
specific process, including these
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
PROCESS CONTROL BLOCK (PCB)
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
INFORMATION ASSOCIATED WITH EACH PROCESS
• Process state
• Program counter
• CPU registers
• CPU scheduling information
• Memory-management information
• Accounting information
• I/O status information
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
Process state : the state may be new, ready , running ,waiting , halted .
Program Counter : This contains the address of the next instruction that needs to be executed in the
process.
CPU registers : This specifies the registers that are used by the process. They may include accumulators,
index registers, stack pointers, general purpose registers etc.
CPU Scheduling Information:- The process priority, pointers to scheduling queues etc. is the CPU
scheduling information that is contained in the PCB. This may also include any other scheduling
parameters.
Memory Management Information:-The memory management information includes the page tables or the
segment tables depending on the memory system used. It also contains the value of the base registers,
limit registers etc.
I/O Status Information:- This information includes the list of I/O devices used by the process, the list of
files etc.
Accounting information:-The time limits, account numbers, amount of CPU used, process numbers etc. are
all a part of the PCB accounting information.
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
CONTEXT SWITCHING
What is context switching ?
A context switching is a process that involves switching of the CPU from one process or task
to another. In this phenomenon, the execution of the process that is present in the running state
is suspended by the kernel and another process that is present in the ready state is executed by
the CPU.
It is one of the essential features of the multitasking operating system. The processes are
switched so fastly that it gives an illusion to the user that all the processes are being executed
at the same time.
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
CPU SWITCH FROM PROCESS TO PROCESS
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
THE FOLLOWING STEPS WILL BE PERFORMED:
1. Firstly, the context of the process P1 i.e. the process present in the running state will be
saved in the Process Control Block of process P1 i.e. PCB1.
2. Now, you have to move the PCB1 to the relevant queue i.e. ready queue, I/O queue,
waiting queue, etc.
3. From the ready state, select the new process that is to be executed i.e. the process P2.
4. Now, update the Process Control Block of process P2 i.e. PCB2 by setting the process
state to running. If the process P2 was earlier executed by the CPU, then you can get the
position of last executed instruction so that you can resume the execution of P2.
5. Similarly, if you want to execute the process P1 again, then you have to follow the same
steps as mentioned above(from step 1 to 4).
V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E

More Related Content

Similar to VCE_Process_UNIT-1 (1).pptx

OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptx
Gokhul2
 
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
 
Building Cultural Awareness through EmotionPresented By Team .docx
Building Cultural Awareness through EmotionPresented By Team .docxBuilding Cultural Awareness through EmotionPresented By Team .docx
Building Cultural Awareness through EmotionPresented By Team .docx
hartrobert670
 
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
 

Similar to VCE_Process_UNIT-1 (1).pptx (20)

OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptx
 
Process
ProcessProcess
Process
 
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
 
Part 1 - PROCESS CONCEPTS
Part 1  - PROCESS CONCEPTSPart 1  - PROCESS CONCEPTS
Part 1 - PROCESS CONCEPTS
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
Building Cultural Awareness through EmotionPresented By Team .docx
Building Cultural Awareness through EmotionPresented By Team .docxBuilding Cultural Awareness through EmotionPresented By Team .docx
Building Cultural Awareness through EmotionPresented By Team .docx
 
OS_UNIT_2 Study Materials (1).docx
OS_UNIT_2 Study Materials (1).docxOS_UNIT_2 Study Materials (1).docx
OS_UNIT_2 Study Materials (1).docx
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: Process
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Management
 
Processing management
Processing managementProcessing management
Processing management
 
Lesson 7 Process Control Block
Lesson 7 Process Control BlockLesson 7 Process Control Block
Lesson 7 Process Control Block
 
Process
ProcessProcess
Process
 
Lecture 14 run time environment
Lecture 14 run time environmentLecture 14 run time environment
Lecture 14 run time environment
 
UNIT I-Processes.pptx
UNIT I-Processes.pptxUNIT I-Processes.pptx
UNIT I-Processes.pptx
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
 
Process
ProcessProcess
Process
 
Processes
ProcessesProcesses
Processes
 
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
 

Recently uploaded

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 

Recently uploaded (20)

MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 

VCE_Process_UNIT-1 (1).pptx

  • 1. PROCESS V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E M.V B Murali Krishna M Assistant Professor B.Tech,M.Tech ,(PhD) Department of Computer Science & Engineering
  • 2. OBJECTIVES • To introduce the notion of a process -- a program in execution, which forms the basis of all computation • To describe the various features of processes, including scheduling, creation and termination, and communication V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 3. CONTENT • Process Concept- (RL- 103 page no) • Process Control block- (RL - 105 page no) • Context switching.- (RL - 112 Page.no) V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 4. WHAT IS A PROCESS? • A process is a program in execution which then forms the basis of all computation. V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 5. PROCESS CONCEPT Process memory is divided into four sections for efficient working : 1. The Text section is made up of the compiled program code, read in from non- volatile storage when the program is launched. 2. The Data section is made up of the global and static variables, allocated and initialized prior to executing the main. 3. The Heap is used for the dynamic memory allocation and is managed via calls to new, delete, malloc, free, etc. 4. The Stack is used for local variables. Space on the stack is reserved for local variables when they are declared. V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 6. CONT.. Program is passive entity, process is active  Program becomes process when executable file loaded into memory Execution of program started via GUI mouse clicks, command line entry of its name, etc V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 7. PROCESS IN MEMORY V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 8. PROCESS STATE As a process executes, it changes state new: The process is being created running: Instructions are being executed waiting: The process is waiting for some event to occur ready: The process is waiting to be assigned to a processor terminated: The process has finished execution V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 9. DIAGRAM OF PROCESS STATE V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 10. PROCESS CONTROL BLOCK (PCB) • Each process is represented in the operating system by a process control block(PCB) –also called a task control block. • It contains many pieces of information associated with a specific process, including these V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 11. PROCESS CONTROL BLOCK (PCB) V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 12. INFORMATION ASSOCIATED WITH EACH PROCESS • Process state • Program counter • CPU registers • CPU scheduling information • Memory-management information • Accounting information • I/O status information V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 13. Process state : the state may be new, ready , running ,waiting , halted . Program Counter : This contains the address of the next instruction that needs to be executed in the process. CPU registers : This specifies the registers that are used by the process. They may include accumulators, index registers, stack pointers, general purpose registers etc. CPU Scheduling Information:- The process priority, pointers to scheduling queues etc. is the CPU scheduling information that is contained in the PCB. This may also include any other scheduling parameters. Memory Management Information:-The memory management information includes the page tables or the segment tables depending on the memory system used. It also contains the value of the base registers, limit registers etc. I/O Status Information:- This information includes the list of I/O devices used by the process, the list of files etc. Accounting information:-The time limits, account numbers, amount of CPU used, process numbers etc. are all a part of the PCB accounting information. V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 14. CONTEXT SWITCHING What is context switching ? A context switching is a process that involves switching of the CPU from one process or task to another. In this phenomenon, the execution of the process that is present in the running state is suspended by the kernel and another process that is present in the ready state is executed by the CPU. It is one of the essential features of the multitasking operating system. The processes are switched so fastly that it gives an illusion to the user that all the processes are being executed at the same time. V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 15. CPU SWITCH FROM PROCESS TO PROCESS V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E
  • 16. THE FOLLOWING STEPS WILL BE PERFORMED: 1. Firstly, the context of the process P1 i.e. the process present in the running state will be saved in the Process Control Block of process P1 i.e. PCB1. 2. Now, you have to move the PCB1 to the relevant queue i.e. ready queue, I/O queue, waiting queue, etc. 3. From the ready state, select the new process that is to be executed i.e. the process P2. 4. Now, update the Process Control Block of process P2 i.e. PCB2 by setting the process state to running. If the process P2 was earlier executed by the CPU, then you can get the position of last executed instruction so that you can resume the execution of P2. 5. Similarly, if you want to execute the process P1 again, then you have to follow the same steps as mentioned above(from step 1 to 4). V A S A V I C O L L E G E O F E N G I N E E R I N G , D E P T . C S E