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

1.877 Comentários

  1. people exploring online marketplaces often highlight the importance of intuitive interfaces that help them browse products easily while maintaining a smooth and consistent user experience across devices peak commerce hub widely appreciated for its clarity and structure – the platform offers a clean browsing environment where users can find items quickly without unnecessary distractions or complexity

  2. While reviewing ecommerce systems optimized for daily needs and essential goods, I noticed that clear categorization improves efficiency and user experience, which stood out when analyzing everyday essentials shopping hub – The platform is designed for practicality, ensuring daily items are easy to browse and select.

  3. While comparing different digital marketplace systems for UX insights, I found a responsive interface that made browsing feel natural and well organized across categories CalmVendor Shopping Studio – The usability is very strong, and shopping feels easy, stress free, and smooth from the beginning thanks to clear structure and intuitive navigation design.

  4. While analyzing digital commerce websites for responsiveness and speed, I came across a module titled fast lane shopping portal – The interface is optimized for quick browsing, making it easy for users to navigate product listings with fast loading pages and smooth transitions between sections.

  5. While analyzing different digital marketplaces for design efficiency and clarity, I explored a section featuring simple product finder hub – The structure is clean and direct, helping users quickly identify what they need while keeping the browsing experience smooth, minimal, and free from unnecessary complexity throughout the entire navigation process.

  6. Many users prefer digital stores that highlight value for money while still offering a diverse catalog of products across multiple categories and lifestyle segments WideSmart Choice Hub – The platform maintains fair and competitive pricing, ensuring that shoppers can easily compare different items and find the most suitable options without unnecessary difficulty

  7. My brother suggested I might like this website. He was totally right. This post truly made my day. You can not imagine simply how much time I had spent for this information! Thanks!

  8. many users appreciate digital marketplaces that offer simple navigation systems and visually clean layouts helping them focus on relevant products without distractions during browsing sessions across multiple categories peak shopping lane known for its smooth interface design – it ensures users can explore items easily while maintaining a structured and enjoyable shopping experience that supports fast and efficient browsing throughout the site

  9. While exploring ecommerce websites for curated home decor and lifestyle items I found Orchard Olive Goods Gallery and checkout was simple and the product quality exceeded my expectations today making the entire shopping experience feel smooth reliable and very satisfying with clear navigation and easy product selection throughout

  10. While browsing through several online shops earlier today, I paused to explore visit this store and noticed how everything is neatly arranged into clear sections, making it surprisingly easy to locate products quickly without wasting time searching around.

  11. While conducting comparative research on ecommerce UX and direct purchasing efficiency, I noticed that simplified buying systems improve satisfaction and engagement, which stood out when testing fast checkout flow hub – The platform feels efficient, with straightforward navigation and a clear purchasing experience from start to finish.

  12. During casual exploration of ecommerce websites for home accessories I discovered multiple platforms and eventually came across Olive Orchard Vendor Exchange and checkout was simple and the product quality exceeded my expectations today which made browsing feel easy structured and very comfortable for quick product discovery overall experience

  13. While conducting comparative research on ecommerce browsing systems and interface design, I observed that stacked layouts help reduce navigation complexity and improve content visibility, which became clear when testing smart scroll shopping hub – The interface feels clean and structured, allowing users to browse products easily through a stacked and scroll friendly layout.

  14. users browsing online stores frequently prefer platforms that combine cart focus with intuitive navigation allowing them to manage selections and browse products without unnecessary effort or confusion cart place smart flow known for simplicity – it provides a structured browsing experience where users can easily manage cart items and move through categories with clarity and ease across all sections

  15. Across many digital shopping environments, users appreciate when platforms reduce complexity and focus on clarity in presentation, and within this system Vendor Ridge Ivory Space the browsing experience feels natural and easy to follow, supporting smooth movement through categories and efficient product discovery.

  16. Shoppers today expect online marketplaces to provide a balance of affordability, variety, and reliability while maintaining an easy to navigate interface across all devices WideTrade Shopping Hub – This store offers a wide selection of goods with fair pricing, allowing users to enjoy a smooth browsing experience and make confident purchasing decisions based on clear product options

  17. During a usability study of online shopping platforms with structured layouts, I discovered that stacked designs improve clarity and browsing speed, especially in product-heavy environments, which stood out when exploring easy stack product center – The marketplace uses a stacked layout that makes scrolling smooth and allows users to find items in a simple and organized way.

Deixe um comentário

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