Ir ao conteúdo

Exercicio 3 – Sistemas Operacionais II – INE5424 – UFSC

Trabalho 3 – EPOS
System Object Destruction

    No exercício três deviamos implementar o controle de destrução de objetos, o qual não deve corromper o sistema e também deve estar de acordo com a semântica da linguagem de programação.
    A implementação adotada funciona da seguinte maneira: na class Thread foi adicionado um campo _container, nele é guardada a fila em que a Thread se encontra no momento. Os métodos desta classe foram alterados para que a consistência do campo _container seja mantida. No método join, por exemplo, o campo _container é atualizado com o endereço da fila _waiting_for_me do objeto em que se da join.
    Quando uma thread entra para o estado RUNNING o seu campo container não é atualizado, já que caso o mesmo seja deletado (ou auto-deletado), ele tentará se remover de uma fila em que não está, não causando mais problemas.
    Quando uma thread que possui elementos na sua fila _waiting_for_me é deletada, ela não acorda aquelas que a estão esperando, entrando em uma situação de deadlock. Nosso sistema, por conseguir detectar essa situação facilmente, gera um aviso. Porém, caso a Thread que tente se dar join já tiver sido destruída e removida da memória, a thread em execução trava, como nosso sistema não consegue detectar esse erro ele não é informado.
    Quando um objeto que extende a classe Synchronizer é deletado, seu destrutor chama wakeup_all, fazendo com que todos as threads que estiverem travadas nele continuem a execução.

Arquivos Modificados:
Thread.h
Thread.cc
Sycronizer.h

7.630 Comentários

  1. I explored several internet stores and flower-related websites this morning before discovering professional plant collective, and I enjoyed browsing because the structure felt professional and navigation worked perfectly throughout the entire session.

  2. ThomasDam ThomasDam

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

  3. Wesleyacege Wesleyacege

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

  4. Robertemark Robertemark

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

  5. While exploring various online shopping platforms for usability and interface clarity, I came across a well structured layout that makes browsing easy and intuitive, and Cloud Ridge goods portal delivers a pleasant experience overall – The interface is clean and thoughtfully arranged, allowing users to locate products quickly without confusion or unnecessary complexity in navigation.

  6. While reviewing various uplifting digital platforms, I came across a website that emphasizes simplicity and clarity, and BrightBeginnings vision hub offers a smooth browsing experience overall – The design is clean, structure is logical, and users can navigate comfortably without unnecessary complexity affecting usability.

  7. Glad to find something on this topic that does not start with three paragraphs of throat clearing before getting to the point, and a stop at seolift also dives right in, respect for the readers time shows up in small editorial choices like this and they add up to a real difference quickly.

  8. Robertemark Robertemark

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

  9. During my review of various online shopping websites, I came across a platform with a clean and responsive layout, and Spire Cloud marketplace goods offers a stable browsing experience overall – Everything is structured clearly, allowing users to move through sections easily while enjoying fast performance and readable content across all pages of the site.

  10. Wesleyacege Wesleyacege

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

  11. Reading this confirmed that the topic deserves more careful attention than it usually gets, and a stop at findbetteropportunities extended that elevated framing, content that raises the appropriate weight of a subject without being preachy about it is serving a quiet but important editorial function for the broader cultural conversation about it.

  12. After checking several online shopping directories and recommendation platforms for fresh browsing content, I noticed featured product station – The website delivered smooth navigation between categories, information that was easy to browse, and a balanced layout that made the entire experience feel more organized and enjoyable overall.

  13. TobiasCed TobiasCed

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

  14. Reading more of the archives is now on my plan for the weekend, and a stop at thefashionedit confirmed the archive worth the time, the rare archive worth a dedicated reading session rather than just casual sampling is the rare archive of serious work and this site has clearly produced enough of that work to warrant the deeper exploration.

  15. During my exploration of ecommerce catalogs, I noticed a platform that emphasizes clean structure and speed, and Harvest Frost goods showcase offers smooth navigation overall – Everything is arranged neatly, pages respond quickly, and users can browse comfortably without unnecessary visual distractions or cluttered layouts.

  16. DoyleGof DoyleGof

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

  17. Danielwhads Danielwhads

    Выбор формата лечения определяется состоянием пациента, наличием хронических заболеваний и мотивацией к выздоровлению. При необходимости врач переводит пациента из амбулаторной формы в стационарную, обеспечивая непрерывность и безопасность терапии.
    Подробнее можно узнать тут – https://narkologicheskaya-clinika-v-rostove19.ru/narkologiya-rostov-kruglosutochno

  18. Comfortable reading experience throughout, no jarring tone shifts and no awkward formatting, and a look at everydayinnovation kept that smooth feel going, the kind of editorial polish that goes unnoticed when present but glaring when absent is something this site has clearly invested in across the broader content as well which deserves recognition.

  19. Michaelcix Michaelcix

    Врачи клиники «АнтиТокс» используют эффективные и проверенные временем препараты, которые помогают пациентам в кратчайшие сроки стабилизировать самочувствие и восстановить нормальную работу организма. В список основных препаратов входят:
    Ознакомиться с деталями – vyvod-iz-zapoya-na-domu novosibirsk

  20. Jamestom Jamestom

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

  21. I explored multiple online marketplaces and informational sites this morning before discovering professional digital hub, and I enjoyed a good experience overall since the information seemed reliable and pages opened smoothly without delays.

  22. GeraldVog GeraldVog

    Лечение в круглосуточном режиме выстраивается по принципу медицинской последовательности и непрерывного наблюдения. Даже при экстренном обращении терапия не ограничивается разовым вмешательством, а рассматривается как часть целостного лечебного процесса.
    Получить дополнительную информацию – https://narkologicheskaya-klinika-v-rostove19.ru

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

  24. Reading this post made me realise I had been settling for lower quality elsewhere, and a look at seomotion extended that recalibration, content that exposes how much I had been accepting in adjacent sources is content with calibrating effect on my standards and this site is performing that calibration function across topics for me reliably.

  25. StanleyDiave StanleyDiave

    Эта статья освещает различные аспекты освобождения от зависимости и пути к выздоровлению. Мы обсуждаем важность осознания своей проблемы и обращения за помощью. Читатели получат практические советы о том, как преодолевать трудности и строить новую жизнь без зависимости.
    Раскрыть тему полностью – [url=https://apteka.rin.ru/novosti/118264/kak-ostanovit-zapoy-u-muzha.html]прокапаться от алкоголя ростов[/url]

  26. Reading this prompted a small note in my reference file, and a stop at seomotive prompted another, the rare site that contributes useful nuggets to my own working knowledge rather than just consuming my attention is worth the time investment many times over compared to the usual pile of forgettable scroll content.

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

  28. During my review of value-oriented ecommerce sites, I came across a platform that feels clear and efficient, and Value Fresh outlet network offers smooth browsing experience overall – Products are structured neatly, navigation is easy, and users can browse deals comfortably without confusion or distraction.

  29. Now appreciating that I did not feel exhausted after reading, and a stop at startfreshjourney extended that energising quality, content that leaves me with more attention than it consumed is rare and the gap between draining and energising content is real over the course of a typical day spent reading widely online.

  30. KennethBrode KennethBrode

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

  31. Now recognising the editorial wisdom of letting some questions remain open at the end, and a look at seoorbit continued that intellectual honesty, content that does not force closure on contested questions is content that respects the limits of knowledge and this site has clearly developed the maturity to know when to leave space.

Deixe um comentário

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