Preview

6CHAPTERProcessSynchronizationPractice Exercises61In Section 64 We Mentioned

Good Essays
Open Document
Open Document
948 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
6CHAPTERProcessSynchronizationPractice Exercises61In Section 64 We Mentioned
6

CHAPTER

Process
Synchronization
Practice Exercises
6.1

In Section 6.4, we mentioned that disabling interrupts frequently can affect the system’s clock. Explain why this can occur and how such effects can be minimized.
Answer:
The system clock is updated at every clock interrupt. If interrupts were disabled —particularly for a long period of time —it is possible the system clock could easily lose the correct time. The system clock is also used for scheduling purposes. For example, the time quantum for a process is expressed as a number of clock ticks. At every clock interrupt, the scheduler determines if the time quantum for the currently running process has expired. If clock interrupts were disabled, the scheduler could not accurately assign time quantums. This effect can be minimized by disabling clock interrupts for only very short periods.

6.2

The Cigarette-Smokers Problem. Consider a system with three smoker processes and one agent process. Each smoker continuously rolls a cigarette and then smokes it. But to roll and smoke a cigarette, the smoker needs three ingredients: tobacco, paper, and matches. One of the smoker processes has paper, another has tobacco, and the third has matches. The agent has an infinite supply of all three materials. The agent places two of the ingredients on the table. The smoker who has the remaining ingredient then makes and smokes a cigarette, signaling the agent on completion. The agent then puts out another two of the three ingredients, and the cycle repeats. Write a program to synchronize the agent and the smokers using Java synchronization.
Answer:
Please refer to the supporting Web site for source code solution. 6.3

Explain why Solaris, Windows XP, and Linux implement multiple locking mechanisms. Describe the circumstances under which they use spinlocks, mutexes, semaphores, adaptive mutexes, and condition variables.
In each case, explain why the mechanism is needed.
Answer: These operating systems provide different

You May Also Find These Documents Helpful

  • Satisfactory Essays

    1. During the install, the option to sync with a NTP (Network Time Protocol) server was checked. From a security perspective, why is it important for a system to keep accurate time?…

    • 368 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Lab 1

    • 822 Words
    • 4 Pages

    1. During the install, the option to sync with NTP (Network Time Protocol) server was checked. From a security perspective, why is it important for a system to keep accurate time?…

    • 822 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Nt1310 Unit 3 Os

    • 1341 Words
    • 6 Pages

    +• Synchronization: With multiple active processes having potential access to shared address spaces or shared I/O resources, care must be taken to provide effective synchronization. Synchronization is a facility that enforces mutual exclusion and event…

    • 1341 Words
    • 6 Pages
    Good Essays
  • Good Essays

    It is made from the leaves of tobacco plants by curing them. The main substances in tobacco are nicotine, tar, and carbon monoxide. There are many ways to use tobacco. You can smoke it or chew it. It can be found in cigarettes, cigars, pipes, e-cigarettes, vapes, or chewing tobacco. The types of chewing tobacco are snuff, dip and snus. Using tobacco can damage your lungs if you smoke it too much. Your lungs will regenerate unless you have emphysema, which will eventually kill you. Tobacco is the leading cause of preventable death in the United States.…

    • 497 Words
    • 2 Pages
    Good Essays
  • Good Essays

    She understood that it would not be easy. Merdine’s first step was to change her brand of cigarettes. She switched to “low-tar” brand, she immediately started smoking twice as many cigarettes as before. She kept coughing and wheezing, then she bought a plastic Magic Filter, she inhaled deeply, she swallowed the filter. She tried nicotine gum, she had taken snuff. She continued to smoke like a chimney.…

    • 401 Words
    • 2 Pages
    Good Essays
  • Better Essays

    Cigarette companies have recently introduced a new product often referred to as “electronic cigarettes.” Though in its early stages and only claiming a small percent of the market in comparison to combustible cigarettes, this new product has certainly caught the attention of the market “overnight.” So what is it about these new cigarettes that have caused them to become so popular? Electronic cigarettes are very similar to personal vaporizers. Though they do not contain tobacco, they do contain the nicotine found in tobacco plants. When inhaled, a heating element atomizes a liquid solution causing an aerosol “vapor” to be emitted from the end resembling smoke. Thicker smoke emitting versions have become more popular, as it seems that feature is the most attractive and appealing feature of the e-cig.…

    • 1194 Words
    • 5 Pages
    Better Essays
  • Good Essays

    The Electronic cigarette consists of a nicotine cartridge containing liquid nicotine. When a user inhales, a tiny battery powered atomizer turns a small amount of liquid nicotine into vapour. Inhaling nicotine vapour gives the user a nicotine hit in seconds rather than minutes with patches or gum. When the user inhales, a small LED light at the tip of the electronic cigarette glows orange to simulate a real cigarette.…

    • 461 Words
    • 2 Pages
    Good Essays
  • Better Essays

    The electronic cigarette was created with the purpose and intent to replace a traditional tobacco cigarette by its shape, flavor, and the vapor it produces. When the electronic cigarette was created, it was meant to have the same capacity, and feel as a traditional tobacco cigarette. Tobacco smokers don’t just smoke for the nicotine, but for the habit, and the taste as well. The electronic cigarette was created to match all the same aspects that a smoker has grown accustomed too. Traditional tobacco cigarettes contain over four thousand chemicals, most of which are unknown to its users. These chemicals are also not listed on the boxes, or anywhere in the warning labels. “Electronic cigarettes come in a variety of shapes and models, but most consist of a battery, a heating element, and a liquid that contains nicotine, propylene glycol and flavorings. The heating element warms and aerosolizes the liquid, turning it into a vapor the user inhales. Smoking an e-cigarette (called "vaping"), gives users a nicotine hit without…

    • 1501 Words
    • 7 Pages
    Better Essays
  • Satisfactory Essays

    20 Facts About Tabacco

    • 590 Words
    • 3 Pages

    10) At least 19 different types of cancer-causing substances, called nitrosamines, are found in tobacco products.…

    • 590 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Cigarettes are extremely harmful to the human body. Studies show that there are over one hundred thousand chemicals in a single cigarette and only four thousand chemical substances are known. So that’s a total of ninety-six thousand unknown chemical substances that are in a single cigarette.…

    • 796 Words
    • 4 Pages
    Good Essays
  • Better Essays

    The first reason why this article would captivate American audiences because , Americans think they know all they can know about cigarettes when they don't the half of them . Like the filters on cigarettes don't actually work .Many americans today probably think that the white filters on cigarettes actually work , by reduced some of the smoke inhalation you receive or some think it cleans the smoke somewhat . When in actuality all they do it reduce the particle size of soot , making it easier for soot more to get in your lung and go even deeper into your respiratory cavity . What is soot exactly ? Soot is a black powdery or flaky substance consisting of largely of amorphous carbon , produced by the incomplete burning of organic…

    • 1134 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    Mapping an Argument

    • 761 Words
    • 3 Pages

    In this article about bullying the issue that is addressed about is bullying. This article talks in detail about cyber bullying. It states how cyber bullying occurs such as through social networking sites. It speaks about suicide and about two students who committed suicide because of cyber bullying. This article gives the definition of cyber bullying. The whole issue in this article is all about cyber bullying.…

    • 761 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    When a consumer takes a drag from the assembled electronic cigarette, the flow sensor powers the battery on and vaporizes the nicotine in the cartridge, producing a satisfying puff of vapor. The “smoke” coming out of the consumer’s mouth is not actually smoke but rather a completely harmless…

    • 365 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Tobacco was the first crop grown for money in North America. In 1964 the Surgeon General of the U.S. wrote a report about the dangers of cigarette smoking. He said that the nicotine and tar in cigarettes cause lung cancer. Due to his report by the 1980’s they developed new cigarettes with lower amounts of nicotine and better filters (History & Economics of Tobacco).The Centers for Disease Control and Prevention (CDC) launched the first ever paid national tobacco campaign. In March of 2012 they began to use real people instead of actors (Centers of Disease Control and Prevention). The illustration of loading a revolver with cigarettes is a strong visual way to get people’s attention on the harms of smoking. Also, the facts listed are making…

    • 523 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Criminalizing Tobacco

    • 829 Words
    • 4 Pages

    Cigarettes are made up of dried tobacco leaves and other things to make up for the flavor. Scientists have found up to 3,000 compounds in tobacco and cigarette smoke. With the total 3,000 compounds, there are about sixty carcinogens. There are a numerous amount of bad chemicals found in cigarettes. Here are just a list of few: Ammonia: Household cleaner, Agelica root extract: Known to cause cancer in animals Arsenic: Used in rat poisons Benzene: Used in making dyes, synthetic rubber Butane: Gas; used in lighter fluid Carbon monoxide: Poisonous gas Cadmium: Used in batteries Cyanide: Deadly poison DDT: A banned insecticide Ethyl Furoate: Causes liver damage in animals Lead: Poisonous in high doses Formaldehiyde: Used to preserve dead specimens Methoprene: Insecticide Megastigmatrienone: Chemical naturally found in grapefruit juice Maltitol: Sweetener for diabetics Napthalene: Ingredient in mothballs Methyl isocyanate: Its accidental release killed 2000 people in Bhopal, India in 1984 Polonium: Cancer-causing radioactive element. All of these chemicals have taken a toll on current smokers, ex-smokers, and people exposed to second hand smoke.…

    • 829 Words
    • 4 Pages
    Good Essays

Related Topics