Definitions

process

(section 1.3.1) In operating systems, a 'process' is something which owns resources---memory resources, CPU resources, open files, windows---and can make calls to the operating system. Typically a process is a running program. In a multitasking system, there will be many concurrent processes. A process has one or more threads of execution.

thread

(section 12.1) In traditional operating systems, the process formed the only means of concurrency. Each process provided a single thread of execution.

In modern operating systems, processes may be multithreaded. A single process may consist of several concurrent threads, each of which seems to be executing independently. All the threads in the same process share memory, open files, and other system resources.

Think of processes as being walled off and separated; protected from each other (protected from walking all over each others' areas of memory, for example). Running several of these 'walled-off' processes concurrently is quite expensive (in terms of process-switching overhead) for the processor). Threads within a single process, however, are not walled off from each other. They are typically cooperating in a single task, so less protection is needed between them. This makes them more efficient; it is less expensive to run a few processes with many threads, than it is to run many processes with a few threads each.

processor

Remember to distinguish between a process and a processor. The processor is the physical CPU which executes code; a process is a task which may have its code executed by a processor. In a multitasking system, the Operating System gives the illusion that the threads of many processes are executing concurrently. Often there is only one processor, though, and the OS shares the processor between the running threads of all the processes.

If there is more than one processor, the threads really do execute in parallel, but in a multitasking system it is irrelevant to the user code how many processors there are in the system (except that more processors make things go faster).

interrupt

You should know what interrupts are. They are hardware events, often triggered by external devices, like the system clock, or a peripheral which needs more data, or the monitor when it starts its refresh cycle.

When an interrupt occurs, a special software routine called an interrupt handler (or 'Interrupt Service Routine'---ISR) is called, interrupting (hence the name) the program currently being run by the CPU. The interrupt handler is responsible for dealing with whatever situation the interrupt signaled.

One of the duties of an OS is to hide the intricacies of dealing with interrupts, usually completely hiding interrupts from user processes (though device drivers and other services require at least limited access to the interrupt mechanism).

file system

(section 1.3.2) The file system is a user-level view of data stored on disks, on the network, in memory... In most modern OSs, the file system is hierarchical (so that files are arranged in directories, forming a directory tree) and unified, meaning that all the different devices, disks and whatever else, all appear in the same tree (in the same name space).

The word 'filesystem' is quite overloaded. It sometimes refers to

  1. the whole tree, possibly containing different disks and devices (the 'virtual filesystem'),
  2. the data structures on a particular disk, representing all the files and directories (the filesystem format), or
  3. the piece of software responsible for understanding a particular filesystem format and reading and writing to the disk.

The filesystem software used to be firmly part of the operating system, but nowadays users expect to be able to plug in new devices as required, so often the filesystem code is user-level software, and the OS is responsible only for managing the various filesystem handlers, and integrating the different filesystems into a single tree.


last updated 6 February 1997