Process Management Flashcards

1
Q

Program definition

A

A set of instructions for performing a specific task which is stored on the disk

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

Process definition

A

A program which is in execution(active), it requires CPU resources, main memory and I/O

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

What is contained inside a process control block

A

Process ID
Process state and registers
Process address space
Process I/O (I/O devices and open files which are allocated to the process)

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

What is a process context switch

A

Process being swapped between running and ready states, requires some overhead

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

What is contained in the process address space

A

Stack (temporary data)
Heap (dynamically allocated data)
Data section (static data)
Text section (contains the program code)

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

True or false: the stack and heap sections can shrink and grow at runtime

A

True

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

What is the heap

A

The heap is a dynamically allocated section of the process address space. It is used when large blocks of memory storage are required for a longer period of time and for variables that can change in size dynamically.

In the heap, blocks of memory are allocated and removed in an arbitrary order

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

What is process spawning

A

When a process is created at the request of another process

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

What are the two ways that a process can communicate in and how do they work

A

A process can communicate in one of two ways:

Shared Memory - requires system calls from both processes to setup the shared memory, once setup, each process is responsible for ensuring that they do not overwrite each other or attempt to write to memory at the same time.

Message passing - message passing is done in a postman style fashion where the kernel acts as the postman, this means that each time a message needs passing, a system call must be made

Shared memory is faster than message passing as it only requires system calls once at the start when the memory is being setup
Message passing can be better when only a small amount of data is being transferred as it avoids the complex issue of setting up the shared memory space.

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