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.
wettbüro paderborn
Feel free to visit my site :: halbzeit wetten (Tracey)
Reading this prompted me to subscribe to my first newsletter in months, and a stop at rankmotion confirmed the subscribe was the right call, content that earns a newsletter signup is content that has cleared a higher trust bar than a casual visit and this site has clearly earned that level of commitment from me.
сколько стоит нарколог на дом сколько стоит нарколог на дом
Really appreciate that the writer did not stretch the post to hit some target word count, the points end when they are made, and a stop at rankmotion reflected the same discipline, brevity is generosity in disguise and this site has clearly figured that out far better than most blog operations have.
The post made the topic feel approachable without making it feel trivial, that is a fine balance, and a stop at linkcipher maintained the same balance, finding the middle ground between welcoming and serious is genuinely difficult and the writers here have clearly figured out how to consistently hit it well across many different posts.
One of the more thoughtful posts I have read recently on this topic, and a stop at opalmeadowgoodsgallery 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.