presentation on cpu process state for btech bca.pptx
Hardikyadav45
18 views
15 slides
Sep 17, 2024
Slide 1 of 15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
About This Presentation
cpu process state
Size: 162.83 KB
Language: en
Added: Sep 17, 2024
Slides: 15 pages
Slide Content
Name - Khushboo Jain
CPU Process State
WHAT IS PROCESS? Program under execution is known as Process. Program is passive entity stored on disk ( executable file ), 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
INTRODUCTION In a multitasking computer system, processes may occupy a variety of states . These distinct states may not be recognized as such by the operating system kernel . However, they are a useful abstraction for the understanding of processes. Execution Condition – It should reside in main memory(primary m/m or RAM). It should occupy the CPU to execute instruction.
The following typical process states are possible on computer systems of all kinds. In most of these states, processes are "stored" on main memory. Primary Process State
NEW /CREATED When a process is first created, it occupies the "created" or "new" state. In this state, the process awaits admission to the "ready" state. Admission will be approved or delayed by a long-term scheduler (LTS) or job scheduler.
2. READY A "ready" or "waiting" process has been loaded into main memory and is awaiting execution on a CPU In ready state, we will have multiple no. of processes and one of the processes will be selected for scheduling on the “running” state. Short term scheduler (STS) or CPU scheduler selects one of the processes from ready state nd allocates CPU for execution.
3. RUNNING A process moves into the running state when it is chosen for execution. The process is preempted because the OS decides to schedule some other higher priority process.
4. WAIT OR BLOCK The running process , sometimes move to wait or block state because of following:- Process require I/O operation. Process request memory and some other resources. Process wishes to wait for a specific interval of time. Process waits for message or action from some other process.
5. TERMINATION A process may be terminated , either from the "running" state by completing its execution or by explicitly being killed. The underlying program is no longer executing, but the process remains in the process table as a zombie process until its parent process calls the wait system call to read its exit status , at which point the process is removed from the process table, finally ending the process's lifetime. If the parent fails to call wait, this continues to consume the process table entry.
ADDITIONAL PROCESS STATES Two additional states are available for processes in system. In both of these states, processes are "stored" on secondary memory (typically a hard disk ).
SUSPEND READY When the resources are not sufficient to manage the processes in ready state then some of the processes will be suspended and move to ‘Suspend Ready’ state. A process may be swapped out, that is, removed from main memory and placed on external storage by the Mid term scheduler(MTS).
2. SUSPEND AND BLOCK Also called SWAPPED OUT and BLOCKED. In this event the process is both swapped out and blocked. Although in this case, the process will move to the blocked state, and may still be waiting for a resource to become available.