Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribedCan 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions