Process of the operating system

Process

A process is a unit of processing managed by the operating system (it is a program in execution)

The operating system implements a collection of abstract machines

Each machine is a simulation of the hardware of the von Neumann underlying

The process manager creates the environment in which coexist various processes. Each one runs in its own abstract machine as a multi-tasking

A resource is any element of the abstract machine that can be requested by a process

A process requests a resource by making a system call, which can cause it to crash if it is not available

The reservation of the resource causes the resource to be part of the configuration of the abstract machine in the process

Examples of resources: processor, main memory, I/O devices, files

Tables of the operating system

The operating system maintains tables that describe the processes and resources of the system:

  • Process tables: tables of BCPs
  • Tables of memory: information on the use of the memory
  • Tables of I/O: information associated with the peripherals and the I/O operations
  • Tables files: information about the files open

Operating system tables

Memory image of the process

A process address space is the set of logical addresses that can be routed

On computers 32 bit the max is 4 GB

On 64 bit computers, the maximum is 128 GB, however, at present there are no plates that support memories so great

The memory image of the process is the block of physical memory assigned to the process

The address space of the process is limited to the block of physical addresses corresponding

The address space is important for the protection of resources against unauthorized access

State of the processor

When running, the processor state resides in the processor logs:

  • General records
  • PC
  • Stack pointer (SP)
  • State records
  • Special registers

When it does not run, its processor state resides in the BCP

Change of context

When an outage occurs:

  • Saves the state of the processor at the corresponding BCP
  • It starts executing the routine treatment of interruption of the operating system

Scheduler:

  • Module of the operating system that selects the next process to run

Dispatcher:

  • Module of the operating system that makes running the selected process

Process Control Block (PCB)

Information process identification

  • Process and parent ID (pid, ppid)
  • Actual and effective user ID (uid, euid)
  • Actual and effective group ID (gid, egid)

Information of the state of the processor

Information of control of the process

  • Information for planning and status
  • Description of the address space
  • Assigned resources (open files, ports, ...)
  • Communication between processes
  • Pointers for structuring the processes in lists or queues