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.720 Comentários

  1. 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.

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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.

  7. In my review of online marketplace interfaces I examined layout structure product visibility and overall user engagement across categories CreekCove Vendor Market Loft the experience was stable and well designed and everything is well organized and easy to browse which helped make navigation simple and enjoyable

  8. During my recent search for niche curated marketplaces that emphasize unique artisan goods and small vendor collaborations, Ruby Meadow boutique portal – I found the browsing experience engaging, the product range diverse, and the customer support responsive enough to answer all my questions promptly.

  9. While testing ecommerce vendor websites I evaluated usability design clarity and navigation efficiency across multiple device types and screen sizes CreekCove Trading Showcase Hub the platform was intuitive and responsive and everything is well organized and easy to browse making the entire shopping experience smooth and efficient

  10. Users who prefer structured ecommerce outlet layouts often engage with sites such as Harbor Pine Smart Outlet Hub where items are arranged in logical sections – The design makes browsing straightforward and efficient, helping users quickly find products while maintaining a well categorized and easy to navigate interface.

Deixe um comentário

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