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.

7.159 Comentários

  1. coralbrookdistrict coralbrookdistrict

    Granted my mood today might be elevating my reading experience but I still think this is genuinely good, and a stop at coralbrookdistrict reinforced that even discounted assessment, controlling for the mood adjustment that affects content perception this site still reads as substantively above average across multiple pieces I have read carefully today.

  2. modernwin modernwin

    Glad to find a site whose links lead somewhere worth going rather than back to itself for SEO juice, and a stop at modernwin kept that generous outbound feel, citing other peoples work with real respect rather than just for ranking signals is a sign of an honest operation worth supporting going forward.

  3. tidywing tidywing

    Well done, the writing is professional without being stiff, and the topic is treated with care, and a look at tidywing reflected that approach, the kind of site I would point a colleague to if they asked for a reliable starting point on this topic in the future without any hesitation at all.

  4. nextgenpickhub nextgenpickhub

    Honest assessment is that this is one of the better short reads I have had this week, and a look at nextgenpickhub reinforced that, the bar for short content is low because most of it sacrifices substance for brevity but this site manages both at once which is harder than it sounds for most writers attempting it.

  5. gridprobe gridprobe

    Closed it feeling I had taken something away rather than just consumed something, and a stop at gridprobe extended that taking away feeling, the difference between content I extract value from and content I just pass through is something I track informally and this site is consistently in the value extraction column for me.

  6. Bookmark moved to my permanent reference folder rather than the casual maybe later folder, and a look at adrally earned the same upgrade, the distinction between casual interest and lasting reference is something I track carefully and very few sites cross that threshold but this one did so without much effort apparently.

  7. Recommended without reservation for anyone interested in the topic at any level of expertise, and a look at advertex only strengthens that recommendation, this site clearly knows how to serve readers across a range of backgrounds without watering down the content or talking past anyone in the audience which is genuinely impressive to see.

  8. I am sure this article has touched all the internet visitors, its
    really really good article on building up new weblog.

  9. tidywing tidywing

    Bookmark earned and folder updated to track this site separately, and a look at tidywing confirmed the folder upgrade was the right call, organising my reading list so that good sites do not get lost in a sea of casual bookmarks is something I do more carefully now and this site warranted its own spot.

  10. MichaelBruig MichaelBruig

    В этом обзоре представлены различные методы избавления от зависимости, включая терапевтические и психологические подходы. Мы сравниваем их эффективность и предоставляем рекомендации для тех, кто хочет вернуться к трезвой жизни. Читатели смогут найти информацию о реабилитационных центрах и поддерживающих группах.
    Выяснить больше – Наркологическая клиника «Похмельная служба» в Геленджике

  11. duskstand duskstand

    A piece that did not lecture even when it had clear positions, and a look at duskstand maintained the same teaching without preaching tone, finding the line between informing and lecturing is hard and most sites land on the wrong side of it but this one has clearly figured out how to inform without becoming preachy.

  12. silkgroup silkgroup

    Worth recommending broadly to anyone who reads on the topic, and a look at silkgroup only confirms that, the rare combination of accessibility and depth in this site makes it suitable for both newcomers and people who already know the area which is hard to pull off in any blog format today and rarely managed.

  13. KevinNER KevinNER

    Запой сопровождается быстрым накоплением токсинов, что может привести к нарушению работы сердца, печени и почек. Использование капельничного метода позволяет оперативно ввести современные препараты для детоксикации, что способствует быстрому восстановлению обменных процессов и нормализации работы внутренних органов. Оперативное лечение на дому особенно актуально, когда каждая минута имеет значение для спасения здоровья.
    Изучить вопрос глубже – стоимость капельницы от запоя в тюмени

  14. plushperk plushperk

    More substantial than most of what I find searching for this topic online, and a stop at plushperk kept that quality consistent, this is one of those sites where the writing actually rewards careful reading rather than punishing the patient reader with empty filler stretched out across long paragraphs that say very little.

  15. neogrid neogrid

    Found this useful, the points line up well with what I have been thinking about lately, and a stop at neogrid added some angles I had not considered yet, definitely walking away with more than I came for which is the best outcome from time spent reading online for any kind of topic.

  16. Found the section structure particularly thoughtful, and a stop at leadmesh suggested the same care across the broader site, structural choices guide the reader through the material in ways most people do not consciously notice but feel the absence of when those choices are made carelessly or not at all.

  17. embergrovecurated embergrovecurated

    Decided not to comment because the post said what needed saying, and a stop at embergrovecurated continued that complete feel, content that does not invite obvious additions or corrections from readers is content that has been carefully considered and this site appears to consistently produce pieces that satisfy rather than provoke unnecessary follow ups.

  18. LanceLep LanceLep

    В этом обзоре представлены различные методы избавления от зависимости, включая терапевтические и психологические подходы. Мы сравниваем их эффективность и предоставляем рекомендации для тех, кто хочет вернуться к трезвой жизни. Читатели смогут найти информацию о реабилитационных центрах и поддерживающих группах.
    А что дальше? – Похмельная служба в Москве

  19. Easy to recommend without reservations, the site delivers on every promise it implicitly makes, and a look at leadmesh kept that same standard going, the kind of consistency that earns trust over time rather than chasing it through aggressive marketing is what I see here and it is appreciated greatly by this particular reader today.

  20. freshcartcorner freshcartcorner

    Decided to read this site for a while before forming a verdict, and the verdict after several pages is positive, and a stop at freshcartcorner continued that pattern, judging a site requires more than one post and giving sites a fair sample is something I try to do for promising candidates rather than rushing to dismiss.

  21. freshcartarena freshcartarena

    Came here from another site and ended up exploring much further than I planned, and a look at freshcartarena only encouraged more exploration, the kind of place where one click leads to another not through manipulative design but through genuinely interesting content is rare and worth highlighting when found like this somewhere on the open internet.

  22. echocrestcollective echocrestcollective

    Felt this in a way I cannot quite explain, the topic just hit different here, and a stop at echocrestcollective continued in that vein, sometimes you find a site whose perspective lines up with how you have been thinking and reading their work feels like a small relief which I appreciated more than I expected.

  23. netscout netscout

    Reading this on a phone at a coffee shop and finding it perfectly suited to that context, and a stop at netscout continued the comfortable mobile experience, content that works across reading conditions without compromising on substance is increasingly important and this site has clearly thought about the whole reader experience here.

  24. dusktribe dusktribe

    Now adding this site to a small mental group of recommendations I keep ready for specific kinds of inquiries, and a stop at dusktribe 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.

  25. portwire portwire

    One of the more thoughtful posts I have read recently on this topic, and a stop at portwire added even more weight to that impression, this is genuinely good content that holds its own against far better known sites in the same space without trying to imitate any of them at all which I appreciate.

  26. hashboard hashboard

    Worth a slow read rather than the fast scan I usually default to, and a look at hashboard earned the same slower pace from me, content that resets my reading speed downward is content with substance worth absorbing and this site has produced that effect on me multiple times now over the last week here.

  27. Oscarfouro Oscarfouro

    В данной статье рассматриваются физиологические и эмоциональные аспекты зависимости. Мы обсудим, как организм реагирует на зависимое поведение, и какие методы помогают восстановить здоровье и внутреннее равновесие.
    А что дальше? – «Похмельная служба» в Мытищах

  28. zerodepot zerodepot

    Recommend this to anyone who values clear thinking over flashy presentation, and a stop at zerodepot continued in the same understated way, this site has its priorities in the right place which makes it worth supporting through repeat visits and recommendations rather than just one passing read today before moving on quickly elsewhere.

  29. digitaldealcorner digitaldealcorner

    Most of the time I feel the open web is in decline and then I find a site like this, and a stop at digitaldealcorner reinforced that mood lift, the cumulative effect of finding occasional excellent independent content versus the cumulative effect of finding mostly mediocre content is real for the long term reader maintaining web habits today.

  30. blossombaycollective blossombaycollective

    Reading this confirmed a small detail I had been uncertain about, and a stop at blossombaycollective provided the source for further checking, content that supports verification through citations or links rather than just asserting facts is more trustworthy and this site has clearly built its credibility through that kind of verifiable approach consistently.

  31. tokenware tokenware

    Strong recommendation from me, anyone curious about the topic should make time for this, and a look at tokenware only sharpens that recommendation further, the kind of resource that holds up against careful scrutiny rather than crumbling at the first critical question is rare and worth pointing other people toward when the topic comes up.

  32. arcscout arcscout

    Felt the post had been quietly polished rather than aggressively styled, and a look at arcscout confirmed the same understated polish, sites whose quality reveals itself slowly rather than announcing itself loudly are the kind I trust more deeply because the trust is not based on first impressions of marketing but actual substance.

  33. hashtools hashtools

    Without comparing too aggressively to other sources this one stands out for the right reasons, and a look at hashtools continued that distinctive quality, content that distinguishes itself through substance rather than style tricks is content with lasting differentiation and this site has clearly chosen substance based differentiation as its core editorial strategy.

  34. nodedrive nodedrive

    A piece that built up gradually rather than front loading its main points, and a look at nodedrive maintained the same gradual structure, content that trusts the reader to reach conclusions through accumulating reasoning is more persuasive than content that announces conclusions and then defends them and this site uses the persuasive approach.

  35. freshcartstation freshcartstation

    Got pulled in by the headline and stayed because the content actually delivered on the promise, and a stop at freshcartstation kept that trust intact, when a site lives up to its own framing it earns the right to keep showing up in my browser tabs going forward indefinitely from here on out really.

  36. blossombaycollective blossombaycollective

    Sets a higher bar than most of what shows up in search results for this topic, and a look at blossombaycollective did not lower that bar at all, in fact it confirmed the impression, this is the kind of consistency that earns a place in regular rotation for serious readers instead of casual scrollers passing through.

  37. glademeadowoutlet glademeadowoutlet

    Now wishing I had found this site sooner, and a look at glademeadowoutlet extended that mild regret, the calculation of how many years of good content I missed by not finding the right sources earlier is one I try not to make too often but it does come up sometimes when I find sites this good.

  38. echoferncollective echoferncollective

    Reading this slowly to absorb the structure, and the structure is doing real work alongside the words, and a look at echoferncollective maintained the same architectural quality, when sentence shapes and paragraph rhythms reinforce the meaning rather than just transporting words you know you are reading skilled work today.

  39. truedock truedock

    Honestly thank you to whoever wrote this because it scratched an itch I had not quite been able to articulate, and a stop at truedock kept that satisfying feeling going, the kind of writing that meets unspoken needs is special and this site clearly has writers who understand their readers more than most do today.

  40. prismlink prismlink

    Liked the post enough to read it twice and the second read found new things, and a stop at prismlink similarly rewarded the second look, content with hidden depths that only reveal themselves on careful rereading is the rare kind that earns lasting respect rather than fleeting first impressions only briefly held.

  41. echoperk echoperk

    A piece that read as if the writer was thinking carefully rather than just typing fluently, and a look at echoperk continued that considered quality, the difference between fluent typing and careful thinking shows up in writing and this site reads as the product of thought rather than just the product of language fluency apparently.

  42. truedock truedock

    Beyond the topic at hand this site reads as a small ongoing project of taking writing seriously, and a look at truedock reinforced that project quality, sites that treat publishing as an ongoing serious practice rather than as content production for traffic are sites worth supporting and this one has clearly chosen the serious approach.

  43. Decent post that improved my afternoon a small amount, and a look at seolayer added a bit more to that, sometimes the small wins online add up over time and a useful site like this one is the kind of place that contributes consistently to those small wins for me lately across many different topics I follow.

  44. prismlink prismlink

    Halfway through reading I knew this would be one to bookmark, and a look at prismlink confirmed that early intuition, when bookmark intent forms before finishing a post you know the writing has cleared a quality bar that most content fails to clear and this site has cleared it on multiple visits already.

  45. nextgentrendzone nextgentrendzone

    Came here from a search and stayed for the side links because they were that interesting, and a stop at nextgentrendzone took me even further into the site, the kind of organic exploration that good content invites is something most sites kill through aggressive interlinking and pushy navigation choices rather than relying on quality.

  46. hyperinit hyperinit

    A piece that brought a sense of order to a topic I had been finding chaotic, and a look at hyperinit continued that organising effect, content that imposes useful structure on messy subjects is doing genuine intellectual work and this site is providing that organisational function across multiple posts I have read recently here.

  47. jewelwillowmarketplace jewelwillowmarketplace

    Liked the natural conversational tone throughout, never stiff and never overly casual either, and a stop at jewelwillowmarketplace kept that comfortable middle ground going, finding a tone that respects the reader without becoming distant or overly familiar is harder than it sounds and this site nails that balance consistently across many different pieces.

  48. Considered as a whole this site has developed a coherent point of view that comes through in individual pieces, and a look at seolayer continued displaying that coherence, sites with a unified perspective rather than a grab bag of takes are sites with editorial maturity and this one has clearly developed that maturity through years of work.

  49. freshcartzone freshcartzone

    Thanks for the honest framing without exaggerated claims that the topic will change my life, and a stop at freshcartzone kept the same modest tone, restraint in marketing language signals trustworthiness and the writers here are clearly playing the long game by building credibility rather than chasing immediate clicks through hyperbole.

Deixe um comentário

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