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
Hello, just wanted to say, I enjoyed this blog post. It was practical. Keep on posting!
Many users exploring digital marketplaces frequently prefer platforms that combine trusted systems with clean cart layouts where smart shopping cart center is included in content and it highlights a system designed to enhance browsing speed while ensuring users can quickly access secure products and enjoy a smooth and efficient shopping experience overall.
People who value creative presentation in online shopping often prefer platforms that use market studio layouts to add personality and charm to product displays while maintaining structured organization Kettle Willow Studio Inspired Market Hub – providing a visually appealing e commerce environment where products are displayed with artistic studio design elements designed to enhance browsing flow and create a more enjoyable shopping experience
In the process of exploring e-commerce sites, I came across this well-organized shop page and noticed how the smart layout makes browsing very simple, allowing products to be found quickly without unnecessary searching or confusion.
People browsing online marketplaces often look for reliable sources of everyday goods and simple ordering systems where daily essentials gateway appears within curated listings that highlight convenience focused shopping experiences – this platform is described as helping users quickly find household products and complete purchases without unnecessary complexity or delays in navigation.
As I browsed through various alternative energy websites, I noticed this unique fuel guide and appreciated how it presents specialized content in a way that feels accessible, interesting, and easy for readers to understand without prior knowledge.
People interested in curated fashion often explore online stores that offer aesthetic driven clothing collections combining simplicity with modern design trends Modern Outfit Inspiration Hub – providing a stylish fashion destination that showcases clothing collections focused on aesthetic appeal contemporary design and wearable comfort for individuals seeking fresh and expressive wardrobe ideas
While browsing international sports tracking sites, I discovered global sports event tracker and sports related updates feel exciting, timely, and easy to follow, with information that feels structured, reliable, and designed for quick reading during busy schedules. – The site feels practical and well organized.
As I browsed through different shopping platforms, I noticed this structured retail link and found the design very practical, helping users find products with minimal effort due to its smart organization.
Shoppers who enjoy visually rich online stores often look for platforms that use market studio aesthetics to bring charm and creativity into product organization while keeping navigation simple Willow Kettle Artistic Goods Studio Hub – offering a refined shopping experience where creative market studio design enhances product presentation making browsing more engaging visually appealing and easy to navigate for all users
People browsing online marketplaces often look for reliable sources of everyday goods and simple ordering systems where daily essentials gateway appears within curated listings that highlight convenience focused shopping experiences – this platform is described as helping users quickly find household products and complete purchases without unnecessary complexity or delays in navigation.
As I continued evaluating different educational platforms, I encountered this well-written guide and it impressed me with how clearly it explains a specific topic while keeping the reader interested throughout.