Process Management Flashcards

1
Q

What is a program?

A

A specfic set of ordered operations for a computer to perform/ Its execution involves a sequence of instructions within the program.

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

What is a process?

A

An instance of a program running on a computer. It executes instructions from main memory, according to the Program Counter (PC) register.

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

What is a process descriptor composed of?

A

Program, Data, and PCB (process control block)

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

What does the Process Control Block contain?

A

It contains the state of the process in execution and maps the environment state on the physical machine state.

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

Define an Inter-Process Relationship and name the two types of Inter-Process relationships.

A

A computer could be executing multiple processes at the same time, therefore, processes have inter-process relationships.
Compeition - processes are trying to get access to different resources of the system.
Cooperation - sometimes the processes need to communicate between themselves and exchange info.

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

What does the Process Manager implement?

A

CPU sharing (scheduling), i.e allocate resources to processes in conformance with certain policies.
Process Synchronisation and inter-process communication, i.e. deadlock strategies and protection mechanisms.

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

Explain how the two-state model works.

A

When the OS creates a new process, it enters it into the Not Running state, after that, the process exists, is known to the OS and waits for the oppurtunity to run. From time to time, the currently running process will be interrupted and the dispatcher process will select a new process to run.

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

How is a process created in the two state model?

A

The OS builds the data structures that are used to manage the process and allocates space in main memory to the process.

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

What are some reasons for process creation and process termination?

A

Process creation:
- New batch job
-Interactive logon
-Created by OS to provide service
-Spawned by existing process

Process termination:
-Natural Completion
-Time limit exceeded
-Errors
-Parent request
-Parent termination

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

How does the queuing system operate in the two state model?

A

Each process needs to be represented by the info relating to each process (incl Current state and location in memory). The processes waiting should be kept in some sort of queue. An interrupt process is transferred to the waiting queue and the dispatcher selects a process from the queue to execute.

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

Name and explain the 5 states in the five state model.

A

Running: The process is currently being executed.
Ready: A process that is prepared to execute when given the turn.
Blocked: A process that has been created, but not yet accepted in the pool of executable processes by OS.
Exit: A process that has been released from the pool of executable processes by the OS.

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

Describe how to queuing discipline works in the five state model.

A

There are now 2 queues: When the process is admitted to the system, it is placed in the ready queue. When a process is removed from the processor, it is either placed in the ready queue or blocked queue. When an event occurs, all processes waiting on the event are moved from the blocked queue to the ready queue.

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

What state is introduced to the five state model that makes the processor faster.

A

A suspended state is added. The processes that end up here are swapped to disk to free up more memory.

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

What are the 4 components of an OS control structure?

A
  1. Memory Tables
  2. I/O Tables
  3. File Tables
  4. Primary Process Table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a thread?

A

A lightweight process that is the unit of execution we use to dispatch. It is also a unit of computation associated with a process. It’s faster to create a thread than a process. The process is the execution environment for a family of threads sharing the same resources (e.g files, memory, space). A thread belongs to only 1 process.

the smallest series of related instructions involved in a process

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

Describe what each of the 4 components of an OS control structure does.

A

Memory Tables- Used to keep track of both main (real) and secondary (virtual) memory. It contains:
-The allocation of main memory/secondary memory to processes.
- Any protection attributes of blocks or virtual memory.
-Any info needed to manage virtual memory.

I/O Tables- Used by the OS to manage I/o devices. At any given time, an I/O device may be available or assigned to a particular process. If an I/O is in process, the OS needs to know the status of the I/O operation and the location in main memory being used as the source or destination of I/O transfer.

File Tables- Contain info about:
- The existence of files
- Their location on secondary memory
- Their current status
- Other attributes
Mostly maintained by the File Manager

Process Tables- Primary process table is used to keep one entry per each process in the OS. The process contains :
-Stack (1+ per process_
-User Data (program data can be modified)
-Process Control Block (data needed by the OS to control the process)