Ir ao conteúdo

Exercicio 2 – Sistemas Operacionais II – INE5424 – UFSC

Trabalho 2 – EPOS
Implementação de Idle-waiting

    A implementação do exercicio 2, consiste em alteração da classe Syncronizer, onde na versão inicial a mesma utiliza yield gerando uma carga desnecessária para o processador. A alteração deve ser semelhante a realizada no exercicio um, fazendo com que não seja gasto recursos sem necessidade.
    Durante as discussões sobre a implementação imaginamos uma nova váriavel dentro de cada Thread para monitorar se a mesma está em uma estrutura como Semaphoro, Mutex ou váriavel condicional. Assim sendo possivel a verificação se está ou não, permitindo que nós façamos as devidas verificações para que o método resume e suspend não possam ser chamados quando a mesma estivesse esperando. Após algum tempo discutindo e analise dos códigos foi imaginada uma abordagem que em vez de criar uma váriavel nova para cada Thread seria necessário simplesmente a criação de um novo estado, denominado por nós de WAITING. Junto a isso foi criada uma fila para cada “Synchronizer”, que possui os processos que estão esperando para serem acordados. Os métodos que acordam os outros processos (wakeup e wakeup_all) foram implementados de forma não bloqueante, ou seja, as threads acordadas são apenas colocadas na fila “_ready”, sem troca imediata de contexto.
    Outras alterações também foram realizadas nos arquivos synchronizer.h, thread.cc, condition.h e semaphore.h, para que os mesmos funcionem corretamente com o novo estado WAITING. Por exemplo, no arquivo Thread.cc as implementações de Join, Resume e exit foram alteradas para a utilização deste novo estado, neste arquivo também foram criados novos métodos denominados sleep e wakeup. Que basicamente tratam a parte de colocar para dormir e botar neste novo estado e também na fila do “Synchronizer”. As devidas alterações foram realizadas nos demais arquivos, para que os mesmos funcionem com o novo estado WAITING.
    Também implementamos o busy waiting no “Synchronizer”, para o usuário poder escolher entre busy e idle waiting alterando uma variável booleana.

Arquivos Modificados:
synchronizer
condition.h
semaphore
thread

9.105 Comentários

  1. RonaldIsode RonaldIsode

    Статья посвящена анализу текущих трендов в медицине и их влиянию на жизнь людей. Мы рассмотрим новые технологии, методы лечения и значение профилактики в обеспечении долголетия и здоровья.
    Смотрите также – лечение наркомании нижний новгород

  2. I’ve stepped on enough landmines to write a guidebook. You find this tempting offer online — gorgeous convertible, fair daily rate, looks like a steal. Plus they lock up $4500 on your card and say “10-14 business days”. Fool me eighteen times? That’s just the 305 way of life. luxury car rental in miami. anyone who’s tried the trolley knows the struggle. South Beach night out, Design District shopping, or a spontaneous Keys trip — AC must be arctic and unlimited miles non-negotiable. I’ve tested so many rental companies I’ve honestly lost count. Finally found one outfit that doesn’t play games. rates change daily so check them out:
    luxury car rental prices luxury car rental prices Yeah parking in Wynwood will cost you — but that’s Miami for you. Anyway glad there’s at least one honest operator left.

  3. DonaldMaf DonaldMaf

    В данной статье рассматриваются физиологические и эмоциональные аспекты зависимости. Мы обсудим, как организм реагирует на зависимое поведение, и какие методы помогают восстановить здоровье и внутреннее равновесие.
    Не пропусти важное – заказать капельницу от похмелья

  4. Jamesfaw Jamesfaw

    Эта статья подробно расскажет о процессе выздоровления, который включает в себя эмоциональную, физическую и психологическую реабилитацию. Мы обсуждаем значимость поддержки и наличие профессиональных программ. Читатели узнают, как строить новую жизнь и не возвращаться к старым привычкам.
    Где можно узнать подробнее? – платный врач нарколог на дом

  5. I’ve got the battle scars to prove every word. Then you actually roll up to the lot. Plus they lock up $5500 on your card and say “it’ll drop off in 10-14 business days”. Fourteen years in South Florida and these jokers still almost get me. miami luxury car rental. anyone who’s tried the bus in August knows exactly what I’m talking about. Key Biscayne sunset, Bal Harbour shopping, or a spontaneous drive down to Homestead — AC must freeze your face off and unlimited miles or no deal. most are shiny garbage with fake five-star reviews bought from some online marketplace. Finally found one company that doesn’t play stupid games. rates change hourly so check before the weekend crowd cleans them out:
    south beach exotic car rentals south beach exotic car rentals Yeah parking in South Beach will cost you a nice bottle of wine — but that’s the price of paradise. Anyway glad there’s at least one straight operator left in this rental jungle.

  6. Trust me, I’ve learned everything the hard way so you don’t have to. You see this gorgeous deal online — clean spec, fair price, looks like a dream. Plus they put a $4000 hold on your card and say it’ll take two weeks to release. Eleven years in South Florida and these clowns still almost get me. those counters are professional bait-and-switch artists. anyone who’s tried the bus here knows exactly what I mean. leather seats that won’t fuse to your legs in August. most are shiny garbage with fake Google reviews bought in bulk. no games, no switch, no hidden BS in paragraph 12 of the contract. prices change hourly so check before the weekend crowd wipes them out:
    mia luxury car rental mia luxury car rental also bring polarized shades unless you enjoy driving into the sun like a blind bat. drive safe and definitely skip that “tire and wheel” upsell — pure profit for them, zero value for you.

  7. Let me save you some serious pain with this Miami rental nonsense. You see this gorgeous deal online — clean spec, fair price, looks like a dream. Plus they put a $4000 hold on your card and say it’ll take two weeks to release. Fool me eleven times? That’s just called living in Miami. luxury car for rent. anyone who’s tried the bus here knows exactly what I mean. leather seats that won’t fuse to your legs in August. most are shiny garbage with fake Google reviews bought in bulk. no games, no switch, no hidden BS in paragraph 12 of the contract. prices change hourly so check before the weekend crowd wipes them out:
    rent car luxury miami rent car luxury miami also bring polarized shades unless you enjoy driving into the sun like a blind bat. drive safe and definitely skip that “tire and wheel” upsell — pure profit for them, zero value for you.

  8. I’ve seen it all, and most of it isn’t pretty. You book something slick online — great photos, reasonable rate, looks like a win. Plus they freeze $4000 on your card and say “it’ll drop off eventually”. Fool me seventeen times? That’s just life in the 305. miami car rental luxury — stay far away from the airport booths. Miami without good wheels is basically a headache. Coconut Grove dinner, Bal Harbour shopping, or a spontaneous drive to the Keys — AC must be cold and unlimited miles or forget it. most are all flash and no substance. no games, no hidden fees, no nonsense. Here’s the only honest spot for premium rides across South Florida
    car rental near miami beach https://luxury-car-rental-miami-17.com Yeah parking in South Beach will cost you — but that’s Miami for you. Anyway glad someone’s still running an honest business.

  9. AlfredoSougs AlfredoSougs

    Эта публикация исследует взаимосвязь зависимости и психологии. Мы обсудим, как психологические аспекты влияют на появление зависимостей и процесс выздоровления. Читатели смогут понять важность профессиональной поддержки и применения научных подходов в терапии.
    Ознакомиться с деталями – лечение наркомании в нижнем новгороде

  10. Okay folks gather round — another Miami rental horror story coming at you. Then you actually drive to the rental lot. Completely different car sitting there — scratches everywhere, smells like someone hotboxed it for a week, and that “killer price”? Doesn’t include the mandatory $45 daily insurance or the $400 “destination fee” they add at the very end. Fool me thirteen times? That’s just living in the 305. luxury car rental miami florida. anyone who’s taken the Metro here knows the struggle is real. leather seats that won’t fuse to your skin in the August heat. most are polished garbage with fake five-star reviews bought from some shady service. Finally found one outfit that actually delivers what’s promised. Here’s the only straight shooter for premium rides across South Florida
    luxury car rental miami luxury car rental miami Yeah parking in Wynwood will cost you a nice dinner — but that’s just the Miami tax. Anyway glad there’s at least one honest rental joint left in this town.

  11. AlfredoSougs AlfredoSougs

    В статье по вопросам здоровья мы рассматриваем актуальные проблемы, с которыми сталкивается общество. Обсуждаются заболевания, факторы риска и важные аспекты профилактики. Читатели получат полезные советы о том, как сохранить здоровье и улучшить качество жизни.
    Раскрыть тему полностью – лечение алкогольной зависимости в нижнем новгороде

  12. I’ve paid my dues so you don’t have to. You spot this killer offer online — brand new Porsche, zero excess, price that screams “book me”. Different car waiting — dents everywhere, smells like cheap air freshener covering something worse, and that “killer price”? Doesn’t include the mandatory $55 daily toll pass or the $450 “convenience fee” they invent at checkout. Twenty years in South Florida and these clowns still almost get me. miami car rental luxury — run far from the airport counters. anyone who’s tried public transport here knows I’m not joking. South Beach dinner, Design District shopping, or a spontaneous Keys adventure — AC must be arctic and unlimited miles non-negotiable. most are shiny garbage with fake five-star reviews from God knows where. Finally found one outfit that actually keeps its word. Here’s the only straight shooter for premium rides across South Florida
    exotic car rental miami florida exotic car rental miami florida also bring polarized shades unless you enjoy driving into the sun like a zombie. drive safe and absolutely skip that “windshield protection” upsell — pure profit for them, zero for you.

  13. Alright, last one I swear — but someone’s gotta warn people about this Miami rental mess. You spot this killer offer online — brand new Porsche, zero excess, price that screams “book me”. Different car waiting — dents everywhere, smells like cheap air freshener covering something worse, and that “killer price”? Doesn’t include the mandatory $55 daily toll pass or the $450 “convenience fee” they invent at checkout. Twenty years in South Florida and these clowns still almost get me. those people are professional scammers with nice smiles and better shoes. anyone who’s tried public transport here knows I’m not joking. leather seats that won’t weld to your legs in July. most are shiny garbage with fake five-star reviews from God knows where. no games, no bait-and-switch, no hidden fees on page 8. prices change hourly so don’t wait around:
    luxury cars for rental luxury cars for rental Yeah parking in South Beach will cost you a nice bottle of wine — but that’s the Miami tax. Anyway glad there’s at least one honest operator left in this town.

  14. Кстати, недавно наткнулся на обсуждение реальных кейсов. Сам уже не первый месяц ищу нормальный способ провести транзакцию, без лишних проблем и комиссий. В общем, если вас тоже затрагивают эти вопросы — посмотрите тут. Вся необходимая информация по международным переводам: трансграничные платежи в условиях санкций https://mezhdunarodnye-platezhi-lor.ru Короче, обратите внимание, что без адекватных тарифов любые операции с валютой превращаются в сплошной геморрой. Добавлю по опыту — стоит сравнивать несколько вариантов, прежде чем отправлять.

  15. BrianBrimb BrianBrimb

    Текст посвящён распространённым мифам о зависимости и их развенчанию. Мы предоставим научно обоснованную информацию и дадим рекомендации по выбору эффективного способа борьбы с зависимым поведением.
    Ознакомьтесь с аналитикой – Вывод из запоя в Королеве

  16. I’ve got the horror stories to back that up. You see this amazing deal online — shiny Audi, unlimited miles, price that makes you want to book right now. Plus they put a $5000 hold on your card and say “don’t worry about it”. Nineteen years in South Florida and these tricks still surprise me. those people are pros at the bait-and-switch. Miami without proper wheels is basically a nightmare. Key Biscayne sunset, Bal Harbour shopping, or a spontaneous drive down to Homestead — AC must freeze your face off and unlimited miles or no deal. most are shiny garbage with fake five-star reviews. Finally found one outfit that actually delivers. Here’s the only honest source for premium rides across South Florida
    rent car luxury miami rent car luxury miami also bring quality shades unless you like driving into the sun. Anyway glad there’s at least one straight shooter left.

  17. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  18. Adolfozen Adolfozen

    после вашего обращения наш врач приезжает по указанному адресу с медработниками в гражданской форме и на машине без опознавательных символов, проводит осмотр, собирает историю болезни (анамнез).
    Исследовать вопрос подробнее – вывод из запоя в стационаре

  19. MichaelFlous MichaelFlous

    В этой статье мы обсудим процесс восстановления после зависимостей, акцентируя внимание на различных методах и подходах к реабилитации. Читатели узнают, как создать план выздоровления и использовать полезные ресурсы для достижения устойчивых изменений.
    Проверенные методы — узнай сейчас – нарколог на дом цены

  20. Alright, last one I swear — but someone’s gotta warn people about this Miami rental mess. You spot this killer offer online — brand new Porsche, zero excess, price that screams “book me”. Plus they freeze $5500 on your card and say “it’ll drop off in two weeks”. Fool me twenty times? That’s just called Tuesday in the 305. luxury car for rent. anyone who’s tried public transport here knows I’m not joking. South Beach dinner, Design District shopping, or a spontaneous Keys adventure — AC must be arctic and unlimited miles non-negotiable. most are shiny garbage with fake five-star reviews from God knows where. no games, no bait-and-switch, no hidden fees on page 8. prices change hourly so don’t wait around:
    exotic car rental miami beach fl exotic car rental miami beach fl also bring polarized shades unless you enjoy driving into the sun like a zombie. Anyway glad there’s at least one honest operator left in this town.

  21. I’ve paid my dues so you don’t have to. Then you actually go to pick up the car. Plus they freeze $5500 on your card and say “it’ll drop off in two weeks”. Twenty years in South Florida and these clowns still almost get me. luxury car rental miami florida. anyone who’s tried public transport here knows I’m not joking. South Beach dinner, Design District shopping, or a spontaneous Keys adventure — AC must be arctic and unlimited miles non-negotiable. most are shiny garbage with fake five-star reviews from God knows where. no games, no bait-and-switch, no hidden fees on page 8. Here’s the only straight shooter for premium rides across South Florida
    rent a luxury sedan rent a luxury sedan Yeah parking in South Beach will cost you a nice bottle of wine — but that’s the Miami tax. drive safe and absolutely skip that “windshield protection” upsell — pure profit for them, zero for you.

  22. GeraldSob GeraldSob

    Медицинская публикация представляет собой свод актуальных исследований, экспертных мнений и новейших достижений в сфере здравоохранения. Здесь вы найдете информацию о новых методах лечения, прорывных технологиях и их практическом применении. Мы стремимся сделать актуальные медицинские исследования доступными и понятными для широкой аудитории.
    Запросить дополнительные данные – наркологическая помощь на дому в москве

  23. AlfredoSougs AlfredoSougs

    Эта публикация обращает внимание на важность профилактики зависимостей. Мы обсудим, как осведомленность и образование могут помочь в предотвращении возникновения зависимости. Читатели смогут ознакомиться с полезными советами и ресурсами, которые способствуют здоровому образу жизни.
    Раскрыть тему полностью – наркологическая клиника в нижнем новгороде

  24. Albertked Albertked

    В этой статье мы рассматриваем разные способы борьбы с алкогольной зависимостью. Обсуждаются методы лечения, программы реабилитации и советы для поддержки близких. Читатели получат информацию о том, как преодолеть зависимость и добиться успешного выздоровления.
    Лучшее решение — прямо здесь – врач нарколог на дом круглосуточно

  25. RonaldIsode RonaldIsode

    Статья посвящена анализу текущих трендов в медицине и их влиянию на жизнь людей. Мы рассмотрим новые технологии, методы лечения и значение профилактики в обеспечении долголетия и здоровья.
    Выяснить больше – платная наркологическая клиника

  26. Swear I’ve seen every scam in the book by now. Then you roll up to the address. Different car sitting there — bald tires, dashboard lit up like a Christmas tree, and that “killer price”? Yeah doesn’t include the non-negotiable $45 daily insurance or the $500 deposit they forget to mention. Nine years in South Florida and these clowns still nearly fool me. luxury car rental miami florida. anyone who’s tried the trolley system knows what I’m talking about. Coconut Grove dinner, Sunny Isles sunrise, or a spontaneous drive down to Homestead — AC must freeze your teeth and unlimited miles or no deal. most are polished turds with fake five-star reviews. Finally found one company that doesn’t play stupid games. rates change daily so check before the holiday crowd hits:
    luxury cars to rent near me https://luxury-car-rental-miami-9.com Yeah parking in Wynwood will cost you a nice dinner — but that’s the price of being in Miami. drive safe and definitely skip that “emergency roadside” upsell — complete waste of money.

  27. Anthonypal Anthonypal

    В этой публикации мы исследуем ключевые аспекты здоровья, включая влияние образа жизни на благополучие. Читатели узнают о важности правильного питания, физической активности и психического здоровья. Мы предоставим практические советы и рекомендации для поддержания здоровья и развития профилактических подходов.
    Узнать напрямую – капельницы от похмелья в Курске

  28. Philipdaync Philipdaync

    В этом обзоре представлены различные методы избавления от зависимости, включая терапевтические и психологические подходы. Мы сравниваем их эффективность и предоставляем рекомендации для тех, кто хочет вернуться к трезвой жизни. Читатели смогут найти информацию о реабилитационных центрах и поддерживающих группах.
    Узнать напрямую – наркологический центр в нижнем новгороде

Deixe um comentário

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