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
Many online shoppers prefer websites that offer intuitive browsing and clear structure especially when they browse BerryGoods Cove Market Place – I enjoyed using it because everything is nicely arranged and the layout helps users move through categories without confusion.
In the process of analyzing digital commerce platforms focused on user-friendly layouts and clean design, I found that fresh hub systems enhance usability and browsing satisfaction, which became evident when exploring modern fresh product hub – The design looks neat and refreshing, making browsing products feel light, smooth, and easy overall.
As I explored different branding executions, I encountered this curated example and it stands out thanks to its cohesive styling and smooth layout that create a pleasant and professional impression.
Shoppers exploring e-commerce platforms frequently prefer websites that focus on speed and simplicity in purchasing where easy value shopping hub appears in descriptions and it reflects a system designed to streamline browsing while helping users easily discover products and enjoy a smooth and efficient online shopping experience overall.
While browsing through several online options, I came across view this honey vendor page – Fast loading pages and a clean layout make browsing quite comfortable and visually easy to process.
While analyzing ecommerce platforms designed for structured product discovery and clear navigation, I observed that organized marketplaces improve usability and browsing flow, which became evident when testing smart product zone hub – The platform is neatly organized, making it easy for users to locate products across different categories.
While analyzing ecommerce interfaces focused on variety and centralized navigation, I observed that ultra hub designs significantly enhance browsing efficiency by grouping many categories together, which became evident when testing smart ultra product hub – The ultra hub feels modern and convenient, offering a large selection of categories in one place that makes shopping easy and intuitive for users.
While browsing through multiple online options, I came across take a look here – The site feels useful overall, presenting information in a clear format that allows users to understand everything without difficulty.
Online shoppers often appreciate websites that prioritize usability and smooth design flow, especially when visiting UserFriendly ZoneCart Hub – The layout is clean, interactions feel natural, and users can explore content without facing unnecessary complexity or delays.
While exploring different online platforms earlier today, I came across visit this ember cove site – The site is well organized, feels consistent, and visually appealing throughout, making browsing smooth and easy to follow.
During a deep dive into interface ideas, I came across this noteworthy link and I found the aesthetic quite pleasing, as it combines clarity with elegance in a way that feels both modern and approachable.