Process State Model -Compiled by Sheetal for CSIT

Slides:



Advertisements
Similar presentations
Chapter 3 Process Description and Control
Advertisements

A. Frank - P. Weisberg Operating Systems Process Scheduling and Switching.
Process Description and Control
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
1/27/2010CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying an earlier version.
1 Process Description and Control Chapter 3. 2 Process Management—Fundamental task of an OS The OS is responsible for: Allocation of resources to processes.
CSCE 351: Operating System Kernels
1HW1 Explain the transition “interrupted” and “event wait.” Describe how they are different. NewReadyRunningTerminated Waiting (Blocked) admitted Dispatched.
1 An Architectural View of an OS Inter-process communication Process Scheduling Process Control Subsystem File Subsystem Device Drivers Hardware Control.
Computer Organization and Architecture
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Process by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
MicroC/OS-II Embedded Systems Design and Implementation.
Process Description and Control A process is sometimes called a task, it is a program in execution.
Process Description and Control
Operating System 3 PROCESS DESCRIPTION AND CONTROL.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
Operating System 3 PROCESS DESCRIPTION AND CONTROL.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 4 Processes. Process: what is it? A program in execution A program in execution usually usually Can also have suspended or waiting processes Can.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Processes & Threads Bahareh Goodarzi. Single & Multiple Thread of control code files data code files data.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Scheduling Example 3 (1) Assume: FIFO Job Scheduling 100 K Main Memory Processor Sharing Process Scheduling (Cont…)
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
Chapter 5 Processor Scheduling Introduction Processor (CPU) scheduling is the sharing of the processor(s) among the processes in the ready queue.
The act of Scheduling a process means changing the active PCB pointed to by the CPU. Also called a context switch. A context switch is essentially the.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems with Multi-programming Chapter 4.
Concurrency & Context Switching Process Control Block What's in it and why? How is it used? Who sees it? 5 State Process Model State Labels. Causes of.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Cs431-cotter1 Processes and Threads Tanenbaum 2.1, 2.2 Crowley Chapters 3, 5 Stallings Chapter 3, 4 Silberschaz & Galvin 3, 4.
Processes 2 Introduction to Operating Systems: Module 4.
Process Control Management Prepared by: Dhason Operating Systems.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Multiprogramming. Readings r Chapter 2.1 of the textbook.
OPERATING SYSTEMS CS 3502 Fall 2017
Resource Management IB Computer Science.
Processes and threads.
Process concept.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Topics Covered What is Real Time Operating System (RTOS)
Operating Systems (CS 340 D)
OPERATING SYSTEMS CS3502 Fall 2017
Lecture Topics: 11/1 Processes Process Management
Day 08 Processes.
Day 09 Processes.
Process Description and Control
Intro to Processes CSSE 332 Operating Systems
Operating Systems (CS 340 D)
Operating Systems CPU Scheduling.
Operating Systems Lecture 6.
Process & its States Lecture 5.
TDC 311 Process Scheduling.
Process Description and Control
Process Description and Control
Threads Chapter 4.
Process Description and Control
Operating System 3 PROCESS DESCRIPTION AND CONTROL
Process Description and Control
Process Description and Control
Process Description and Control
Process Description and Control
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Chapter 3: Processes Process Concept Process Scheduling
Presentation transcript:

Process State Model -Compiled by Sheetal for CSIT www.key2computer.blogspot.com (Ref: Modern Operating System by A.S Tanenbaum & Wikipedia)

Process State Three Model Popular Any state process management model is a perfectly valid design for an operating system Each state in respective model are mutually exclusive

Two State Model Process is in one of two state Running Not-Running When the operating system creates a new process, that process is initially labeled as NOT RUNNING, and is placed into a queue in the system in the NOT RUNNING state. The process (or some portion of it) then exists in main memory, and it waits in the queue for an opportunity to be executed. After some period of time, the currently RUNNING process will be interrupted, and moved from the RUNNING state to the NOT RUNNING state, making the processor available for a different process.

Three state model In two state model the absence of a BLOCKED state means that the processor lies idle when the active process changes from CPU cycles to I/O cycles. Thus Three state model 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 operatio

State Transition in 3-State RUNNING → READY The most common reason for this transition is that the running process has reached the maximum allowable time for uninterrupted execution; i.e. 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.

State Transition in 3 state

5 state Model 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.

State Transition in 5-state model BLOCKED then 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 then 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 then 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

5 state Model

Context Switch A context switch is the mechanism to store and restore the state or context of a CPU in Process Control block so that a process execution can be resumed from the same point at a later time. Using this technique, a context switcher enables multiple processes to share a single CPU. Context switching is an essential part of a multitasking operating system features.

Context Switch