Ir ao conteúdo

Exercicio 1 – Sistemas Operacionais II – INE5424 – UFSC

Trabalho 1 – EPOS
Idle-waiting Thread Joining
– Este trabalho tinha como objetivo alterar o modo que era feito o “join” em uma Thread. Sendo que o mesmo inicialmente era feito da seguinte maneira:
[code lang=”c”] while(_state != FINISHING)
yield();
[/code]

O mesmo consiste basicamente, em verificar o estado da thread que se esta dando join e caso o estado nao seja FINISHING dar a vez a outro processo. Esta solucao, acarreta no consumo excessivo de recursos ja que o mesmo sempre retorna para a fila de _ready. E eh executado novamente quando o escalonador escolher esta thread. O trabalho pede que seja modificado de modo que o consumo de recursos nao seja excessivo.

Arquivos Modificados:
thread.cc
Thread.h

Solucao:
     Foi criada uma variável adicional em threads.h, _waiting_for_me, que é um ponteiro para uma thread. Quando o método “join” é chamado, a thread que está executando é colocada no _waiting_for_me da thread chamada e é suspensa. Se a thread já finalizou ou alguém já chamou “join” nela, nada é feito. No método “exit”, caso _waiting_for_me esteja preenchida, é chamado o método “resume” na thread referenciada.
     Pensamos em colocar uma lista de referências para várias threads poderem dar “join” na mesma thread, porém vimos na documentação do POSIX que isso era considerado um erro lógico, e achamos que acarretaria um consumo de recursos adicional desnecessário, pois não seria possível usar o _link já existente na thread, já que ela teria de estar tanto na lista de suspensos quanto na lista _waiting_for_me da outra thread.

Explicacao mais detalhada da implementacao escolhida e outras solucoes pensadas.

8.835 Comentários

  1. My professional context would benefit from having this kind of resource available, and a look at clevebound extended the professional applicability, the rare site that contributes meaningfully to professional work rather than just personal interest is content with multiplied value and this one is providing that professional utility consistently across multiple pieces.

  2. Reading this prompted me to dig out an old reference book related to the topic, and a stop at flockfine extended that connection to other sources, content that connects me back to my own existing knowledge rather than asking me to forget it is content with continuity and this site has that continuous quality.

  3. Speaking from the perspective of a fairly demanding reader the writing here clears the bar consistently, and a look at modernconsciousmarket 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.

  4. Reading more of the archives is now on my plan for the weekend, and a stop at neatmills confirmed the archive worth the time, the rare archive worth a dedicated reading session rather than just casual sampling is the rare archive of serious work and this site has clearly produced enough of that work to warrant the deeper exploration.

  5. Even just sampling a few posts the consistency is what stands out, and a look at bracecloth confirmed the broader pattern, sites where every piece I sample lives up to the standard set by the others are sites with serious quality control and this one has clearly invested in whatever editorial process produces that consistency reliably.

  6. I visited many blogs except the audio quality for audio songs present at this web page
    is truly fabulous.

  7. A piece that was confident enough to leave some questions open rather than forcing closure, and a look at falconfern continued that intellectual honesty, content that admits the limits of its scope is more trustworthy than content that pretends to total understanding and this site has the right calibration on certainty consistently.

  8. Now feeling the quiet pleasure of finding writing that takes itself seriously without being self serious, and a stop at hueheron extended that subtle pleasure, the gap between earnest and pretentious is fine and this site has clearly chosen to land on the earnest side without slipping over into pretentious which is impressive.

  9. A small thank you note from me to the team behind this work, the post earned it, and a stop at grebeknot 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.

  10. Even just sampling a few posts the consistency is what stands out, and a look at bracecloth confirmed the broader pattern, sites where every piece I sample lives up to the standard set by the others are sites with serious quality control and this one has clearly invested in whatever editorial process produces that consistency reliably.

  11. Picked this for a morning recommendation in our company chat, and a look at hueheron suggested I will mention this site again later, recommending content into a workplace context is a small editorial act that requires confidence in the recommendation and this site is making me confident in those recommendations consistently here too.

  12. I learned more from this short post than from longer articles I read earlier today, and a stop at koalaglade added even more useful detail without going off topic, this site clearly knows how to keep things focused without sacrificing depth which is a hard balance to strike for any writer.

  13. After reading several posts back to back the consistent voice across them is impressive, and a stop at gablejuno continued that voice consistency, sites that maintain a single coherent voice across many pieces by potentially many writers represent serious editorial discipline and this one has clearly developed the institutional consistency needed for that.

  14. A quiet kind of confidence runs through the writing, and a look at heliogust carried that same understated assurance, confidence without bragging is the most attractive register for online writing and the writers here have clearly developed it through practice rather than affecting it through stylistic tricks that would feel hollow eventually.

  15. Thanks for the clean writing, no broken sentences and no awkward translations like some other sites have, and a quick stop at bayvendor kept that polish going nicely, it really does make a difference when a reader can move through a page without tripping on every line or going back to reread.

  16. Without overstating it this is a quietly excellent post, and a look at firjuno extended that quiet excellence, content that earns superlatives without demanding them through marketing language is content that has truly earned them through the substance and this site has clearly produced work in that earned excellence category today.

  17. A piece that reads as if the writer trusted readers to fill in obvious gaps, and a look at protraderacademy continued that respectful approach, content that does not over explain what the reader can infer is content that respects intelligence and this site has clearly chosen to write to capable readers rather than to the lowest common denominator.

  18. Appreciated that the writer trusted the reader to follow along without constant restating of earlier points, and a look at heliogust continued that respect for the reader, treating an audience as capable adults rather than as people to be hand held through every paragraph is something I notice and value highly across the open internet today.

  19. Really like that the writer trusts the reader to follow simple logic without restating every previous point, and a stop at gleamjuly kept that respect going, treating an audience as capable adults rather than as people who need constant hand holding makes a noticeable difference in the reading experience for me.

  20. Better than the average post on this subject by some distance, and a look at modernlifestylecommerce reinforced that, you can tell within the first paragraph that the writer here actually cares about the topic rather than just covering it for the sake of having something to publish that week or that day.

  21. 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 huejuly 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.

  22. Solid information that lines up with what I have been hearing from other reliable sources, and after my visit to dewdawns I was even more certain of that, this site checks out which is something I value highly when so many places online play loose with the facts to chase a quick click.

  23. Looking back on this reading session it stands as one of the better ones recently, and a look at brinkbeige extended that ranking, the informal ranking of reading sessions against each other is something I do mentally and this session ranks high largely because of this site and a couple of related pages here.

  24. Found the writing surprisingly fresh for what is by now a well covered topic, and a stop at dewdawns kept that freshness going across the related pages, original perspective on familiar ground is hard to come by and this site has clearly earned its place in the conversation rather than just rehashing old ideas.

  25. Came away with some new perspectives I had not considered before, and after falconflame those ideas felt more complete, the kind of content that stays with you a little while after reading rather than slipping out the moment you switch tabs and move on with your day to whatever comes next.

  26. Now feeling the quiet pleasure of finding writing that takes itself seriously without being self serious, and a stop at galeember extended that subtle pleasure, the gap between earnest and pretentious is fine and this site has clearly chosen to land on the earnest side without slipping over into pretentious which is impressive.

  27. Reading this as part of my evening winding down routine fit perfectly, and a stop at modernpurposegoods extended the wind down nicely, content that calms rather than agitates is what I want at the end of the day and this site provides that calming reading experience reliably which is increasingly rare across the modern web.

  28. Really nice to see things explained without overcomplicating the topic, the words flow naturally and stay easy to follow, and a short visit to modernpurposegoods only added to that experience because the same simple approach is used across the rest of the page too without any change in tone.

  29. Came across this and immediately thought of a friend who would enjoy it, and a stop at connectforprogress also reminded me of someone, content that triggers the urge to share is content that has earned my recommendation and this site has earned multiple from me already across different conversations during the week.

  30. A piece that left me thinking I had been undercaring about the topic, and a look at flameeden reinforced that mild concern, content that raises the appropriate weight of a subject without being preachy about it is doing important work and this site is providing that gentle elevation of attention for me consistently.

  31. Looking at this from the perspective of someone tired of generic content the contrast is striking, and a look at flockgala maintained that distinctive feel, sites with strong editorial identity stand out against the bland background of algorithmic content and this one has clearly developed an identity worth recognising through careful attention.

  32. However selective I am about new bookmarks this one made it past my filter, and a look at heliojuly confirmed the bookmark was worth the slot, the precious slots in my permanent bookmark folder are difficult to earn and this site earned one without making me think twice about whether the slot was justified by the quality.

  33. Now I want to find more sites like this but I suspect they are rare, and a look at heliojuly extended that thought, the few sites that meet this quality bar are precious specifically because they are rare and finding others like them is one of the ongoing projects of careful internet curation across the years.

  34. A thoughtful piece that did not strain to be thoughtful, and a look at globeflame continued that effortless quality, when thinking shows up in writing without the writer drawing attention to it you know you are reading something genuinely considered rather than something performing the appearance of consideration which is also common online.

  35. A clear case of writing that does not try to do too much in one post, and a look at granitevendor maintained the same scoped discipline, posts that try to cover too much end up covering nothing well and this site has clearly chosen scope discipline as a core editorial principle which shows up clearly in what I read.

  36. Now adding this site to a small mental group of recommendations I keep ready for specific kinds of inquiries, and a stop at gridivory extended the recommendation readiness, content that I can confidently point friends and colleagues toward in specific contexts is content with real social utility and this site has that utility clearly.

  37. Fantastic beat ! I wish to apprentice while you amend your web site, how can i subscribe for
    a blog web site? The account helped me a acceptable deal.
    I have been tiny bit familiar of this your broadcast provided bright clear idea

  38. Now feeling mildly impressed in a way I do not quite remember feeling about a blog in a while, and a stop at kraftkilt extended that mild impression, content that produces specific positive emotional responses rather than just neutral information transfer is content with extra dimensions and this site has those extra dimensions clearly.

  39. Picked up several practical tips that I plan to try out this week, and a look at intentionalconsumerexperience added a few more I will be testing alongside, content with practical hooks that connect to my actual life is the kind that earns my repeat attention rather than the merely interesting that I forget within a day.

  40. Solid endorsement from me, the writing earns it, and a look at flankgate continues to earn it across the broader site too, the kind of operation that maintains quality across many pages rather than just one viral post is a sign of serious commitment and that is what I see here clearly across what I read.

  41. Skipped the comments section but might come back to read it, and a stop at helioketo hinted at a quality reader community, sites where the comments are worth reading separately from the post are increasingly rare and signal a particular kind of audience that has grown around the editorial vision over time gradually.

  42. Quality writing that respects the reader’s intelligence without overloading them, and a quick look at kraftkilt reflected that approach, a balanced thoughtful site that earns trust by being consistent rather than by shouting about how trustworthy it is which is the usual approach online sadly across most content categories.

  43. Awesome blog! Do you have any tips and hints for aspiring writers?
    I’m planning to start my own blog soon but I’m a
    little lost on everything. Would you suggest starting with a free platform like WordPress or go for a paid option? There are
    so many options out there that I’m totally overwhelmed ..
    Any suggestions? Thank you!

  44. Reading this prompted a brief but useful conversation with a colleague who happened to walk by, and a stop at brightcartfusion extended that conversational seed, content that becomes a starting point for in person discussion rather than ending in solitary reading is content with social generative energy and this site has plenty of it apparently.

  45. Recommended to anyone working in or curious about this area, the depth and clarity combine well, and a look at grifffume keeps that going across more pages, the kind of site that earns regular visits rather than chasing trends has my respect because it suggests genuine commitment to the topic itself rather than to chasing trends.

  46. Definitely returning here, that is decided, and a look at jouleforge only made the case stronger, this is one of those rare websites that rewards regular visits rather than feeling stale after the first read which is something I cannot say about most of the places I bookmark today across all my topics.

  47. Appreciated the way each section connected smoothly to the next without abrupt jumps, and a stop at tealvendor kept that flow going nicely, transitions are something most blog writers ignore but the difference is huge for the reader who is trying to follow a sustained line of thought today across many different topics.

  48. Now considering carefully how to share this site with the right audience rather than broadcasting widely, and a look at galloheron extended that careful sharing impulse, content worth sharing carefully rather than spamming is content that has earned a higher kind of recommendation and this site has earned that careful shareability throughout pieces.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *