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.
If you scroll past this site without looking carefully you will miss something, and a stop at discovernewfocuspoints extended that mild warning, the surface of the site does not advertise its quality loudly which means careful attention is required to recognise what is being offered here which is itself a kind of editorial signal.
I appreciate the clarity here, everything is explained in simple terms without unnecessary detail, and after a quick stop at growintentionallynow the points came together nicely for me, the writing keeps things straightforward and respects the reader from start to finish without ever talking down to anyone.
Reading this on a phone at a coffee shop and finding it perfectly suited to that context, and a stop at discoverinnovativegrowthpaths 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.
Worth flagging that the post handled an angle of the topic I had not seen elsewhere, and a look at createconsistentdirectionalgrowth extended that fresh treatment, content that finds underexplored corners of well covered subjects is genuinely valuable and this site has demonstrated that exploratory editorial approach across multiple pieces in my reading sessions today.
Came in confused about the topic and left with a much firmer grasp on it, and after createforwarddirection I felt I could explain this to someone else without hesitation, that is the gold standard for any educational content and most sites simply fail to reach it ever which is unfortunate but true.
A satisfying piece in the way that good meals are satisfying rather than just filling, and a look at discovernewdirectionpaths extended that satisfaction, the metaphor between content and meals is one I find useful and this site reads as a satisfying meal rather than the empty calories that most content provides for casual readers.
If a friend asked me where to read carefully on the topic I would send them here without hesitation, and a look at buildsustainablegrowth confirmed the recommendation strength, the directness of my recommendation reflects how confident I am in the quality and this site has earned undiluted recommendations from me across multiple recent conversations actually.
Even on a quick first read the substance of the post comes through, and a look at learnandoptimizepath reinforced that immediate quality, content that does not require a slow careful read to demonstrate value but rewards one anyway is content with real depth and this site has produced work of that demanding depth class.
Really nice to see things explained without overcomplicating the topic, the words flow naturally and stay easy to follow, and a short visit to findgrowthsolutionsnow only added to that experience because the same simple approach is used across the rest of the page too without any change in tone.
One of the more honest takes on the topic I have seen lately, no spin and no oversell, and a stop at learnandadvancegrowth 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.
Now sitting back and recognising that this was a small but real win in my reading day, and a stop at seotrail extended that quiet win, the cumulative effect of small reading wins versus the cumulative effect of small reading losses is real over time and this site is contributing to the wins side of that ledger.
I learned more from this short post than from longer articles I read earlier today, and a stop at discoverinnovativegrowthpaths added even more useful detail without going off topic, this site clearly knows how to keep things focused without sacrificing depth which is a hard balance to strike for any writer.
Now understanding why someone recommended this site to me a while back, and a stop at growresultsdrivenstrategy explained the recommendation, sometimes recommendations make sense only after experience and this site has finally clicked into place as the kind of resource I now understand was being recommended for sound editorial reasons by my friend.
Closed the tab feeling I had spent the time well, and a stop at tennisvortex extended that feeling across more pages, the test of whether time on a site was well spent is one I apply silently after closing tabs and very few sites pass it but this one passed it cleanly today afternoon clearly.
Thanks for the simple approach, too many sites bury the actual point under layers of unnecessary words, but here every line earns its place, and a look at seotrail showed the same care for the reader which is something I will remember the next time I need answers on a topic.
Worth recognising the absence of the usual blog tropes here, and a look at startmovingwithpurpose continued that fresh quality, sites that avoid the standard moves of the medium read as more original even when the content is on familiar topics and this one has clearly chosen its own path through the conventional terrain skilfully.