Exercise 1
Idle-waiting Thread Joining
– It have as an objective to change the method “join” of a Thread. It was implemented like this:
[code lang=”c”] while(_state != FINISHING)
yield();
[/code]
This method consist in verify the state of the Thread that is joined, if the state is different from FINISHING, it calls yield(). This solution cause an overhead, because it do this verification all the time that the process is Phased. We should implement a new function, that don`t cause this overhead.
Modified files:
– thread.cc
– Thread.h
EPOS with our solution.
Steps, and explanation about other solutions (PORTUGUESE)
Speaking from the perspective of a fairly demanding reader the writing here clears the bar consistently, and a look at ironkudos continued clearing that bar, the calibration of demanding reader is something I apply to all sources and this site has been one of the few that handles the demanding reading well across pieces sampled.
Big thanks to whoever wrote this, you saved me a lot of time hunting for the same info on other sites, and a stop at quickcartsolutions only added more useful detail without going off topic, that kind of focus is honestly hard to come across these days when most posts wander everywhere.