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.903 Comentários

  1. Robbiewrils Robbiewrils

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

  2. Michaelavags Michaelavags

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

  3. Now planning to share the link with a small group of readers I trust, and a look at shoppointmarket 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.

  4. Charlesdus Charlesdus

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

  5. Williampeway Williampeway

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

  6. Solid recommendation from me to anyone working in the area, the perspective here is grounded, and a look at growththroughfocus adds even more useful angles, the kind of site that becomes a reference rather than just a one time read which is a higher bar than most blogs ever reach today on the modern web.

  7. Really thankful for posts that respect a reader’s time, this one does, and a quick look at leafdawn was the same, no need to scroll through endless intros just to get to the actual content, that approach alone is enough reason to come back here regularly for the kind of writing offered.

  8. Let me save you some serious time, learned this the hard way. You find this amazing deal online: brand new Beamer, unlimited miles, price that makes you smile. Plus they freeze a surprise $2500 on your card for a week right before giving you the keys. Eight years in South Florida and these clowns still almost get me. When you need a proper and reliable premium ride to cruise around, do some real digging first and read actual customer reviews. Miami without decent wheels is basically a hostage situation, especially since the AC must be arctic cold and unlimited miles non-negotiable.

    I’ve run through maybe 45 rental companies across Dade, Broward, and Monroe, until I finally found one outfit that doesn’t play stupid games. If you are looking for the only honest source for premium wheels across South Florida, check the current details here: exotic car rental south beach fl exotic car rental south beach fl. Yeah, parking in South Beach will cost you a nice bottle of wine — but that’s the Miami tax. Just drive safe out there and absolutely skip that “windshield protection” upsell — pure profit for them, zero value for you. let me know if you guys have any other clean spots.

  9. Thomaslem Thomaslem

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

  10. Strong recommendation from me, anyone curious about the topic should make time for this, and a look at advancewithclarity only sharpens that recommendation further, the kind of resource that holds up against careful scrutiny rather than crumbling at the first critical question is rare and worth pointing other people toward when the topic comes up.

  11. Most of the time I bounce off similar pages within seconds, and a stop at cartwaymarket held me longer than I would have predicted, the ability to convert a likely bouncing visitor into an engaged reader is a quality signal and this site has demonstrated that conversion ability across multiple visits where I expected to bounce.

  12. Bruceram Bruceram

    Публикация знакомит читателей с различными подходами к реабилитации. От традиционных методов до современных программ — вы узнаете, как выбрать оптимальный путь к выздоровлению и преодолеть препятствия на этом пути.
    Ознакомиться с полной информацией – вывод из запоя капельница

  13. BrianBrimb BrianBrimb

    В этой публикации мы предложим ряд рекомендаций по избавлению от зависимостей и успешному восстановлению. Мы обсудим методы привлечения поддержки и важность самосознания. Эти советы помогут людям вернуться к нормальной жизни и стать на путь выздоровления.
    Уточнить детали – clinica plus в королеве

  14. If I had encountered this site five years ago I would have been telling everyone about it, and a look at growthsteeringhub extended that retrospective enthusiasm, the version of me who used to recommend favourite blogs frequently would have made sure friends knew about this one and that earlier enthusiasm is partially returning to me here.

  15. However many similar pages I have read this one taught me something new, and a stop at quickcartworld added more new material, content that contributes genuinely fresh information rather than recycling what is already widely available is content with real informational value and this site is providing that informational freshness at a notable rate.

  16. High quality writing, no marketing speak and no buzzwords that mean nothing, and a stop at explorefutureoptions kept that going, simple direct content that actually communicates something is harder to find than it should be and this is one of the rare places that gets it right consistently across many different posts.

  17. A clear case of writing that does not try to do too much in one post, and a look at easyonlinepurchases maintained the same scoped discipline, posts that try to cover too much end up covering nothing well and this site has clearly chosen scope discipline as a core editorial principle which shows up clearly in what I read.

  18. Mobil bahis için doğru uygulamayı arıyordum uzun zamandır. Play Store’da resmi olanı bulamayınca üzüldü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 ve size de tüm detayları aktarmak istedim, güncel bilgilere buradan bakabilirsiniz: xbet indir xbet indir. Şimdi size kısaca özet geçeyim — son sürümü bütün özellikleri eksiksiz sunuyor.

    kurulumu da çok kolaydı yani rahat olun. Birçok platform denedim ama en iyisi bu çıktı — en hızlı uygulama bu oldu artık. Herkese hayırlı olsun…

  19. Even just sampling a few posts the consistency is what stands out, and a look at growthsteeringhub confirmed the broader pattern, sites where every piece I sample lives up to the standard set by the others are sites with serious quality control and this one has clearly invested in whatever editorial process produces that consistency reliably.

  20. Picked up on several small touches that suggest a careful editor, and a look at easyonlinepurchases suggested the same hand at work across the broader site, editorial consistency at a granular level is one of the strongest signs that an operation is serious rather than just hobbyist and this site reads as serious throughout.

  21. Alfredsoica Alfredsoica

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

  22. If I am being honest this is the kind of site I quietly hope my own work will someday resemble, and a stop at bayharbortradehall extended that aspirational feeling, finding work that models what I want to produce is part of why I read carefully and this site has been performing that modelling function for me lately consistently.

  23. The lack of unnecessary jargon made the post accessible without sacrificing accuracy, and a look at cottonmeadowartisanexchange continued in the same accessible style, technical topics often hide behind specialised vocabulary but here the writer trusts the reader to keep up with plain language and that trust pays off nicely throughout the entire post.

  24. Closed the laptop after this and let the ideas settle for a few hours, and a stop at domelegend similarly rewarded reflective time, content that benefits from sitting with rather than racing past is the kind I want more of and the kind that this site appears to consistently produce week after week here.

  25. Now placing this in the same category as a few other sites I have come to trust, and a look at caramelharborvendorhall continued the placement decision, the small category of fully trusted sites is one I extend rarely and only after multiple positive reading sessions and this site has earned the category placement methodically over time.

  26. Anthonyhes Anthonyhes

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

  27. A piece that demonstrated competence without performing it, and a look at kettlecrestmarkethouse maintained the same self assured but unshowy register, the gap between competence and performance of competence is one I track and this site has clearly chosen to demonstrate rather than perform which I find much more persuasive as a reader.

  28. Skipped a meeting reminder to finish the post, and a stop at elitetrendcenter held me past another reminder, when content beats meetings the writer is doing something extraordinary because meetings have institutional support behind them and yet good writing can still occasionally win that competition for attention which I find heartening today.

  29. Reading this prompted me to subscribe to my first newsletter in months, and a stop at birchharbormerchantgallery 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.

  30. Thank you for the genuine effort here, it shows in every paragraph and not just the headline, and after my visit to momentumflowing I was sure this site cares about getting things right rather than chasing clicks, which is the main reason I will come back later this week to read more.

  31. Now noticing that the post benefited from being neither too short nor too long for its content, and a look at calmcovecraftcollective continued that calibration of length, sites that match length to content rather than padding to hit some target are sites that respect both their material and their readers and this site does both.

  32. Such writing is increasingly rare and worth supporting through attention, and a stop at quickshoppingcorner extended that supportive attention across more pages, the conscious choice to spend time on sites that produce careful work rather than convenient consumption is itself a small form of patronage and this site is receiving that conscious patronage from me.

  33. Took something from this I did not expect to find, and a stop at elitetrendcenter added another unexpected useful piece, content that exceeds expectations rather than just meeting them is the kind that builds enthusiasm and earns repeat visits without any explicit ask from the writer or platform behind the work being read.

  34. Now thinking I want more sites built on this kind of editorial foundation, and a stop at momentumflowing extended that wish into a broader hope, sites built on substance and care rather than on metrics and growth are the kind of sites I want to see more of and this one is a small example worth supporting.

  35. Reading this felt easy in the best way, no friction and no confusion at any point, and a stop at actionwithclarity carried that same comfort across more pages, the kind of editorial flow that lets you absorb information without fighting the format which is increasingly hard to find on the open web today across topics.

  36. High quality writing, no marketing speak and no buzzwords that mean nothing, and a stop at bayharbortradehouse kept that going, simple direct content that actually communicates something is harder to find than it should be and this is one of the rare places that gets it right consistently across many different posts.

  37. Now planning a longer reading session for the archives, and a stop at hazelharborvendorhall confirmed the archives are worth that longer commitment, sites with archives I want to read deliberately rather than just sample are rare and this one has clearly earned that level of interest based on the consistency of what I have already read.

  38. The structure of the post made it easy to follow without losing track of where I was, and a look at cloudharborcommercegallery kept the same logical flow going, this site clearly understands that organisation is half the battle in keeping readers engaged from the first line to the last across any kind of post.

  39. Donaldscalk Donaldscalk

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

  40. Found this useful, the points line up well with what I have been thinking about lately, and a stop at actionwithclarity added some angles I had not considered yet, definitely walking away with more than I came for which is the best outcome from time spent reading online for any kind of topic.

  41. Now planning to recommend this site in a context where my recommendations are taken seriously, and a stop at progresswithdirection 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.

  42. Probably this is one of the better quiet successes on the open web at the moment, and a look at clarityguidance reinforced that quiet success quality, sites that are doing well without making a noise about doing well are the sites I most respect and this one has clearly chosen the quiet success path consistently throughout.

  43. Felt the post had been written without looking over its shoulder, and a look at cloudharborcommercegallery continued that confident posture, content written for its own sake rather than against imagined critics has a different quality and this site reads as written from a place of confidence rather than defensive justification of every claim.

  44. After several visits I am now confident this site is one to follow seriously, and a stop at creekharborartisanexchange reinforced that confidence, the gradual building of trust through repeated quality exposures is the only sustainable way to develop reader loyalty and this site is building that loyalty in me through patient consistent work consistently.

  45. My friends would appreciate a few of these posts and I will be sending links accordingly, and a look at progresswithdirection added more pages to my share queue, content that earns shares to specific people in specific contexts is content with social utility and this site is generating those targeted shares from me consistently lately.

  46. Really like that the writer trusts the reader to follow simple logic without restating every previous point, and a stop at chestnutharbortradehouse 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.

  47. Worth a quiet moment of recognition for the consistency I have noticed across multiple posts, and a stop at fashioncartworld continued that consistent quality, sites that maintain quality across many pieces rather than peaking on one viral post are sites with real editorial discipline and this one has clearly developed that discipline carefully.

  48. Decided after reading this that I would check this site weekly going forward, and a stop at growthnavigation 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.

  49. Now appreciating the way the post avoided the temptation to be longer than necessary, and a look at actionbuildsresults 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.

Deixe um comentário

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