CS322: Processes and Threads

Introduction: The Notion and Importance of Processes

  1. As you know, abstraction is a fundamental design tool in many areas of computer science. In the realm of operating systems, we have already noted that the fundamental abstraction is the notion of a process.

  2. Though we use the term process, other terms have been and are still used for the same concept, including job and task (though each term is also sometimes used to mean something different.)

  3. To manage the various processes, the operating system maintains a set of data structures called process control blocks (PCB's) - one per process.

  4. One of the most important sets of services an operating system provides is those related to the management of processes - including:

Threads

  1. We have said that an operating system manages a set of processes. In recent years, the notion of process has been broadened to include two kinds of processes - traditional, or heavy weight processes, and light weight processes - also known as threads.

  2. The motivation for this developement is a desire to balance considerations of efficiency with considerations of software modularity.

  3. One way to resolve the tension between modularity and efficiency is to allow a single process to be structured as a set of individual threads.

  4. Threads have two major advantages:

  5. Threads can be implemented in two different ways:

  6. On a system that provides threads, processes are usually not allowed to share memory, but threads within a given process always share memory. Processes communicate among themselves by message passing; threads normally communicate through shared memory (though they may also use message passing among themselves if desired.)

  7. A note on terminology:


$Id: processes_threads.html,v 1.1 1998/02/01 22:44:03 senning Exp $

These notes were written by Prof. R. Bjork of Gordon College. In January 1998 they were converted to HTML and lightly editited by J. Senning of Gordon College.