Unit 11

Cards (10)

  • What is process control management?

    Activities involved in managing the execution of multiple processes in an operating system
  • Process states
    As a program executes, it changes states
    • New
    • Ready
    • Ready - Running (running process can be blocked, ready, or terminated)
  • The NEW state
    This is when a process has just been created
    Reasons for creating a process:
    • New batch job
    • Interactive logon
    Upon creation, the NEW process will become READY
  • The READY state
    It is when a process is waiting to be assigned to a processor
    Ready - Running:
    • It is when instructions are being executed, where a process is using the CPU
  • Running process becomes blocked when:
    ...
    • The process cannot be executed because it is waiting for an I/O operation to be completed
    • Waiting for an external event to occur
    From the blocked state, a process will move to the ready state when the event that the process is waiting for is completed
  • Running process moves to ready state when:
    ...
    • A process has reached its maximum allowable time for uninterrupted execution
    • A process needs a resource that is not immediately available
    • A process needs an I/O operation before it continues
  • Running process becomes terminated when:
    ...
    • The process has been completed/aborted
    Reasons for process termination:
    • Normal completion
    • Invalid instruction
    • Memory unavailable
  • Each process in an OS is represented as a process control block, what is a process control block?
    A process control block keeps track of each process, it contains information associated with a specific process

    PCB diagram:
    • Process state - ready, running, blocked, terminated
    • Program counter - indicates the location for the next instruction
    • CPU scheduling information - process priority
    • Accounting information - statistics on CPU time, job, and process numbers
    • I/O status - list of I/O devices which are allocated to processes
  • Process scheduling
    ...
    • As processes enter the system, they are put on the JOB QUEUE
    • The process waits until it is selected for execution (or dispatched) and is given CPU resources
    Once the CPU is allocated and the process is running:
    • The process could issue an I/O request and be placed on a device queue
    • The device could create a new sub-process
    • The process could be forcibly removed
  • What is a thread?
    An individual executable part of a process
    There are 2 types:
    • User processes
    • System processes
    Creation of a new process (child) from the older one (parent) is called spawning or forking