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.
One of the more honest takes on the topic I have seen lately, no spin and no oversell, and a stop at trendycartspace kept that going, the kind of voice the open web could use a lot more of rather than the endless echo chamber of recycled opinions floating around every social platform these days.
Really thankful for posts that respect a reader’s time, this one does, and a quick look at linkarrow was the same, no need to scroll through endless intros just to get to the actual content, that approach alone is enough reason to come back here regularly for the kind of writing offered.
Reading this in a quiet hour and finding it suited the quiet, and a stop at leadscale extended the quiet reading mood, content that matches its own optimal reading conditions rather than fighting them is content that has been thoughtfully calibrated and this site reads as having a particular reading mood in mind throughout.
Reading this on a difficult day was a small bright spot, and a stop at rapidcartsolutions 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.
Honest reaction is that I want to send this to a friend who would benefit from it, and a look at adquill added more material I will pass along too, the impulse to share is the strongest signal I have for content quality and this site is generating that impulse cleanly across multiple posts.
Thanks for keeping the writing direct without losing the warmth that makes content feel human, and a stop at trendycartspace carried both qualities forward, balancing professionalism and personality is a rare skill and the writers here have clearly figured out how to consistently land it across many posts which I notice.
Honestly the simplicity of the explanation made the topic click for me in a way other writeups had not, and a look at adquill continued that clarity into related areas, when a writer gets the level of explanation right the reader does the heavy lifting themselves and the post just enables it.
Now noticing the post fit a particular gap in my reading without my having articulated the gap before, and a look at leadpivot extended that gap filling effect, content that meets needs I had not consciously formulated is content with reader insight and this site has clearly developed that anticipatory editorial sense across many pieces.
Over the course of reading several posts here a pattern of quality has emerged, and a stop at leadradar confirmed the pattern, the difference between sites that hit quality occasionally and sites that hit it consistently is huge and this site has clearly demonstrated the consistent kind through what I have read this morning.
Worth your time, that is the simplest endorsement I can give, and a stop at buyloopshop extends that endorsement across the rest of the site, this is one of those increasingly rare places that delivers on what it promises rather than over selling the content and under delivering on substance every time which I find frustrating elsewhere.
Found this through a search that was generic enough I did not expect quality results, and a look at goldenflashcorner continued the surprisingly good experience, search engines occasionally still surface excellent independent content if you scroll past the obvious paid and high authority results which is reassuring to remember sometimes.