subject

Details You'll need two new system calls to implement this scheduler. The first is int settickets(int number), which sets the number of tickets of the calling process. By default, each process should get one ticket; calling this routine makes it such that a process can raise the number of tickets it receives, and thus receive a higher proportion of CPU cycles. This routine should return O if successful, and -1 otherwise (if, for example, the caller passes in a number less than one). The second is int getpinfo(struct pstat). This routine returns some information about all running processes, including how many times each has been chosen to run and the process ID of each. You can use this system call to build a variant of the command line program ps, which can then be called to see what is going on. The structure pstat is defined below; note, you cannot change this structure, and must use it exactly as is. This routine should return 0 if successful, and-1 otherwise (if, for example, a bad or NULL pointer is passed into the kernel). Most of the code for the scheduler is quite localized and can be found in proc. c;the associated header file, proc. h is also quite useful to examine. To change the scheduler, not much needs to be done; study its control flow and then try some small changes. You'll need to assign tickets to a process when it is created. Specfically, you'll need to make sure a child process inherits the same number of tickets as its parents. Thus, if the parent has 10 tickets, and calls fork) to create a child process, the child should also get 10 tickets. You'll also need to figure out how to generate random numbers in the kernel; some searching should lead you to a simple pseudo-random number generator, which you can then include in the kernel and use as appropriate.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The great length of north america causes the climate to be varied. true false
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
question
Computers and Technology, 23.06.2019 01:10
Problem 1 - hashing we would like to use initials to locate an individual. for instance, mel should locate the person mark e. lehr. note: this is all upper case. generate a hash function for the above using the numbers on your telephone. you know, each letter has a number associated with it, so examine your telephone keypad. generate 512 random 3 letter initials and take statistics on a linked list array size 512 to hold this information report how many have no elements, 1 element, 2 elements, does this agree with the hashing statistics distribution?
Answers: 1
question
Computers and Technology, 23.06.2019 22:50
An environmental protection agency study of 12 automobiles revealed a correlation of 0.47 between engine size and emissions. at 0.01 significance level, can we conclude that there is a positive association between the variables? what is the p value? interpret.
Answers: 2
You know the right answer?
Details You'll need two new system calls to implement this scheduler. The first is int settickets(in...
Questions
question
Mathematics, 19.02.2020 20:02
question
History, 19.02.2020 20:02
question
English, 19.02.2020 20:02
question
Mathematics, 19.02.2020 20:02
Questions on the website: 13722359