6.1 Process Description and Control Flashcards

1
Q

Requirements of an OS

A

Process Management
OS must
-Execute multiple processes
-Allocate resources to processes and protect a process’ resources from other processes
-Enable processes to share and exchange information
-Enable synchronisation among processes

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

OS manages execution of applications

A

Resources are made available to multiple apps
Processor is switched among multiple application
Processor and I/O devices can be used efficiently

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

What is a process

A

A program in execution
An instance of a program running on a computer
The entity that can be assigned to and executed on a processor

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

Process Elements

A
Program code
A set of data
A number of attributes describing the state of the process
-Identifier
-State
-Priority
-Program Counter
-Memory pointers
-Context data
-I/O Status info
-Accounting info
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Trace of the Process

A

Behavior of an individual process is shown by listing the sequence of instructions that are executed
This list is called a TRACE
DISPATCHER is a small program which switches the processor from one process to another

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

Two state process model

A

Processes can be either

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

Process Creation

A

The OS builds a data structure to manage the process
Traditionally the OS created all processes
-But it can be useful letting a running process create another
This action is called PROCESS SPAWNING
-PARENT PROCESS is the OG
-CHILD PROCESS is the new process

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

Process Termination

A

There must be some way that a process can indicate completion
Indication may be
-HALT instruction generating an interrupt alert to the OS
-A user action
-A fault or error
-Parent process terminating

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

Three state process model

A

Ready, Running and Blocked
READY
- A process in this state has been loaded into memory and is waiting to be assigned to the processor
- There could be several processes in this state at any time
RUNNING
-CPU registers hold values from this process and the current instruction sequence comes from this process
-There is only one process in this state at any time in a single processor system
BLOCKED
-A process in this state could not run even if the processor were free
-The process is usually waiting for a slow device to provide input or accept output - e.g. a process that is waiting for a user to enter data will be ‘blocked’ until the user types in data.
-There could be several processes in this state at any time

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

Suspended Processes

A

Processor is faster than I/O so all processes could be waiting for I/O
Blocked state now becomes suspend state when swapped to disk
Two new states
-Blocked/Suspend
-Ready/Suspend

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

Memory Tables

A

Used to keep track of main and secondary memory
Must include
- Allocation of main memory to processes
- Allocation of secondary memory to processes
- Protection attributes for access to shared memory regions
-Info needed to manage virtual memory

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

I/O Tables

A

Used by the OS to manage the I/O devices
OS needs to know
- Whether the I/O device is available or assigned
- Status of I/O operation
- Location in main memory being used as the source or destination of I/O transfer

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

File Tables

A
These tables provide info about
-Existence of files
-Location on secondary memory
-Current Status
Sometimes this info is maintained by a file management system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Process Tables

A
To manage processes the OS needs to know the details of the processes
-Current state
-Process ID
-Location in memory
Process control block
-Process image
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Process Attributes

A

We can group the process control block info into three general categories

  • Process ID
  • Processor state info
  • Process control info
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Process ID

A

Each process is assigned a unique ID

17
Q

Processor State Info

A

This consists of the contents of processor registers

  • User-visible registers
  • Control and status registers
  • Stack pointers
18
Q

Modes of execution

A
User mode
-Less privileged
-User programs execute here
System mode
-More-privileged
-Kernel of OS
19
Q

Process Creation

A

Once the OS decides to create a new process

  • Assigns a process ID
  • Allocates space
  • Initialises process control block
  • Sets up appropriate linkages
  • Creates or expands other data structures