Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, alexandramendez0616
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, suewignall
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, jaymc1932
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
image
Computers and Technology, 24.06.2019 02:00, destinyd10189
Read the following scenario, and then answer the question below. you want to send an e-mail to your boss requesting a meeting to discuss a raise. what is the best example of an e-mail to an employer about this meeting? “hey jason. can we chat about getting me more money soon? let me know. peace, meg.” “hello jason. pardon me for sending yet another e-mail today about my need to talk to you about my position and a possible pay increase. i am dying to know when you can talk. sincerely, meg.” “hello jason. i have been with the company for one year and have taken on more responsibilities than outlined in my job description. i would appreciate an opportunity to speak with you about my position. let me know when we can schedule a meeting. you, meg.” “greetings jason! i hope this e-mail finds you well and happy today. i really, really want to talk to you about something important. i am not sure if you have time. i hope you do. get back in touch with me and let me know when we might talk. ever so much for taking the time to read this. sincerely, meg.”
Answers: 3
Do you know the correct answer?
Task 1: Efficient Alann Clock In Pintos, threads may call this function to put themselves to sleep:...

Questions in other subjects:

Konu
Mathematics, 02.12.2020 20:50
Konu
Biology, 02.12.2020 20:50
Konu
Mathematics, 02.12.2020 20:50
Konu
Mathematics, 02.12.2020 20:50