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

  1. Many digital users prefer websites that act as a central hub for finding the latest product trends and popular ideas across multiple categories in one place Modern Style Center Hub making browsing more efficient – It is commonly recognized for its clean layout and structured navigation that helps users quickly access trending selections

  2. Modern ecommerce platforms are often judged by how effectively they simplify browsing and enhance user experience through design Universal Deals Hub – This store improves the shopping journey by presenting items in a well structured format that supports easy discovery and quick decision making

  3. Online shoppers often appreciate websites that make trend discovery easier by presenting items in a logical and uncluttered layout for better usability Simple Trend Hub – The platform emphasizes clarity and simplicity, helping users navigate updated selections without distractions

  4. Digital shoppers often highlight that engaging product selections make browsing more enjoyable and increase the likelihood of returning to a site, as seen on petal copper goods hub – the experience felt worthwhile since items looked appealing and made the platform feel like a place worth revisiting.

  5. Many online visitors enjoy platforms that emphasize cool, frosty design elements, making browsing feel more focused and enjoyable when exploring curated lifestyle items frostbay goods showcase hub – It reflects a coastal-frost marketplace identity that prioritizes simplicity, curated collections, and a peaceful visual presentation for all users.

  6. Online buyers often prefer websites that serve as a station for daily updated trending products so they can shop more efficiently Trend Access Station Hub enhancing shopping flow – It is commonly appreciated for its organized interface and frequent product refresh system

  7. PhillipLet PhillipLet

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

  8. While analyzing ecommerce platforms built for structured browsing and flexible product access, I observed that choice hubs help users navigate large inventories more effectively, especially when exploring diverse categories, which became evident when testing smart shopping variety hub – The interface provides rich product selection and allows easy switching between categories, creating a smooth and intuitive browsing experience overall.

  9. Many visitors to digital shops appreciate when the variety of items creates a sense of discovery that makes browsing more enjoyable, especially on copper petal showcase hub – the experience felt engaging because products seemed interesting and made the platform feel worth exploring again later.

  10. Consumers who value time saving features often choose platforms that reduce browsing steps while maintaining an organized and user friendly structure across categories Fast Access Goods Spot – This spot ensures that users can quickly reach desired products through a simplified interface designed for efficiency and speed

  11. Many digital shoppers prefer platforms that act as a station for constantly updated trending products making shopping more dynamic and engaging Trend Cart Station Hub improving experience – It is frequently noted for its fast updating listings and user friendly navigation system

Deixe um comentário

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