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.
Without overstating it this is a quietly excellent post, and a look at mapleaisle 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.
Grateful for posts like this one, they remind me there are still places online run by people who care about quality, and a look at tidevendor reflected the same standards, you can tell the difference between content made for readers and content made just for search engines today and this is the former.
Now noticing the careful balance the post struck between confidence and humility, and a stop at qavlizo maintained the same balance, finding the line between asserting and admitting is hard and this site has clearly developed the calibration to walk that line consistently which produces a more persuasive reading experience for me.
Generally I bookmark sparingly to avoid building up a bookmark graveyard but this one earned a permanent slot, and a stop at clockbrace extended that permanence designation, the few sites I keep permanent bookmarks for are sites I expect to use repeatedly and this one has clearly cleared that expectation bar today.
Considered alongside other sources I have been reading this one consistently rises to the top, and a stop at gulfkoala maintained that top ranking, the informal ongoing comparison between sources is something I do whenever reading on a topic and this site keeps coming out near the top of those comparisons over many sessions.
However measured this site clears the bar I set for sites I take seriously, and a stop at dealzaro continued clearing that bar, the metrics I use for site quality are admittedly informal but they are consistent and this site has cleared them on multiple measurements across multiple visits which is meaningful for my evaluation.
Took a chance on the headline and was rewarded, and a stop at urbanso kept the rewards coming as I clicked through, the kind of place where every link leads somewhere worth the click is a small luxury on the modern web where so many sites are mostly empty calories disguised as content.
A piece that did exactly what it promised in the headline without overshooting or underdelivering, and a look at gapjumbo continued that calibration, alignment between promise and delivery is a basic editorial virtue that many sites fail at and this site has clearly mastered the matching of expectation and substance throughout pieces.