Operating Systems Course: CO20-320202 Homework 3 solved

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

a) Fairness in the CFS means that CPU power is shared equally between processes. Meaning
1 process gets 100% of the CPU while 2 process get 50% of the CPU and so forth…
b) The CFS picks the task with the least virtual runtime to schedule next. Virtual run time is the
accumulated runtime of a process. The CFS uses a Red-Black-Tree to store task information.
Tasks are weighed in the Red-Black-Tree using virtual runtimes, therefore accessing the task
with the minimum virtual runtime means accessing the left most leaf node. A Red-BlackTree is used because inserting and deleting tasks is done in O(log n).
c) Yes the CFS scheduler uses time slices. There also exists 2 variable which are affecting the
CFS time calculations. the first is System wide fair clock variable. This runs at a fraction
of real time, so that it runs the ideal speed for one task when there are several tasks in the
system. The second variable is the accumulated wait time; the wait time is the time each
process waits while the CPU is assigned to a running task.
d) Each task is given some sort of static priority (which ranges from 1 to 99). Tasks with
higher priority get to have more timein the CPU; while those with lower priority get less
time. Processes are placed in a priority array which allow the system to find the highest
priority task and completed then move it to the expired array.
Please note that all answers are referenced from the following article:
https://goo.gl/67BHVT