Processes Flashcards

1
Q

A running program

A

Process = program in execution. Many processes can run the same programs text and each process has its one address space (isolation). A parent process can create/fork child processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Process Isolation

A

Each process has its own address space and no other process can access this space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Independent Sequential Processes

A

Each process has its own program counter, register, variable and flow of control

To run it, copy the logical program counter into the real program counter

When switched, copy the value of the real program counter into the logical program counter in memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Processes over time

A

At any given instance only one process can be active (single CPU)

CPUs switch rapidly between processes, rate of this is completely random and irreproducible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Program

A

Algorithm expressed in a programming language or other notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Process

A

Activity executing on a processor. Has binary program text, input, output, state etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Interrupt and Switching

A

Another activity requires CPU
Save state of current process
Switch to the other process with its own program and state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Suspended Processes

A

Must restart in exactly the same state
The OS saves the address space (the core image) and maintains a process table entry for each process with information about resources (memory locations, open files etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Address Space

A

The OS allocates a private address space to each process isolated from other processes.

The address space has the:
executable program text (the program binary)
program data (global variables to do with the process)
the stack (where the current active functions are stored, one frame per active procedure or function)
dynamically allocated memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Stack

A

Automatic (objects only exist for the enclosing scope), managed by the OS
Known at compile time though usage is determined by execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Heap (Dynamic)

A

For flexibility, cannot be known until runtime and what cannot fit on the stack
More costly and error prone as programmer requests allocation and deallocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Process Lifecycle

A

Processes have a lifecycle managed by the OS from creation to termination

In simple systems, all processes are created at system startup

In general purpose systems, processes need to be created and terminated during operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

System Initialization

A

Initial tasks reads information about the OS; kicks off the startup initialisation that loads part of the OS and starts it up.

In turn the OS will start other processes such as foreground processes for user interaction or background processes for incoming email, web servers etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Execution of a process creation system call

A

Called by a running process; one process starts one process and another starts another process to complete a large job.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Execution of a process creation system call

A

Called by a running process; one process starts one process and another starts another process to complete a large job.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

User Request

A

Requesting a process creation by typing a command or double clicking an icon

17
Q

Voluntary Termination

A

Termination of a process under control of the process.

Normal exit and error exits are both voluntary.

18
Q

Involuntary Termination

A

Termination of a process outside of the control of a process

Fatal error and/or killed by another process are both involuntary

19
Q

Process Trees

A

Processes create (fork) other (child) processes

Related processes often need to communicate and share data via interprocess communication

20
Q

Process States and Transitions

A

Running (using CPU) - caused when scheduler picks process

Ready (temporarily stopped) - caused by external events or when switched out by scheduler

Blocked (waiting, unable to run) - OS detects process cannot continue and blocks

21
Q

Typical System Startup

A

Small bootstrap program loaded from disk partition which loads boot program
Boot program looks for boot image
Kernel starts process initialisation
Start application level process to make system useable (shell or UI)