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

2.112 Comentários

  1. Online shoppers often value platforms that reduce friction, load quickly, and maintain clear visual hierarchy when presenting multiple product categories across a single interface CGS Shopping Hub – A smooth shopping environment ensures users can find what they need quickly while enjoying a visually balanced and intuitive browsing experience throughout the site.

  2. When reviewing platforms that combine learning with creativity tools, many highlight the importance of accessibility and interactive design elements that support engagement Outlet Creative Navigator – users appreciate how the site encourages experimentation and idea building through an intuitive layout that makes content discovery feel both simple and enjoyable.

  3. People who enjoy online shopping often choose platforms that focus on updated deals and simple browsing systems where quick discount corner hub appears in content and it reflects a system built to enhance browsing efficiency while helping users quickly discover products and take advantage of daily updated offers across multiple categories.

  4. Online shoppers often look for platforms that provide both security and helpful support during every transaction where safe commerce service point is included in content and it reflects a marketplace designed to ensure trustworthy purchases while offering efficient customer assistance and maintaining a smooth browsing and checkout experience overall.

  5. Judsonpex Judsonpex

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

  6. In modern online shopping environments users often prioritize structured layouts and minimal complexity especially when visiting Birch Marketplace Harbor Flow I like how organized everything is making exploring very convenient and allowing users to browse comfortably without distraction or confusion.

  7. In the process of evaluating digital shopping environments focused on cart optimization and usability, I found that efficient cart solutions significantly enhance flow and clarity, which was clear when reviewing optimized cart experience center – The system feels well structured, making browsing and checkout smooth, fast, and highly user friendly.

Deixe um comentário

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