Processes/Process Scheduling Algorithms Flashcards

1
Q

What is a process

A

A process is an instance of a program in execution. It is an executing program.

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

Mention Process Management Functions:

A

PTC - P - DIS - PIM
Process creation
Termination
Controlling the progress of the process

Process

Dispatching
Interrupt handling
Switching between the process

Process synchronization
Inter process communication support
Management of process control blocks

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

Mention and describe the process states

A

The new state: The process is being created

The running state : The process is executing on the CPU

The blocked state: A process that is waiting for something to complete e.g I/O

The ready state: A process that is ready to be executed, but not currently assigned to a CPU

The terminated state: The process has finished execution.

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

What does a PCB contain?

A

PCC - MAI
Process state
Program counter
CPU registers
CPU scheduling information
Memory management information
Accounting information
I/O status information.

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

What does the program counter do.

A

It indicates the address of the next instruction to be executed for this program.

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

Mention and describe the types of context switch

A

Simple Mode Switch: to process an interrupt without switching process

Full Process Switch: Process is suspended and another process will get the CPU

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

Mention Process Scheduling Queues

A

Job queue
Ready queue.
Device queues.

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

What is a job queue

A

Set of all processes in the system

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

What is a job queue

A

Set of all processes in the system

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

What is a ready queue

A

Set of all process residing in main memory, ready and waiting to execute

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

What is a device queue

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

What is a device queue

A

Set of processes waiting for an I/O device. Each device has its own device queue.

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

What is a device queue

A

Set of processes waiting for an I/O device. Each device has its own device queue.

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

Types of schedulers

A

Long term schedulers
Short term schedulers

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

Describe the schdulers

A

Long term scheduler: Also known as the job scheduler it selects which process should be brought into the ready queue.

Short term scheduler - Also known as CPU scheduler: Selects which process should be executed next and allocates CPU.

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

What is a medium term scheduler

A

Is used to remove processes from memory and reduce the degree of multiprogramming

16
Q

Process can be described as either?

A

I/O bound process - Spends more time doing I/O than computations

CPU-bound process - spends more time doing computations;

17
Q

What is a dispatcher

A

An OS program that switches the CPU from one process to another selected by the short term scheduler.

18
Q

Functions of a dispatcher

A

It prevents a single process from monopolizing the CPU
It decides who goes next according to a scheduling algorithm.

19
Q

What is dispatch latency

A

It is the time it takes for the dispatcher to stop one process and start another

20
Q

When does a process get terminated

A

Batch jobs issues
User logs off
Process executes a service request to terminate
Error or fault conditions.

21
Q

What are the scheduling critieria

A

MAX CPU utilization - keeps the cpu as busy as possible

MAX Throughput - # of processes that complete their execution per unit time

MIN Turnaround time - Amount of time to execute a particular time

MIN Waiting time - Amount of time a process has been waiting in the ready queue.

MIN Response time. - Amount of time it takes from when a request was submitted until the first response is produced, not output

22
Q

What are the CPU scheduling algorithms

A

First-come First Served(FCFS) Scheduling
Shortest Job First
Priority Scheduling
Round Robin
Multilevel Queue