subject

Task 1: Efficient Alann Clock In Pintos, threads may call this function to put themselves to sleep: * This function suspends execution of the calling thread until time has * advanced by at least x timer ticks. Unless the system is otherwise idle, the * thread need not wake up after exactly x ticks. Just put it on the ready queue * after they have waited for the right number of ticks. The argument to * is expressed in timer ticks,; not in milliseconds or any another * unit-v There are TIMER_FREQ timer ,ticks per second, where TIMER—FREQ is a * constant defined in&vices/timer. h (spoiler: it's 100 ticks per second) . void timer _ sleep (int64_t ticks) ; timer-sleep() is useful for threads that operate in real-time (e. g. for blinking the cursor once per second). The current implementation of timer-sleep() is inefficient, because it calls thread-yield() in a loop until enough time has passed. Your task is to re-implement timer-sleep() so that it executes efficiently without any "busy waiting". That is, your implementation has to use an ordered list so that any thread calling timer- sleep() will be inserted to the list until its timer expires. The thread's state has be changed to THRD-SLEEP when it is in the sleeping list.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:50, dijaflame67
Answer the following questions regarding your system by using the commands listed in this chapter. for each question, write the command you used to obtain the answer. a. what are the total number of inodes in the root filesystem? how many are currently utilized? how many are available for use? b. what filesystems are currently mounted on your system? c. what filesystems are available to be mounted on your system? d. what filesystems will be automatically mounted at boot time?
Answers: 1
image
Computers and Technology, 23.06.2019 20:50, terryhgivens5349
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
image
Computers and Technology, 24.06.2019 07:00, erick7123
Why do we mark tlc plates with pencil and not with pen
Answers: 2
image
Computers and Technology, 24.06.2019 19:30, sipstick971
Dtp allows you to manipulate text boxes in the following ways. more than 1 answer. a. move them b. rotate them c. resize them d. all of the above e. none of the above
Answers: 1
You know the right answer?
Task 1: Efficient Alann Clock In Pintos, threads may call this function to put themselves to sleep:...

Questions in other subjects:

Konu
SAT, 17.10.2020 07:01