process_concept_introduction_overview.pptx

RishabhDevShukla4 10 views 5 slides Sep 16, 2024
Slide 1
Slide 1 of 5
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5

About This Presentation

Process Concept


Slide Content

Process Concepts Dr. Rupam Bhagawati

Process Concept Process – A program in execution , is called a process. Program is a passive entity stored on disk (executable file), while the process is active P rogram becomes a process when an executable file is loaded into m emory. Multiple parts of a process: T ext section : Includes the actual program code. Stack: Contains temporary data . Such as: Function parameters, return addresses, and local variables . Data section containing global variables . Heap containing memory dynamically allocated during run time . Program Counter Includes the current activity of the process. Fig Process in Memory

Process State As a process executes, it changes state . A process remains in any of the following states during its execution: New : The process is being created . Ready: The process is waiting to be assigned to a processor. R unning: Instructions are being executed . Waiting: The process is waiting for some event to occur . T erminated: The process has finished execution . Fig Process state diagram

Process Control Block (PCB) A process control block (PCB) contains information associated with each process (also called task control block ) . A PCB contains the following information about a process: Process state – running, waiting, etc Program counter – location of instruction to next execute CPU registers – contents of all process-centric registers CPU scheduling information- priorities, scheduling queue pointers Memory-management information – memory allocated to the process Accounting information – CPU used, clock time elapsed since start, time limits I/O status information – I/O devices allocated to the process , list of open files Fig Process Control Block (PCB)

Process Scheduling The main objective of the Multiprogramming concept is to maximize the utilization of the CPU by keeping some processes in the CPU for execution at all times. The objective of the Time-sharing concept is to switch the CPU among processes so frequently that the user can interact with each program. To meet these objectives, lead to the Process scheduling concept. Process Scheduling: When there are several or more runnable processes, the operating system chooses which one to run first; this is known as process scheduling . A scheduler is a program that uses a scheduling algorithm to make choices. There are several types of scheduling algorithms that are responsible for the process scheduling.
Tags