what does the scheduler determine?
Regarding scheduling; what does “fairness” refer to?
Comparable processes should get comparable service.
Regarding scheduling; what does “efficiency” refer to?
keep CPU and I/O device busy
Regarding scheduling; what does “response time” refer to?
Response time is the total amount of time it takes to respond to a request for service. That service can be anything from a memory fetch, to a disk IO, to a complex database query, or loading a full web page. Ignoring transmission time for a moment, the response time is the sum of the service time and wait time.
Regarding scheduling; what does “turnaround time” refer to?
Average time required for a job to complete, from submission time to completion.
Regarding scheduling; what does “waiting time” refer to?
minimize the average time in ready queue over processes
Regarding scheduling; what does “Throughput” refer to?
number of completed jobs per time unit.
Why is there a conflict between response time and turnaround time?
The process’ state changes to “running”, for the first time, quite fast. it takes a lot of time for it to finish its job though.
Why is there a conflict between Fairness and Throughput?
What is an “interactive computing”
This term refers to software which accepts input from the users as it runs. Non-interactive programs, by comparison, operate without user intervention; compilers and batch processing applications that are pre-programmed to run independently
What is a script?
A programming language for a special run-time environment(terminal) that automates the execution of tasks. the tasks could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted(rather than compiled)
What is a batch file?
A script file which consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file.
Provide an example of CPU utilization vs turnaround time conflict
Option A:
Option B:
What is the CPU utilization and Turnaround time for case 1 and 2?
Case 1:
Case 2:
what’s the difference between preemptive SJF(Shortest job First) and non-preemptive SJF?
if all processes arrive at the same time both behave the same. if not, Non-preemptive chooses the shortest job within the existing process and it doesn’t change its decision even if a shorter job process has arrived. in contrast, preemptive SJF will switch jobs if a shorter jobs has arrived.
What is the Round Robin method?
Each process gets a small unit of CPU time(time -quantum), usually 10-100 milliseconds.
how much is a millisecond?
1/1000 second
why does Round-Robin approaches FCFS(First-come-first-served) as the time quantum grows?
because if the time quantum is quite big, the process would finish their jobs before they are ask to(due to termination, I/O, or voluntarily).
If the time quantum is about the time it takes for switching then …?
we’ll have relatively a large waste of CPU time(50%) but a good response time
If time quantum is much longer than the time it takes for switching then …?
we’ll have long response(waiting) time but better CPU utilization
Assume context switch takes 5 ms. compute the time wasted on switching for 100 ms quantum time?
overall time: context switch + quantum time = 5 + 100. switch/overall = 5/105 = 1/21 -> less than 5% which is a quite good ratio
what is the guaranteed scheduling?
Scheduling that guarantees fairness by monitoring the amount of CPU time spent by each user and allocating resources accordingly.
What is the main drawback of priority scheduling? how can we avoid that?
starvation. Can be avoided by changing priorities dynamically: increase priorities of waiting processes at each clock tick.
A process who’s completion time is determined principally by: