DOC PREVIEW
UMD CMSC 412 - Process Description and Control

This preview shows page 1-2-3-4-25-26-27-51-52-53-54 out of 54 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 54 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Process Description and ControlAnnouncementsMajor Requirements of an Operating SystemProcessSlide 5Slide 6Slide 7Two-State Process ModelNot-Running Process in a QueueProcess CreationProcess TerminationReasons for Process TerminationSlide 13ProcessesA Five-State ModelSlide 16Slide 17Using Two QueuesSlide 19Suspended ProcessesOne Suspend StateTwo Suspend StatesReasons for Process SuspensionSlide 24Operating System Control StructuresMemory TablesI/O TablesFile TablesProcess TableProcess LocationSlide 31Process Control BlockSlide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Processor State InformationPentium II EFLAGS RegisterModes of ExecutionSlide 44When to Switch a ProcessSlide 46Change of Process StateSlide 48Execution of the Operating SystemSlide 50Slide 51UNIX SVR4 Process ManagementUNIX Process StatesSlide 54Process Description and ControlChapter 3Announcements•Accounts on linuxlab.cs.umd.edu•Newsgroup will be announced shortly•Project will be posted Wednesday, Sept 18, noon, due on Oct 2,11:59 am. •HW0 is due Wedensday, Sept 18, 11:59 am by e-mail to liaomay@cs•Next recitation: Unix process API•Next homework will be posted next Wednesday, Sept 25, due on Oct 9.Major Requirements of anOperating System•Interleave the execution of several processes to maximize processor utilization while providing reasonable response time•Allocate resources to processes•Support interprocess communication and user creation of processesProcess•Also called a task•Execution of an individual program•Can be traced–list the sequence of instructions that executeTwo-State Process Model•Process may be in one of two states–Running–Not-runningNot-Running Process in a QueueProcess Creation•Submission of a batch job•User logs on•Created to provide a service such as printing•Process creates another processProcess Termination•Batch job issues Halt instruction•User logs off•Quit an application•Error and fault conditionsReasons for Process Termination•Normal completion•Time limit exceeded•Memory unavailable•Bounds violation•Protection error–example write to read-only file•Arithmetic error•Time overrun–process waited longer than a specified maximum for an eventReasons for Process Termination•I/O failure•Invalid instruction–happens when try to execute data•Privileged instruction•Data misuse•Operating system intervention–such as when deadlock occurs•Parent terminates so child processes terminate•Parent requestProcesses•Not-running–ready to execute•Blocked–waiting for I/O•Dispatcher cannot just select the process that has been in the queue the longest because it may be blockedA Five-State Model•Running•Ready•Blocked•New•ExitUsing Two QueuesSuspended Processes•Processor is faster than I/O so all processes could be waiting for I/O•Swap these processes to disk to free up more memory•Blocked state becomes suspend state when swapped to disk•Two new states–Blocked, suspend–Ready, suspendOne Suspend StateTwo Suspend StatesReasons for Process SuspensionOperating System Control Structures•Information about the current status of each process and resource•Tables are constructed for each entity the operating system managesMemory Tables•Allocation of main memory to processes•Allocation of secondary memory to processes•Protection attributes for access to shared memory regions•Information needed to manage virtual memoryI/O Tables•I/O device is available or assigned•Status of I/O operation•Location in main memory being used as the source or destination of the I/O transferFile Tables•Existence of files•Location on secondary memory•Current Status•Attributes•Sometimes this information is maintained by a file-management systemProcess Table•Where process is located•Attributes necessary for its management–Process ID–Process state–Location in memoryProcess Location•Process includes set of programs to be executed–Data locations for local and global variables–Any defined constants–Stack•Process control block–Collection of attributes•Process image–Collection of program, data, stack, and attributesProcess Control Block•Process identification–Identifiers•Numeric identifiers that may be stored with the process control block include •Identifier of this process •Identifier of the process that created this process (parent process) •User identifierProcess Control Block•Processor State Information–User-Visible Registers•A user-visible register is one that may be referenced by means of the machine language that the processor executes. Typically, there are from 8 to 32 of these registers, although some RISC implementations have over 100.Process Control Block•Processor State Information–Control and Status RegistersThese are a variety of processor registers that are employed to control the operation of the processor. These include••Program counter: Contains the address of the next instruction to be fetched••Condition codes: Result of the most recent arithmetic or logical operation (e.g., sign, zero, carry, equal, overflow)•Status information: Includes interrupt enabled/disabled flags, execution modeProcess Control Block•Processor State Information–Stack Pointers•Each process has one or more last-in-first-out (LIFO) system stacks associated with it. A stack is used to store parameters and calling addresses for procedure and system calls. The stack pointer points to the top of the stack.Process Control Block•Process Control Information–Scheduling and State InformationThis is information that is needed by the operating system to perform its scheduling function. Typical items of information:•Process state: defines the readiness of the process to be scheduled for execution (e.g., running, ready, waiting, halted).••Priority: One or more fields may be used to describe the scheduling priority of the process. In some systems, several values are required (e.g., default, current, highest-allowable)••Scheduling-related information: This will depend on the scheduling algorithm used. Examples are the amount of time that the process has been waiting and the amount of time that the process executed the last time it was running.•Event: Identity of event the process is awaiting before it can be resumedProcess Control Block•Process Control Information–Data Structuring•A process may be linked to other process in a queue, ring, or


View Full Document

UMD CMSC 412 - Process Description and Control

Documents in this Course
Security

Security

65 pages

Deadlocks

Deadlocks

22 pages

Set 2

Set 2

70 pages

Project 2

Project 2

21 pages

Load more
Download Process Description and Control
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Process Description and Control and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Process Description and Control 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?