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
During a search for unique tech gadgets, I stumbled upon TechTrendFinds – the layout is intuitive, and the variety of innovative items made selecting exactly what I wanted much simpler than expected.
While comparing different vendor platforms, this one clearly offers better organization which improves search and exploration convenience Garnet Harbor listings page everything is arranged neatly, making it easy to move through pages without difficulty
uplandcovevendorparlor.shop – Modern interface feels smooth with well organized sections throughout site
While exploring various online vendor platforms, I noticed how much a clear layout and intuitive interface improve the browsing experience for users Raven Summit trade hall hub the structure feels organized and navigation flows smoothly, making it easy to explore content without confusion or delays
Users exploring online catalogs frequently mention that balanced design and intuitive structure contribute significantly to overall satisfaction when browsing multiple product categories within a single platform experience Velvet Grove browsing interface the experience felt organized and visually comfortable, making it simple to move through content while maintaining a consistent and enjoyable flow across all pages
Digital marketplaces benefit from a good platform with intuitive navigation making everything feel well organized and simple Raven Summit item portal I enjoyed how clean everything looked
During casual exploration of online artisan stores I checked several platforms focusing on interface design and browsing experience and discovered Meadow Vendor Silk Hub – Really like the site design it makes browsing enjoyable every time as the navigation feels natural intuitive and smooth allowing easy access to all product sections
References:
Munich (München)
References:
https://casino-dortmund-hohensyburg.online-spielhallen.de/
References:
Nuremberg (Nürnberg)
References:
https://lucky-pharaoh-online-casino.online-spielhallen.de/
Searching for handmade jewelry for special occasions led me to GemstoneTreasures – the variety is impressive, and the browsing experience made finding elegant, meaningful pieces completely enjoyable.