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

3.613 Comentários

  1. Now realising the post solved a small problem I had been carrying for weeks, and a look at besttrendmarket extended that problem solving function, content that connects to specific unresolved questions in my own life rather than just providing general interest is content with real practical impact and this site is providing that practical value.

  2. Looking forward to seeing what gets published next month, and a look at seotactic extended that anticipation across the broader site, finding myself looking forward to a sites future content rather than just consuming its existing content is a stronger commitment level than I usually reach with new finds and this site triggered that.

  3. Found the section structure particularly thoughtful, and a stop at besttrendmarket suggested the same care across the broader site, structural choices guide the reader through the material in ways most people do not consciously notice but feel the absence of when those choices are made carelessly or not at all.

  4. znricwmqs znricwmqs

         Stakelogic Live has been approved by the UK Gambling Commission. It will now start providing its library of games from industry-leading operators. As it was in Malta and the Dutch jurisdictions after entering the live casino market in June 2021. Table GamesRouletteAlternative Roulette Both types of rail roulettes are available in different sizes and load capacities. The selection depends on the specific application requirements. Apart from these two types, rail roulettes can also be customized according to customer specifications and requirements. Custom rail roulette can be made to suit specific applications and requirements. Businesses can request for specific dimensions, track configurations, and material specifications to create a tailored solution that meets their particular needs.
    https://paldoo.me/amigo-casino-review-for-players-from-the-united-kingdom/
    Super Stake Roulette 5,000x When choosing a betting strategy, players should consider the total potential winnings compared to the size of their stake. The Haunted Heights Leaderboard has a 10,000 Sweeps Cash prize pool One software provider that has taken to the same style of roulette is Stakelogic with a brand-new title to complement its existing roulette with multipliers Super Stake Roulette 5000x. For those who love the atmosphere of a real casino, our live casino is just the ticket. Our professional dealers are ready to bring all the fun of the casino floor to you, with games like live roulette, blackjack, and baccarat available to join. Log in with itch.io to leave a comment. Gambling can be harmful if not controlled and may lead to addiction! Use our online tools and play responsibly.

Deixe um comentário

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