Process (Linux)

A process is just a program in execution.

I had a really solid introduction through Hemal Shah, but formally learned through SE350.

A process consists of 3 components:

  1. An executable program
  2. Associated data needed by the program (variables, work space, buffers, etc.)
  3. Execution context of the program
  • All information the OS needs to manage the process

A process can be uniquely characterized by a number of elements, including the following:

  • Identier (PID)
  • State (see 5 State Process Model)
  • Priority (relative to other processes)
  • Memory pointers (Pointers + shared memory blocks)
  • Context data (Registers, PSW, program counter)
  • I/O status information (Outstanding I/O requests, used I/O devices)
  • Accounting information
    • Amount of processor time, time limits, threads
    • Use top and ulimit

The above information is stored in a Process Control Block.


Implementing Processes in an OS

The simplest way is to design a single queue with a Two-State Process Model (see page). However, there are many limitations. This is why we move on to a Five-State Process Model, with the addition of Process Suspension.