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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:10
3. (5 points) describe what would be printed by the code below or what error would occur. const char* cstr = "0123456"; const char* ptr = & cstr[4]; cout < < ptr[-1] < < ptr < < endl; 1 4. (5 points) theseus has been trapped in a maze with a minotaur, which is trying to capture him. each round, theseus and the minotaur move through the maze; theseus towards the exit, and the minotaur towards theseus. theseus can move in any of the four cardinal directions, or he can wait for a round to see how the minotaur moves. write code that creates a data type to represent the possible moves that theseus could make.
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
You have a small company and want to keep your costs low, but it is important your employees share data. which network would provide you with the most economical solution?
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
question
Mathematics, 06.07.2019 08:00
question
Mathematics, 06.07.2019 08:00
question
Social Studies, 06.07.2019 08:00
question
Mathematics, 06.07.2019 08:00
question
Mathematics, 06.07.2019 08:00