Question: Task 1 : To implement priority scheduling, you will first need to do the following: ( 1 ) Add a variable in struct proc to
Task : To implement priority scheduling, you will first need to do the following:
Add a variable in struct proc to indicate the nice level of a process. Use a range
of to with being the lowest and the highest priority.
Determine the default priority of a process when it is created and add the code to
do so Usually, it is somewhere in the middle of the range.
Implement a system call:
int setniceint pid, int n;
to change the nice value of process pid to n The returned value should be the
original nice value of this process.
Implement a second system call:
int getniceint pid;
that returns the nice value of a process.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
