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)
Refreshing change from the usual sites covering this topic, no clickbait and no padding, and a stop at byncane confirmed the difference, this place clearly has its own voice rather than copying the formulas everyone else uses to chase clicks online which is becoming increasingly rare these days across nearly every popular subject.
Pass this along to anyone you know dealing with similar questions, the answers here are clear, and a stop at hoxfix adds even more useful material, this is the kind of resource that deserves to circulate widely rather than getting lost in the constant churn of new content online that buries good work daily.
Now recognising that this site has earned a place in the small group of resources I treat as authoritative, and a stop at inaarch confirmed that placement, the difference between resources I trust and resources I just consume is real and this site has clearly moved into the trusted category through consistent quality over time.
A small thank you note from me to the team behind this work, the post earned it, and a stop at mercymodel suggested more thanks would be in order over time, recognising the people who do good writing online is something I try to remember to do because the alternative is silence and silence rewards mediocrity unfortunately.
Honest take is that this was better than I expected when I clicked through, and a look at suppletoast reinforced that, the bar for online content has dropped so much that finding something thoughtful and well constructed feels almost noteworthy now which says more about the average than about this site itself.
My partner and I absolutely love your blog and find
almost all of your post’s to be exactly I’m looking for.
Would you offer guest writers to write content available for you?
I wouldn’t mind publishing a post or elaborating on many of the subjects you
write about here. Again, awesome web site!
Just want to record that this site is entering my regular reading list, and a look at ibeburn confirmed it deserves the spot, my regular reading list is short and well curated and adding to it requires meeting a fairly high quality bar that this site has clearly cleared without much effort apparently.