Operating System Organization Chapter 3 Processes

  1. From a processors point of view, processes _?_
    • execute  an instruction dictated by program counter.
    • interleaves the execution of various proceses
  2. From an individual program's point of view processes _?_
    execute a sequence of instructions within that program.
  3. Name the eight process elements commonly found in the Process Control Block:
    • Identifier
    • State
    • PriorityProgram
    • Counter
    • Memory Pointers
    • Context Data
    • I/O Status Information
    • Accounting Information
  4. Two essential elements of a process are:
    • Program code
    • A set of data associated with that code.
  5. The Process Control Block contains _?_
    the process elements
  6. The Process Control Block makes it possible to:
    interupt a running process anlater resume execution as if the interruption had not occurred.
  7. The Process Control Block is created and managed by the _?_
    Operating System
  8. Three things the Process Control Block "is"
    The process control block is:

    • included in the context along with the stack
    • a snapshot that contains all necessary and suffiecient data to restart the process where it left off(ID, state, CPU registers, etc.)
    • one entry in the the operating systems process table (array or linked list)
  9. The most fundamental concept in a modern OS is the _?_
  10. The principal function of the OS is to:
    create, manage, and terminate processes.
  11. Process control block contains
    all of the information that is required for the OS to manage the process.
  12. List of the  information that is required for the OS to manage the process
    • current state
    • resources allocated to it
    • priority
    • plus other relevant data
  13. The most important states of a process are:
    • Ready
    • Running
    • Blocked
  14. The running process is
    the one that is currently being executed by the processor
  15. A blocked process is waiting for:
    the completion of some event
  16. A running process is interrupted either by (two things):
    • an interrupt
    • executing a supervisor call to the OS.
  17. Draw a simple process control block:
    Image Upload 1
  18. Process Conrol Block: Draw or describe a typical process image implementation.
    Image Upload 2
  19. Process States: Trace:
    The behavior of an individual process by listing the sequence of instructions that execute for that process
  20. Process States:Dispatcher:
    • Small program that switches the processor from one process to another.
  21. Two-State Process Model is....
    A process model that may be in one of two states:

    • Running
    • Not Running
  22. Draw a state transistion diagram for the Two State Process Model:
    Image Upload 3
  23. List the reasons Process Creation (4):
    • New batch job
    • Interactive logon
    • Created by OS to provide a service
    • Spawned by existing processes
  24. When the OS creates a process at the explict request of another process it is known as:
    Process Spawning
  25. Parent process; in the context of process creation is:
    the original creating process.
  26. Child Process; in the context of process creation is:
    The new process created by the parent process.
  27. In the context of fork()ing and exec()ing a process. what happens when you fork a process?

    Image Upload 4
    When you fork() a process it makes a clone of the parent:

    Image Upload 5
  28. In the context of fork()ing and exec()ing a process. what happens when you exec the new child process?
    The clone is replaced with a new context, data and program:

    Image Upload 6
  29. Process Termination two examples:
    1. Batch job should have a halt instruction or explicit OS service call.

    2. Interactive application --> determined by action of the user (e.g. log off quitting the app).
  30. Reasons for a process termination:
    • Normal completion
    • Time Limit exceeded
    • Memory Unavailable
  31. 5 State Process Model: Name the transitions:

    Image Upload 7
    • 1=Admit
    • 2=Dispatch
    • 3=Release
    • 4=Timeout
    • 5=Event Wait
    • 6=Event Occurs
  32. 5 State Process Model: Name the 5 steps:

    Image Upload 8
  33. 1=New
    • 2=Ready
    • 3=Running
    • 4=Exit
    • 5=Blocked
  34. Two problems with the "Blocked/Ready" model are:
    • Blocked processes are taking up memory space
    • A hungry CPU might soon run out of ready processes in memory.
  35. Define Swapping:
    • Moving part of / all of a process from main memory to disk.
    • When none of the process in main memory is in the READY state,  the OS swaps one of the blocked processes out onto disk -- into a suspend queue
  36. What solves the problems of the "Blocked/Ready" model?
    Swapping out processes from main memory to disk and putting them into a suspended state.
  37. 4 Characteristics of a Suspended Process:
    • The process is not immediately available for execution.
    • The process was placed in a supended state by an agent.
    • The process may or may not be waiting on an event.
    • The process may not be removed from this state until the agent explictily orders the removal.
  38. In the context of a suspended process what is an agent?
    The thing that acted on placing a process in a suspended state.It can be a process; parent or itself, or the OS.
  39. Other than needed main memory release, what are some other reasons for suspending a process?
    • OS suspends a process that may be causing a problem
    • User may wish to suspend execution to debugging or in connection with the use of a resource.
    • Timing -- a process maybe exec. periodically and maybe suspended while waiting for the next time interval.
    • Parent Process Req -- parent may suspend exec of a decendent to examine or modify the suspended process.
  40. Name some OS Control Tables
    • I/O Tables
    • Memory Tables
    • File Tables
    • Process Tables
  41. OS Control Tables: I/O Tables do what?
    Keeps track of, or manages I/O devices and channels of the computer system.
  42. The OS control tables responsible for managing I/O devices (I/O Tables) typical tasks:
    • I/O device availability
    • I/O in progress info: status of I/O operation and location of main memory used as the source and destination of the I/O trasition.
  43. OS Control Tables: Memory Tables must include:
    • allocation of main memory to processes
    • allocation of secondary memory to processes
    • protection attributes of blocks of main or virual memory
    • info needed to mamage virual memory
  44. OS Control Tables: File Tables hold information regarding:
    • existance of files
    • location of files on secondary memory
    • current status of files
    • and other attributes.
  45. OS Control Tables: Process Tables
    • Manage Processes
    • Provide reference to memory, I/O , and files: directly and indirectly
    • Must be acessible by the OS and therefore are subject to memory management.
  46. Process Control Structures: To manage and control a process the OS must know:
    • Where the process is located
    • The attributes of the the process that are necessary for its management.
Card Set
Operating System Organization Chapter 3 Processes
WUSTL Flashcards from CSE 422S Operating Systems Organization