Chapter III

Process management

III.1. Life of a program in OS

A program is generally written in an high programming language. In order to care of a source program to be supported by a machine, we will go through the steps in the following figure:

  • text editor: an interactive program that allows you to enter text from a keyboard and store it in a file.
  • translator: a program that converts a user program written in a source language to a program written in the target language. There are two classes of translators: interpreter, compiler/assembler
  • linker: a program that allows you to combine several object programs into a single program generally called a loadable module
  • loader: an object program obtained after link editing must be loaded into central memory to be executed. The loader takes care of this task. There are two types of chargers: absolute loader , relocatable loader 

III-2 Process

III-2-1 Definition

In a non-formal way, a process is a program in execution. The execution of a process must progress sequentially i.e. At most, one instruction is executed on behalf of the process.

A process is composed of:

  • executable code coming from the source program augmented with libraries introduced during link editing,
  • a context: this is all the resources it has, a register image, process status word, etc.

NB: A program is not a process. A program is a passive entity like the contents of a file stored on disk while a process is an active entity. Although two processes can be associated with the same program, they are considered two separate execution sequences. For example, different users call multiple copies of the text editor program. Each of them is a separate process.

Modifié le: dimanche 16 mars 2025, 10:08