Project 3 RoadmapMultilevel Feedback SchedulingSlide 3SemaphoresTesting Your CodeGetTimeOfDay()Project 3 RoadmapMultilevel Feedback SchedulingSemaphoresMultilevel Feedback Schedulingstruct Kernel_Thread in kthread.hcurrent queue: int currentReadyQueueblocked state: bool blockedthere are 4 run queues now:s_runQueue[MAX_QUEUE_LEVEL] in kthread.ca thread is initially in s_runQueue[0] except IDLE thread that enters at 3 when switching to MLF modecheck the scenarios Find_Best() automatically pick the highest priority thread in a queueGet_Next_Runnable() will call Find_Best() for each queue until it finds a ready processMultilevel Feedback Schedulingend of quantum ? if blocked promoteif has just run demote (check TODO in Timer_Interrupt_Handler() defined in timer.c)make sure your Sys_SetSchedulingPolicy() works before stuff gets complicatedA thread becomes blocked in Wait().Semaphoresrough guidelineadd two files sem.h/sem.ccreate a semaphore structureeach has a thread queue, count, name, etcP/V semantics P decrease, block if neededV increase, never blockssection 7.4.2 in the textbook, pp 203Testing Your Codeworkload.exe [rr/mlf] [quantum]ping.exe & pong.exeGetTimeOfDay()Sys_GetTimeOfDay - trivial (return
View Full Document