Processes and Process Table

Slides:



Advertisements
Similar presentations
Processing Order: Cooperative vs. Preemptive Process B2 Process A Process C Process B1 Process D Process A (low priority, cyclic) Process C (high priority,
Advertisements

Process management Information maintained by OS for process management  process context  process control block OS virtualization of CPU for each process.
CHAPTER 2 PROCESSOR SCHEDULING PART I By U ğ ur HALICI.
A. Frank - P. Weisberg Operating Systems Process Scheduling and Switching.
Processes CSCI 444/544 Operating Systems Fall 2008.
1/27/2010CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying an earlier version.
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
Processes April 5, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
CE Operating Systems Lecture 5 Processes. Overview of lecture In this lecture we will be looking at What is a process? Structure of a process Process.
Lecture 2 Process Concepts, Performance Measures and Evaluation Techniques.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Dr. R R DOCSIT, Dr BAMU. Basic Java : Multi Threading 2 Objectives of This Session State what is Multithreading. Describe the life cycle of Thread.
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
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.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
SLC/VER1.0/OS CONCEPTS/OCT'99 1Processes Process Concept Process Scheduling Operation On Processes Cooperating Processes Threads Interprocess Communication.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Lecture 3 Process.
Process concept.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
CS 6560: Operating Systems Design
Operating Systems (CS 340 D)
Lecture Topics: 11/1 Processes Process Management
Processes A process is a running program.
Intro to Processes CSSE 332 Operating Systems
IS310 Hardware & Network Infrastructure Ronny L
Operating Systems (CS 340 D)
Chapter 3: Processes.
Operating Systems CPU Scheduling.
Process management Information maintained by OS for process management
ICS 143 Principles of Operating Systems
Introduction What is an operating system bootstrap
Processes in Unix, Linux, and Windows
Operating System Concepts
Operating Systems Lecture 6.
Process & its States Lecture 5.
TDC 311 Process Scheduling.
Operating System Concepts
PROCESS MANAGEMENT Information maintained by OS for process management
Lecture Topics: 11/1 General Operating System Concepts Processes
Process Description and Control
Processes Hank Levy 1.
Process Description and Control
Lesson Objectives Aims Key Words
EE 472 – Embedded Systems Dr. Shwetak Patel.
Process Description and Control
Ainsley Smith Tel: Ex
Process Description and Control
Process Description and Control
Process Description and Control
CS149D Elements of Computer Science
Processes David Ferry CSCI 3500 – Operating Systems
Processes in Unix, Linux, and Windows
Uniprocessor Process Management & Process Scheduling
Processes in Unix and Windows
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
CS510 Operating System Foundations
Process Description and Control
Process State Model -Compiled by Sheetal for CSIT
Processes Hank Levy 1.
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Chapter 3: Processes Process Concept Process Scheduling
Uniprocessor Process Management & Process Scheduling
Presentation transcript:

Processes and Process Table

Multitasking Doing more than one task at the same time. Most people like to multitask, but can only focus on a single task at any instant. CPU can only perform 1 instruction at a time (unless multi-core) but the OS can make it appear to be doing more than one task. Before switching sheets, ask if anybody uses a mobiles while driving. How to they dial (or text) while driving? Go back and forth between the two tasks giving priority to the driving aspect.

What is a process? Application that is running on a computer. Now we start a dialog about what is required. Make somebody the CPU and have 2 or 3 students act as processes (i.e. instruction lists) and have them work together on the CPU with the instructor calling the switch. One of the instruction lists should have a long wait so that we don’t schedule them. This should demonstrate the concept of context switching, will point out that the process has states. We can start building up a state model with the 2 states of running or not running.

2 State Process dispatched Ready Running interrupted Ready means that the process could run but the CPU is already busy. Important to keep in mind that there are other processes. Perhaps a set of cards with the words ready and running could be held up by the students following the direction of the instructor? Introduce the instruction “sleep until” which means that we have no choice but to introduce another state….

Process Switching The OS can switch to a new process at any time but the process shouldn’t know about a switch happening. The state of the current process is changed to Ready, the next process is changed to Running. Selecting the next process is called “scheduling” (a later topic).

When to Switch Time based When process is finished. After the process has run for a certain amount of time. OS interrupts the process regardless of what it is doing and changes state to ready. Called “preemptive” switch. When process is finished.

3 State Process Model dispatched Ready Running interrupted event happened wait for event One more step to go… add the beginning and ending states. Blocked

Process Switching When the process asks to wait it becomes blocked. While blocked the OS will never select the process to run.

When to Switch Time based When process asks the OS for something. If process consumes too much CPU time it is changed to ready and another process is allowed to run. OS may not support this!! (Windows 3.1 was an example, but most do now) When process asks the OS for something. Called a non-preemptive switch.

Typical State Process Model dispatched New Ready Running Exit interrupted event happened wait for event Most operating systems keep a table of processes from the time they are created until the time they are finished. When in the table, they need a state… creating a process could take several milliseconds and you do not want the process to start running if it is not completely ready (trust me on this one!). Blocked

Process Table Information about all processes currently “active”. Process ID State Privileged Process Name Priority Register Set File List 45 Ready No iexplorer.exe Medium PC=1000, AX=3421 empty 50 Running word.exe PC=4000, AX=1111 Mylecture.doc 81 Blocked (waiting) Outlook.exe PC=8321, AX=1 720 Yes winlogon.exe High PC=34, AX=-1234

What Happens During A Process Switch? CPU registers are saved. Process state is changed. New process is selected. CPU registers for new process are loaded. New process state is changed. CPU starts executing at new PC.