1 / 11

Process Description and Control

Process Description and Control. Definitions replaces task, job program in execution entity that can be assigned to and executed on a processor Process states running ready blocked The main responsibility of an OS is to control the execution of processes. Process concepts.

diza
Download Presentation

Process Description and Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Process Description and Control

  2. Definitions • replaces task, job • program in execution • entity that can be assigned to and executed on a processor • Process states • running • ready • blocked • The main responsibility of an OS is to control the execution of processes Process concepts

  3. Operating systems must interleave the execution of a number of processes • to maximize processor use • while providing reasonable response rate • Operating systems must allocate resources to processes • based on priorities • while avoiding deadlock • Operating systems may support • interprocess communications • user creation of processes OS objectives and processes

  4. Dispatch A two-state process model Exit Enter Not running Running Pause • Process termination • normal completion • abnormal end (abend) • time related • protection error • program error • data error • I/O failure • memory error • Process creation • new batch job • interactive login • OS created to provide a service • spawned by existing process

  5. Process state transitions with suspend and resume I/O or event completion A C T I V E Blocked Dispatch Ready I/O or event wait Timer- runout Running Suspend Resume Resume Suspend Suspended blocked Suspend Suspended ready SWAPPED I/O or event completion

  6. Suspend and swapping • not immediately available • may or may not be waiting for event or I/O • blocked may be independent of suspend • process was placed on suspend by an agent • OS and processes • the OS schedules and dispatches processes for execution by the processor, and allocates resources to processes • OS is the entity that manages the use of system resources by processes Other related concepts

  7. OS control structures • What does the OS needs (a) to be able to control processes and (b) manage resources for them? • memory tables • I/O tables • file tables • process tables • These tables are maintained by the OS • How does it know what and how to create? • Initialization and configuration

  8. What is the physical manifestation of a process? • a program or set of programs • a set of data locations for variables and constants • memory to hold programs and data • stack for procedure calls, parameter passing • PCB - Process Control Block • entity that defines a process to the OS • collection of process attributes: process identification, processor state and process control information. Process control structures

  9. Execution modes: system or user modes • OS core or kernel • Process management • process creation and termination • process scheduling and dispatching • process switching • process synchronization and support for inter-process communication • management of PCBs • Memory management • I/O management • Support functions OS core, kernel or supervisor

  10. Is the Operating System a process? 1. No, separate . . . . P1 P2 P3 Pn Kernel P1 Pn P3 P2 . . . . 2.No, subroutines OS OS OS OS Process switching . . . . . . . . U1 On U2 U3 O1 O2 O3 Un 3. Yes Process switching

  11. Processes and Threads • Process is a unit of: • resource ownership • dispatching • Threads • only an unit of dispatching • inside a process • saves time to create, switch and terminate • A good example: a file server process • each request as a thread • the process spawn the threads

More Related