{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Operating System Concepts, Seventh Edition

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COMP 314 - Unit 2 (Notes) Process Concepts (81) o A process is a unit of work in a modern time-sharing system. A batch system executes jobs. A time-sharing system has user programs, or tasks (processes). o The Process A process is more than just the program code ( text section ) it is also the values of the program counter and processor’s stack registers. (82) A process usually includes a process stack This contains temporary data (function parameters, return addresses, etc.) and a data section which contains global variables. May include a heap, which is memory dynamically allocated during run time. A program is not a process; a program is a passive entity, whereas a process is an active entity. A program becomes a process when it is loaded into memory. Multiple executions of the same program result in multiple distinct processes. o Process State (83) Each process may be in one of the following states; New – Process is being created. Running – Instructions are being executed. Waiting – The process is waiting for some event to occur (such as I/O) Ready – The process is waiting to be assigned to a processor. Terminated – The process has finished execution. Only one process can be running on a processor at any given time, others may be ready or waiting. o Process Control Block (83) Each process is represented in the OS by a process control block (PCB) or task control block. It contains many pieces of information, which include: Process state – ready, new, waiting, etc. Program Counter – Address of the next instruction to be processed. CPU registers o Vary in number and type. o They include accumulators, index registers, stack pointers, and general-purpose registers, plus any condition-coding information. o Along with the program counter, this state information must be saved when an interrupt occurs, to allow the process to be continued correctly afterwards. CPU-Scheduling Information o Includes a process priority, pointers to scheduling queues, and any other scheduling parameters. o May include such information as the value of the base and limit registers, the page tables, or the segment tables, depending on the memory system used by the OS. Memory-Management Information o Includes values of base and limit registers, page tables, or the segments tables. Accounting Information o Amount of CPU and real time used, time limits, account numbers, job or process numbers, and so on. I/O status information o List of I/O devices allocated to the process, a lit of open files, and so on. o Threads (84) This is a thread of execution of which single thread computing only allows one thread to be executed at a time. Process Scheduling o Objectives: maximize CPU utilization by continually having a process running; switch among CPU process to give the fiction of simultaneous processing. (85) To meet these objects there is a process scheduler which selects an available process (possibly from a set of available processes) for program execution on the CPU.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern