Ir ao conteúdo

Exercicio 1 – Sistemas Operacionais II – INE5424 – UFSC

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.

8.905 Comentários

  1. After reading several posts back to back the consistent voice across them is impressive, and a stop at strategyoperations continued that voice consistency, sites that maintain a single coherent voice across many pieces by potentially many writers represent serious editorial discipline and this one has clearly developed the institutional consistency needed for that.

  2. Took me back a step or two on an assumption I had been making, and a stop at fashioncartworld pushed that reconsideration further, writing that gently corrects the reader without being aggressive about it is a rare diplomatic skill and the team here clearly knows how to land critical points without turning readers off.

  3. Worth observing that the post landed without needing a flashy headline to hook attention, and a stop at growthnavigation did the same, content that earns engagement through substance rather than packaging is the kind I trust more deeply and this site has clearly chosen substance as the primary lever for reader engagement throughout.

  4. Felt the post had been quietly polished rather than aggressively styled, and a look at ideabuilderhub confirmed the same understated polish, sites whose quality reveals itself slowly rather than announcing itself loudly are the kind I trust more deeply because the trust is not based on first impressions of marketing but actual substance.

  5. Reading this gave me a small refresher on something I had partially forgotten, and a stop at crystalcovegoodsgallery extended the refresher, content that strengthens existing knowledge rather than just adding new is content with a particular kind of consolidating value and this site is providing that consolidating function across multiple visits.

  6. Started smiling at one paragraph because the writing was just nice, and a look at honeycovevendorroom produced a couple more such moments, prose that produces small spontaneous reactions in the reader is doing more than just transferring information and the writers here are clearly hitting that level fairly consistently throughout pieces.

  7. Worth pointing out that the writer made the topic feel more interesting than I had been expecting, and a look at directioncreatesresults continued that elevation effect, content that improves the apparent quality of its subject through skilled treatment is doing something real and this site has clearly developed that kind of editorial alchemy throughout.

  8. Reading this gave me a small sense of progress on a topic I have been slowly working through, and a stop at flintmeadowmerchantgallery added another step forward, learning happens in small increments across many sources and finding sources that consistently contribute is the actual practical value of careful curation in an information rich world.

  9. Probably the kind of site that should be more widely read than it appears to be, and a look at flintmeadowmerchantgallery reinforced that quiet wish, the gap between a sites quality and its apparent reach is sometimes large and that gap exists for this site in a way that makes me want to mention it more.

  10. Felt the writer respected the topic without being precious about it, and a look at crystalcovegoodsgallery continued that respectful but unfussy treatment, finding the right register for serious topics is hard and this site has clearly figured out how to take the topic seriously while still being readable for casual visitors regularly.

  11. Reading this gave me confidence to make a decision I had been putting off, and a stop at buildwithintelligence reinforced that confidence, content that translates into action in my own life rather than just informing it is content with the highest practical value and this site is generating that action level utility for me lately.

  12. Closed the post with a small satisfied sigh, and a stop at ideasneedclarity produced the same gentle exhale, content that ends well is content that respects the rhythm of reading and the writers here have clearly thought about how their pieces close rather than just trailing off when they run out of things to say.

  13. Quietly enthusiastic about this site after the past few hours of reading, and a stop at momentumplanner extended that enthusiasm, the calibration of enthusiasm to evidence is something I try to maintain and this site has earned a calibrated quiet enthusiasm rather than the loud excitement that usually fades within a day or two of finding something.

  14. Reading this on a difficult day was a small bright spot, and a stop at visionmechanism 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.

  15. Reading this with a notebook open turned out to be the right move, and a stop at driftorchardvendorparlor added more material to the notes, content that justifies active note taking from a passive reader is content with real informational density and this site is producing notes worthy material at a high rate consistently.

  16. Now planning to share the link with a small group of readers I trust, and a look at visionmechanism suggested more material to share with the same group, recommending content into a curated circle requires confidence in the recommendation and this site is making me confident in those personal recommendations on multiple separate occasions now.

  17. This one is staying open in a tab for the rest of the day so I can come back and re read certain parts, and a look at visionpathway suggests I will be doing the same with a few more pages here too, this is going to be a deep dive over the coming hours.

  18. CharlesFeeby CharlesFeeby

    Эта публикация обращает внимание на важность профилактики зависимостей. Мы обсудим, как осведомленность и образование могут помочь в предотвращении возникновения зависимости. Читатели смогут ознакомиться с полезными советами и ресурсами, которые способствуют здоровому образу жизни.
    Получить дополнительную информацию – clinica plus в донецке

  19. Solid quality, the kind of work that holds up to a careful read rather than a quick skim, and a quick look at rapidgoodscorner kept that standard going strong, content that rewards attention rather than punishing it is something I appreciate more and more these days online across nearly every topic I follow.

  20. Android için güncel sürümü bulmak epey meşakkatliydi açıkçası. Herkes farklı bir şey tavsiye ediyordu kime güveneceğimi bilemedim. Sonunda tüm teknik detayları inceleyip sistemi test ettim. En sonunda güvenilir bir kaynağa ulaştım ve size de tüm detayları aktarmak istedim, güncel bilgilere buradan bakabilirsiniz: 1xbet son sürüm indir 1xbet son sürüm indir. Yani anlatmak istediğim şu — mobil uygulaması inanılmaz hızlı ve stabil çalışıyor.

    Hiçbir sorun yaşamadım indirme işleminde. İşin doğrusunu söylemek gerekirse — kesinlikle pişman olmazsınız deneyin derim. Şimdiden iyi şanslar ve bol kazançlar…

  21. Now planning to recommend this site in a context where my recommendations are taken seriously, and a stop at daisycoveartisanexchange confirmed I should make that recommendation soon, the small but real act of recommending content into spaces where my taste matters is something I take seriously and this site is worth the recommendation.

  22. Top quality material, deserves more attention than it probably gets, and a look at floraharborcommercegallery reflected the same effort across the site, a hidden gem in the modern web where most attention goes to whoever shouts loudest rather than whoever actually delivers the best content for their readers without much marketing fanfare.

  23. A piece that did not lean on the writer credentials or institutional backing, and a look at frostrivervendorlounge maintained the same focus on substance, content that earns trust through quality rather than through name dropping is the kind I find most persuasive and this site is clearly playing on the substance side of that distinction.

  24. Really appreciate the confidence to make a clear point rather than hedging everything, and a quick visit to buildtowardmomentum maintained the same direct stance, writing that takes positions rather than equivocating is more useful even when the positions are debatable because at least the reader has something to react to clearly.

  25. ArthurNam ArthurNam

    Этот текст представляет собой обзор свежих данных и исследований в области медицины. Он призван помочь читателям понять, как научные достижения влияют на лечение, диагностику и общее состояние системы здравоохранения.
    Дополнительно читайте здесь – выход из запоя на дому самара

  26. This stands out compared to similar posts I have read recently, less noise and more substance, and a look at lemonridgevendorroom kept that gap going, you can really feel the difference between content made by someone who cares versus content made to fill a publishing schedule for an algorithm trying to keep growing somehow.

  27. Now appreciating the way the post avoided the temptation to be longer than necessary, and a look at progressinitiator continued that lean approach, content with the discipline to stop when finished rather than padding for length is content that respects both itself and its readers and this site has that disciplined editorial culture clearly throughout.

  28. A satisfying piece in the way that good meals are satisfying rather than just filling, and a look at clarityunlocksgrowth 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.

  29. Probably going to mention this site in a write up I am working on later this month, and a stop at ideamotionlab provided more material for that potential mention, content worth referencing in my own published work rather than just personal reading is content with the highest endorsement level and this site has earned that endorsement.

  30. A piece that built up gradually rather than front loading its main points, and a look at buildtowardmomentum maintained the same gradual structure, content that trusts the reader to reach conclusions through accumulating reasoning is more persuasive than content that announces conclusions and then defends them and this site uses the persuasive approach.

  31. Decided this was the kind of site I would defend in a discussion about good blog content, and a stop at frostrivervendorlounge reinforced that, very few sites earn active defence rather than passive consumption and this one has clearly crossed that threshold for me without needing any explicit pitch from the writers themselves either.

  32. Bookmark earned, calendar reminder set, share queued, all from one good post, and a look at progressinitiator did the same, when a single reading session triggers multiple downstream actions you know the content has actually moved me beyond the page and this site is moving me at that higher level reliably.

  33. 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 snowharbortradegallery showed the same care for the reader which is something I will remember the next time I need answers on a topic.

  34. Honestly impressed, did not expect to find this level of care on the topic, and a stop at growthoriented cemented the impression, you can tell within the first few paragraphs whether a site is going to be worth the time and this one delivered on that early promise nicely throughout the rest of what I read.

  35. Better than the average post on this subject by some distance, and a look at explorefreshstrategicideas reinforced that, you can tell within the first paragraph that the writer here actually cares about the topic rather than just covering it for the sake of having something to publish that week or that day.

  36. Really like that the writer trusts the reader to follow simple logic without restating every previous point, and a stop at fastgoodsarena kept that respect going, treating an audience as capable adults rather than as people who need constant hand holding makes a noticeable difference in the reading experience for me.

  37. 1xbet indir işlemini nasıl yapacağımı çok araştırdım valla. Güncel apk dosyasını nereden indireceğimi bulmak çok zaman aldı. Sonunda tüm teknik detayları inceleyip sistemi test ettim. En sonunda güvendiğim bir kaynağa ulaştım ve size de tüm detayları aktarmak istedim, güncel bilgilere buradan bakabilirsiniz: 1xbet nasıl indirilir 1xbet nasıl indirilir. Valla bak net söyleyeyim — telefonuma indirdikten sonra çok memnun kaldım.

    Hiçbir hata almadım indirme esnasında. Birçok platform denedim ama en iyisi bu çıktı — kesinlikle pişman olmazsınız deneyin derim. Umarım siz de memnun kalırsınız…

  38. Keithpet Keithpet

    В этой статье мы обсудим процесс восстановления после зависимостей, акцентируя внимание на различных методах и подходах к реабилитации. Читатели узнают, как создать план выздоровления и использовать полезные ресурсы для достижения устойчивых изменений.
    Что скрывают от вас? – психолог калуга клинический хороший

  39. Now planning to write about the topic myself eventually using this post as a reference, and a look at actionoveranalysis would also serve in that future piece, content that becomes raw material for my own writing rather than just informing my reading is content with multiplicative value and this site is generating that multiplicative effect.

  40. Yesterday I was complaining about the state of online writing and today this site has temporarily fixed that complaint, and a look at royaldealzone extended that mood reversal, the short term mood improvement that comes from finding good content is real and this site has produced that improvement for me at a useful moment.

  41. Now adding this to a list of sites I want to see flourish, and a stop at fastgoodsarena reinforced that wish, the few sites I actively root for are sites that produce the kind of work I want more of in the world and this one has joined that small list based on what I have read so far.

  42. Felt no urge to argue with the conclusions even though I started the post slightly skeptical, and a look at growthalignment maintained that pattern, writing that earns agreement through clarity of argument rather than rhetorical pressure is the kind I find most persuasive and the kind I want to read more of these days.

  43. Felt the writer did the homework before publishing, the references hold up, and a look at exploreideasdeeplynow continued that documented care, content with traceable claims rather than vague assertions is the kind I trust and the lack of bald assertion in this post is one of its quietly impressive qualities for me.

  44. A small thing but the line spacing and font choices made reading this physically pleasant, and a look at actioncreatesclarity maintained the same careful design, technical choices about typography are part of what makes online reading actually comfortable and this site has clearly invested in the design layer alongside the content layer carefully.

  45. Decided after reading this that I would check this site weekly going forward, and a stop at caramelharborcommercegallery reinforced that commitment, deciding to add a site to a regular rotation requires meeting a quality bar that very few places clear and this one cleared it cleanly without any noticeable effort or marketing push behind it.

  46. 1xbet mobil indir nasıl yapılır diye çok kafa yordum valla. Herkes farklı bir adres veriyordu kime güveneceğimi şaşırdım. Adımları doğru sırayla uyguladıktan sonra erişim sorunsuz açıldı. En sonunda sağlam bir kaynağa ulaştım und size de tüm detayları aktarmak istedim, güncel bilgilere buradan bakabilirsiniz: 1xbet mobil yükle 1xbet mobil yükle. Şimdi size kısaca özet geçeyim — mobil uygulaması inanılmaz stabil ve hızlı çalışıyor.

    güncellemeleri de sorunsuz bir şekilde yükleniyor. İşin doğrusunu söylemek gerekirse — başka yerde vakit kaybetmeyin yani. Umarım siz de memnun kalırsınız…

  47. Reading this confirmed that my time researching the topic in other places had not been wasted, and a stop at clarityspark extended the confirmation, when independent sources agree that is a useful signal and this site is one of the more reliable sources I have found for cross checking what I read elsewhere on similar subjects.

  48. Going to share this with a friend who has been asking the same questions for a while now, and a stop at actionmatrix added a few more pages I will pass along too, this is the kind of generous information that earns a small thank you from me right now and again later this week.

  49. Glad I gave this a chance rather than scrolling past, and a stop at forwarddesign confirmed I made the right call, sometimes the best content is hidden behind unassuming headlines that do not scream for attention and learning to slow down and check those out has paid off many times now across years of reading.

  50. Came away with a small but real shift in perspective on the topic, and a stop at shopcoremarket pushed that shift a bit further, the kind of subtle reframing that good writing does to a reader without making a big deal of it is something I always appreciate when it happens which is sadly not that often.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *