Scheduling Flashcards

1
Q

What is scheduling?

A

process of determining which processes or tasks should be executed by the CPU in a given system at any given time.

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

When does a scheduling decision need to be made?

A
  • when a new process is created
  • when a process exits
  • when an I/O interrupt occurs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some goals of scheduling algorithms in different environments?

A
  • fairness,
  • policy enforcement,
  • balance
  • CPU utilization,
  • response time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is fairness important in scheduling?

A

ensures that comparable processes get comparable service, and it prevents one process from monopolizing the CPU at the expense of others.

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

What are some metrics used to evaluate the performance of batch systems?

A
  • Throughput (number of jobs completed per hour),
  • turnaround time (time from submission to completion),
  • CPU utilization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In which environments does scheduling?

A
  • networked servers where multiple processes often compete for the CPU
  • mobile devices with weak CPUs and limited memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are some considerations for the scheduler to make efficient use of the CPU?

A
  • minimize the number of process switches per second (to save cost)
  • Switching from user mode to kernel mode
  • Saving the state of the current process, and reloading the memory map.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is round-robin scheduling?

A

Each process is assigned a time quantum during which it can run. If a process is still running at the end of the quantum, the CPU is preempted and given to another process.

Setting the quantum too short in round-robin scheduling can cause too many process switches, resulting in lower CPU efficiency.

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

What is priority scheduling?

A

each process is assigned a priority, and the process with the highest priority is allowed to run.

Priorities can be assigned statically or dynamically. They can be based on factors such as user roles, job costs, or system goals.

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

What is the advantage of eliminating preemption in priority scheduling?

A

improves performance because process switches only occur when necessary, such as when a process blocks and cannot continue.

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

What is the ‘shortest process next’ scheduling algorithm?

A

runs the process with the shortest estimated running time first. It aims to minimize overall response time by executing the shortest job.

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

What is guaranteed scheduling?

A

system makes real promises to users about performance and aims to fulfill those promises.

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

How does lottery scheduling work?

A

assigns lottery tickets to processes for various system resources. When a scheduling decision needs to be made, a ticket is randomly chosen, and the process holding that ticket gets the resource. The more tickets a process holds, the higher its chances of winning.

+ provides predictable results and is relatively easy to implement

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

What is fair-share scheduling?

A

takes into account the ownership of processes when scheduling. It ensures that each user or group receives a fair share of the system resources based on their entitlement.

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