process description and control Flashcards

1
Q
  1. what information does a process have when it is running? (8)
  2. what is a process control block?
  3. what is a trace?
  4. what is a dispatcher?
A

when a process is running it has an identifier, state, priority, pc, memory pointers, context data, I/O status info and accounting info.
A process control block contains all these elements and is created and managed by the OS, allowing support for multiple processes.
a trace is a list of instructions that are executed.
a dispatcher is a small program that switches the processor between processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. what is a two-state process model?
  2. how are processes created?
  3. how are processes destroyed?
  4. what states are in a 5 state model?
A

two-state process models allow processes to be either running or not running. Processes can be created by the OS or spawned by a parent process. To indicate completion a HALT instruction generates an interrupt, a user does a specific action, there was a fault/error or the parent process terminates.
Five state process models have new, ready, running, blocked and exit processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. what are the three states in the 3-state model?
  2. describe the ready state
  3. describe the blocked state
  4. what happens if many programs are in the blocked state for a long time?
  5. why might this happen?
A

three-state process models have ready, running or blocked processes.
Ready processes are loaded into memory and waiting to be assigned a processor. Only one process is held in this state and the registers hold values for it.
blocked processes can’t run even if the processor were free. Normally they are waiting for a slow I/O. If lots of processes were in this state they can be moved to the disk to free up memory (suspend state). therefore you can have blocked/suspend state and ready/suspend state.
suspended processes may be due to the OS suspecting the process of causing a problem, interactive user request, timing or a parent process request.

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

describe what is contained in:

  1. memory tables
  2. I/O tables
  3. file tables
  4. process tables
A

memory tables keep track of memory and include information on allocation of main/secondary memory to processes, protection attributes and info needed to manage virtual memory.
I/O tables are used by the OS to manage devices and channels of operations and location used as source/destination of transfer
file tables are sometimes maintained by the file management system and contain info about the location, status and existence of files.
process tables contain processes’ current states, process ID, location etc. This is contained within process control blocks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. what 3 things do process control blocks contain?
A

process control block information is in 3 main categories:

  1. process identification- each process has an ID
  2. processor state information- contents of registers
  3. process control information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. describe the steps in a change of process state
A
  1. save contents of processor including pc and registers
  2. update process control block of running process
  3. move process control block to right queue
  4. select another process for execution
  5. update process control block of selected process
  6. update memory management data structure
  7. restore contents of the selected process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly