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, 21.06.2019 21:00
The mode is generally used when delivering a presentation to an need now
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Your company has 1,500 desktop computers running windows 7. you want to upgrade them to windows 10. which type of microsoft license would be best suited in this situation?
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. Ć¢ā€“ÅŸ print out all positive integers from 1 to 100, inclusive and in order. Ć¢ā€“ÅŸ print messages to standard output, matching the sample output below. Ć¢ā€“ÅŸ in the output, state whether the each integer is 'odd' or 'even' in the output. Ć¢ā€“ÅŸ if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. Ć¢ā€“ÅŸ if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. Ć¢ā€“ÅŸ design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
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, 08.02.2021 19:10
question
English, 08.02.2021 19:10
question
Mathematics, 08.02.2021 19:10
question
Mathematics, 08.02.2021 19:10
Questions on the website: 13722363