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.
Genuine reaction is that this site clicked with how I like to read, and a look at shopwithstyle 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.
Reading this slowly and letting each paragraph land before moving on, and a stop at everydayfindsmarket 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.
Well structured and easy to read, that combination is rarer than people think, and a stop at yourstylezone confirmed the same standard runs across the rest of the site, definitely the kind of place I will be coming back to when this topic comes up in conversation later again over the weeks ahead.
Bookmark earned and the bookmark feels like a permanent addition rather than a maybe, and a look at fashiondailydeals confirmed that permanent status, the difference between durable bookmarks and ephemeral ones is something I have learned to feel quickly and this site triggered the durable feeling almost immediately during my first read here.
Closed several other tabs to focus on this one as I read, and a stop at dailyshoppingzone held my undivided attention the same way, content that earns full focus in an attention environment full of competing pulls is content doing something genuinely well and the team behind it deserves recognition for that achievement consistently.
Reading this in the gap between work projects was a small but meaningful break, and a stop at findyourowngrowth extended that gentle reset, content that provides genuine refreshment rather than just distraction during work breaks is content with a particular kind of utility and this site fits that role for me reliably during work days.
Generally I find the content on similar topics frustrating in specific ways and this post avoided all of them, and a look at urbanfashioncorner continued that frustration free experience, content that sidesteps the standard failure modes of its genre is content with editorial awareness and this site has clearly studied what fails elsewhere consistently.
Genuine reaction is that this site clicked with how I like to read, and a look at keepmovingforward 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.
Decided I would read the archives over the weekend, and a stop at modernstylemarket confirmed that the archives would be worth the time, very few sites have archives I would actively read through but this one has earned that level of interest based on the consistent quality across what I have sampled so far.
This site definitely has all the information and facts I wanted concerning this subject and
didn’t know who to ask.
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 dailytrendmarket showed the same care for the reader which is something I will remember the next time I need answers on a topic.
Picked this post to share in a Slack channel where I knew it would be appreciated, and a look at discoverhomeessentials suggested I will share more from here later, content worth sharing into a professional context is content that has earned a higher kind of trust than mere personal interest and this site has it.
Working through this site has been a small antidote to the shallow content that fills most of my reading time, and a stop at starttodaymoveforward extended that antidote function, sites that quietly improve the average quality of my reading by being themselves are sites worth supporting through return visits and recommendations consistently.
Good clean post, no errors and no awkward phrasing that breaks the reading flow, and a stop at simplebuyhub kept the same standard, definitely the kind of editorial care that earns a return visit because it tells me the writer is paying attention to details that matter to readers rather than just rushing publication.
Reading this gave me a quiet moment of intellectual pleasure that I had not been expecting, and a stop at everydayfindsmarket extended that pleasure across more pages, the unexpected reward of stumbling into careful writing is one of the small ongoing pleasures of reading the open web and this site is delivering it reliably.