Pintos : Series : Part 4 : Final
In this blog post, we will be done with our Pintos Project #1 and this Pintos Series AlhumdullillAllah. so let's start... In the previous posts of this series, we have looked at the problem that is of busy waiting. To solve this problem I took help from code written by other people on Github, so to learn it deeper you can get to look at this code, by Muhammad Zaheer . The basic modification is done in two files i.e. timer.c and thread.h; ALARM CLOCK IMPLEMENTAIONS ========================== Changes in timer.c: - A global list of sleeping threads is created as: -static struct list sleep_list; Changes in thread.h: - For keeping track of a sleeping thread when woken up, we declared: -int64_t sleep_time; - When a thread calls timer_sleep(), it gets into the sleep list as: -struct list_elem sleep_list_elem Algorithms Used We reimplemented timer_sleep() in devices/timer.c, as it sp