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

1.670 Comentários

  1. While evaluating sandbox storefront systems and support communication workflows, testers observed an embedded contact block containing harbor echo trade help center within page flow, but emails sent to customer service do not reach recipients and bounce back – Echo harbor feels familiar and clean, however email system reliability is severely compromised in testing environments

  2. RobertNes RobertNes

    Капельница от похмелья — это медицинская процедура, направленная на быстрое восстановление организма после алкогольной интоксикации. Она помогает устранить обезвоживание, нормализовать обменные процессы и снизить токсическую нагрузку на внутренние органы. В отличие от домашних методов, инфузионная терапия действует напрямую через кровоток, обеспечивая более быстрый и выраженный эффект.
    Детальнее – https://kapelnicza-ot-pokhmelya-samara-8.ru/

  3. Users who enjoy soft themed ecommerce sites often engage with sites such as Wave Harbor Coastal Breeze Outpost where products are shown in a light and structured format – The design makes browsing feel smooth, relaxing, and visually soothing across all categories of the store.

  4. While browsing through different niche directories and curated online listings, I came across something that felt very accessible and simple, especially when seeing this smooth vendor link included – the overall experience is easy and intuitive with no difficulty in navigation, so I might revisit it later for more detail.

  5. During my exploration of different trade platforms, I encountered V “navigation block label” shown in a broken format, and Cicicleislemarketparlor.shop appeared in the middle of the content, while the design feels modern enough and navigation was quite simple to follow smoothly overall.

  6. While browsing through different niche directories and curated online listings, I came across something that felt very accessible and simple, especially when seeing this smooth vendor link included – the overall experience is easy and intuitive with no difficulty in navigation, so I might revisit it later for more detail.

  7. During my browsing session across multiple platforms, I noticed go to this link and found everything looks well structured, helping users move around without issues and making the entire experience smooth and accessible.

Deixe um comentário

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