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

  1. xzflnprqs xzflnprqs

    If you start with the test play, you will realize that gambling is quite basic. There are unique bonuses and promotions, but they are limited. There is no wild symbol in the game, but the scatter sign can activate the desired Gates of Olympus slot bonus. At the same time, the multiplier symbol should also be mentioned, as it can increase the winning from 2 to 500 times. Up to 15 free spins will add to the gambling process, making it even more promising and lucrative. Absolutely! Gates of Olympus is a slot that blends immersive visuals, engaging mechanics, and the thrill of high-stakes play. With its tumbling reels, multipliers, and free spins, the game keeps you entertained while offering the potential for massive wins. Whether you’re a fan of mythology or simply love feature-packed slots, Gates of Olympus is a must-try for your next gaming session.
    https://parkbiznesu-rybnik.pl/bizzo-casino-game-review-a-fresh-spin-for-australian-players/
    Recent Searches Sign inwith askgamblers account Ready to experience premium online gaming designed specifically for New Zealand players? Create your account today and discover why thousands of Kiwis choose SpinBet for their online casino and sports betting entertainment. Gates of Olympus features a cascading mechanic. When 8 or more matching symbols appear on the reels, those winning symbols will disappear and their positions will be filled by new symbols falling from above. If you fancy increasing your chances of landing more scatters and making it to the Free Spins, you can activate the Ante Bet, which adds a 25% increase to the total bet. We have dozens of Ancient Greek mythology online slots, but the superstar in this theme category is Gates of Olympus. It shares the top position with its sibling, Gates of Olympus 1,000. This is a powerful game that feeds from the endless energy of Zeus. And when the king of the gods is in the mood, players can land up to x500 multipliers, which can significantly boost even the smallest payout.

Deixe um comentário

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