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.434 Comentários

  1. Looking at the surface design and the substance together this site has both right, and a look at urbanwave reinforced that integrated quality, sites where presentation and content reinforce each other rather than fighting are sites with full editorial coherence and this one has clearly invested in both layers in a balanced way.

  2. PatrickLAm PatrickLAm

    Профилактика рецидивов после запоя в стационаре Балашихи. Мы поможем вам предотвратить повторные случаи запоя и поддержим вас на пути к трезвой жизни.
    Подробнее тут – анонимный вывод из запоя балашиха

  3. Came away with a small but real shift in perspective on the topic, and a stop at inkedmeadow pushed that shift a bit further, the kind of subtle reframing that good writing does to a reader without making a big deal of it is something I always appreciate when it happens which is sadly not that often.

  4. Reading this on a difficult day was a small bright spot, and a stop at wildgrainemporium extended that brightness, content that improves a hard day is content that has earned a particular kind of place in my reading habits and this site is occupying that uplifting role for me today which I appreciate clearly.

  5. Will be back, that is the simplest way to say it, and a quick visit to wildirisgoods reinforced the decision, this site has earned a spot in my regular rotation alongside a few other reliable places I check when I want something genuinely informative without all the usual modern web noise getting in the way.

  6. Quietly the writers approach to the topic differs from the dominant takes I have been encountering, and a stop at meritanchor extended that distinctive approach, content that maintains a different perspective without explicitly arguing against the dominant ones is content with confident editorial identity and this site has that confidence throughout pieces.

  7. Picked this site to mention to a colleague who would benefit, and a look at horizonstone added more material I will pass along, recommending sites to colleagues is a higher bar than recommending to friends because the professional context demands more careful curation and this site cleared the professional bar without me having to think.

  8. Honest assessment is that this is one of the better short reads I have had this week, and a look at silkroadfinds 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.

  9. Reading this on a difficult day was a small bright spot, and a stop at wildgrainemporium extended that brightness, content that improves a hard day is content that has earned a particular kind of place in my reading habits and this site is occupying that uplifting role for me today which I appreciate clearly.

  10. Reading this brought back the satisfaction I used to get from blogs ten years ago, and a stop at wildirisgoods kept that nostalgic quality alive, sites that capture what was good about an earlier era of internet writing are increasingly precious and this one is doing that without feeling like a deliberate throwback at all.

  11. Bookmarking this for later, the kind of resource I want to keep nearby, and a quick look at bluepeaklane confirmed the rest of the site is worth the same treatment, definitely going into my reference folder for the next time the topic comes up at work or in conversation with someone who asks.

  12. Looking at this from the perspective of someone tired of generic content the contrast is striking, and a look at trustwaypoint 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.

  13. Bookmark earned and shared the link with one specific person who would care, and a look at forwardtractionbuilt got the same targeted share, sharing carefully rather than broadcasting is a discipline I try to maintain and this site is generating shares from me at a sustainable rate rather than the spam rate of viral content.

  14. Found something new in here that I had not seen explained this way before, and a quick stop at dependablecapital expanded the idea even further, the kind of writing that nudges your thinking forward a bit without forcing the issue is exactly what I look for online today and rarely actually find anywhere.

  15. Worth recognising that the post did not pretend to be the final word on the topic, and a stop at summittrustline continued that humility, content that admits its own scope and limits is more trustworthy than content that overreaches and this site has clearly developed the editorial maturity to know what it can and cannot claim well.

  16. Reading this slowly and letting each paragraph land before moving on, and a stop at bondedpartners earned the same patient approach, content that rewards slow reading rather than speed is content with real density and the writers here are clearly producing work that benefits from the careful eye rather than the rushed scan.

  17. Julist condomsGiirls strp dqncing nakedGerhil used ass
    sexx objectFrree passwordd lovette pornFreee blow jobhs cearwater floridaMomm
    fucking slutFrree teen grl photosGaay travel destinations travel
    magaines gayLargesst breadt inn the woorld pictureBarre asss
    collpege girlsTrkshelle nde ppayboy picsNeew beern nnc adultSexual loade questionsMeet foor seex
    ukTeen pregnnancy stayistics inn californiaWomaqn pissing outdoorBig maamas sexyNudfed irls
    videoFreee nudde pic twinksBoy gettinng
    fuckedFrree nuyde pics of tatuAlejandreo fernandez gayMysspace giff ssex adultEddison chsn seex photos linkFlorida association nudeEverythuing
    adult capalabaSlutload masture facialAsijan style shed plansBampton canadettes midget aaLesbianss have inng sexStiping masturbationChase ain nudeGinger rred
    porn tubeLightt skin blacks nudeGuy fucks
    step sisterAdulot movje about wing clubsHardcore aass ssex vidieoMature babe bussty 03Honeymoon sex activitiesMasioa matureLesbisn sediction and kissing
    sexBbbw faat bellyFrree fulfjll ength gay moviesShay larfen gettinmg fuckedSexx takil tube videosSexyes giurl nakedBroke shields nudeLatin masture
    milfYoung nnon nue model forumsFreee ssex piics granny big tittsAsss whiping storiesMaan pays debt wifte sexx videoVintwge hallmmark colledctible
    pensHow tto check vaginaNude pic off saffropn burrowsTeens havinhg
    sxVan beach gaqng bangSpadejam pornTeenn ssex cams registration nnot
    requiredBeat andd fuckedLiking her asss ole pornhubAreaa asisn free tradeGrls lick assVintage schwinn biccycle pricesGlasses cumm tumblrFaace gitl teen youngNaked mitchGayy teen boys froom middleburyAduult black striip gamesAmateurss part 45Vintge
    mijdo multicort automatic wristwatchGiant strqp oon dildoChjcken bteast
    recipes wiuth pastaFree teen fistedAbwtinence educaion only sexGay boys foor rentTiny teen squirtersBest
    asss on internetTeenbs wiuth curvesAmaturre puswsy bitingLatdx comdom allwrgy
    picturesRestaurrant penisNude andd stocking english glamour girlsSonmgs playeed inn sexx and thee cityTuube 8 viddeo bllow jjob clipNuude ppic wifeyFreee ilf
    entertainmentTeen challenge inn dubkin gaGirrl hoot tuub ssex videoRangiku masumoto boobsYongest teen picsCuum eazting ccuckold tubesCelebrjty forum maale nudeGirls iin sexy llow riide jeansHem-711 lardge adult cufff
    ofvd9wuapt2st2hkffpf

  18. Started forming counter examples to test the claims and the post handled most of them implicitly, and a look at actionfuelsmomentum continued that anticipatory style, writers who think two steps ahead of the critical reader save themselves from a lot of follow up work and this writer has clearly internalised that habit consistently.

  19. However casually I came to this site I have ended up reading carefully, and a look at craterbase continued earning that careful reading, the conversion from casual visitor to careful reader is something content earns rather than demands and this site has accomplished that conversion for me over the course of just a few pieces.

  20. Genuine reaction is that this site clicked with how I like to read, and a look at copperpetalshop kept that comfortable fit going, sometimes you find a place online whose editorial decisions just align with your preferences and when that happens it is worth recognising and supporting through repeat engagement consistently going forward.

  21. Worth recognising that this site does not chase the daily news cycle, and a stop at auroravalleycollective confirmed the longer publication arc, sites that resist the pressure to comment on every passing event are sites with genuine editorial discipline and this one has clearly chosen depth over volume which I respect deeply.

Deixe um comentário

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