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 comparison of modern commerce hub platforms and their informational clarity, I came across discover upland canyon market hub – The experience seems decent, and the content is useful and easy to understand without unnecessary complexity.
While reviewing sandbox ecommerce systems and UI marketplace frameworks, testers found a central module featuring zen cove goods room vendor console node integrated into structured layout, and despite the calming zen aesthetic, the goods room is empty which reduces user satisfaction and engagement during usability testing and evaluation cycles
While researching structured artisan emporium websites and their delivery consistency, I explored browse solar orchard commerce emporium – It’s great for gift shopping because everything arrived intact and carefully packaged.
Across various discussions on futuristic ecommerce interfaces and web design experimentation, viewers notice components inside Crystal Cove showcase portal – although the portal is visually engaging and well structured, it lacks active product displays, giving it a conceptual rather than commercial feel
While going through multiple niche discovery threads and online resource hubs, I found something that seemed easy to navigate and well structured, especially where Hazel Harbor entry page appeared – The layout is clean, and browsing feels comfortable and simple, making everything accessible without extra effort.
Frequent users note that the browsing experience is consistent across devices, and while exploring inventory through Cove Goods Navigation Panel they find the structure helpful – the layout emphasizes simplicity and keeps product listings visually balanced for improved usability and comfort during extended sessions
Online consumers who value both aesthetics and practicality in shopping platforms often explore curated marketplaces, and while doing so they may come across suncove atelier marketplace experience offering organized listings and – it delivers a modern commerce environment designed for smooth browsing and stylish product interaction.