Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone help me to solve it using ubuntu, please? The nice system call is used to change the priority of a given process. 1.
Can someone help me to solve it using ubuntu, please?
The nice system call is used to change the priority of a given process. 1. System call interface maintains the table of all the system call and associates each with a number. Update this table. In syscall.h, add the following two system calls. Here, the numbers 22 and 23 are given to the system calls. The cps is for the ps system call and chpr (change priority) is for the nice system call. #define SYS_cps 22 #define SYS chpr 23 2. In the PCB of the process, add a new attribute 'priority'. The PCB of the process is stored in proc.h file. In the struct proc in the proc.h file, add a new attribute 'priority of int data type. 3. Include the declaration of these functions in defs.h and users.h files. V/Add this below the //proc.c section in defs.h VI proc. int cps (void); chpr(int pid, int priority); int V/Add this below the system calls section in users.h int cps (void); int cher(int pid, int priority); The nice system call is used to change the priority of a given process. 1. System call interface maintains the table of all the system call and associates each with a number. Update this table. In syscall.h, add the following two system calls. Here, the numbers 22 and 23 are given to the system calls. The cps is for the ps system call and chpr (change priority) is for the nice system call. #define SYS_cps 22 #define SYS chpr 23 2. In the PCB of the process, add a new attribute 'priority'. The PCB of the process is stored in proc.h file. In the struct proc in the proc.h file, add a new attribute 'priority of int data type. 3. Include the declaration of these functions in defs.h and users.h files. V/Add this below the //proc.c section in defs.h VI proc. int cps (void); chpr(int pid, int priority); int V/Add this below the system calls section in users.h int cps (void); int cher(int pid, int priority)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started