Question

In: Computer Science

Using a vending machine requires instructions from the person buying an item and the machine dispensing...

Using a vending machine requires instructions from the person buying an item and the machine dispensing the item. Using terms and concepts learned this week, discuss the following activities.

What actions by either the person buying an item or the vending machine would you describe as a privilege or non-privileged instructions? Why?

Relate memory management concepts (virtual, real) to the operation of the vending machine. Relate processes and threads to the operation of the vending machine.

Directly address each question in your post. Your initial (first) post must be at least 150 - 200 words long.

Solutions

Expert Solution

In the operating system, there are two modes and these are used to separate the user mode from system mode to ensure protection and security of the system from unauthorized users. Any attempt to execute privilege instruction in user mode is not executed and treated as illegal privilege instructions. it is the responsibility of the system to ensure that the timer is set to interrupt
direct memory access is useful when a peripheral device and main memory need to transfer data between them and CPU instruction is not required .vending machine requires various instructions from buying an item and machine dispensing the item so various terms and concepts related to these instructions are described here.
setting the value of the timer is a privileged function and the timer is used for controlling the schedules if the user program runs until the timer goes off. If the user could set the value of the timer then it could have hogged the CPU.
Reading the clock is not a privileged instruction as reading the clock doesn't interfere with the kernel or other user programs.
Clearing the memory is a privileged instruction, and then checks that the process of wanting to clear memory can control the piece of memory.
Turning off the interrupt is a privilege condition as the OS should be in charge of setting the flow of control between kernel and user processes.
Switching from user to monitor mode is a privilege condition in which a user program can switch to a monitor mode where they could do whatever they want and it yields control to the kernel by making a system call.

A secure operating system that is running on architecture such that of a vending machine does not supply a privileged mode might operate by providing a virtual machine interface to a user program so that it checks each in instructions while it is running the OS must check each instruction and does one of the three things run it as is , run it with some modification or reject it.
Privileges instructions are used to prevent the user from running machine instruction they should not run


Related Solutions

1-You want to dispense an item from the vending machine. An item in the machine can...
1-You want to dispense an item from the vending machine. An item in the machine can cost between 25 cents and a dollar, in 5 cent increments (25,30,35,,40,45......,90,95,100) and the machine accepts only a single dollar bill to pay for the item. Write a java class called ChangeMaker that will determine the change to be dispensed from a vending machine. Use the following UML diagram. ChangeMaker        Attributes    private double money    private int numberOfQuarters    private int...
Write a program that determines the change to be dispensed from a vending machine. An item...
Write a program that determines the change to be dispensed from a vending machine. An item in the machine can cost between 25 cents and 1 dollar, in 5-cents increments (25, 30, 35, . . . 90, 95, or 100), and the machine accepts only a single dollar bill to pay for the item. (Explain with algorithms if you can please!)
Silver Sun Packaging is evaluating the vending machine project, a 2-year project that would involve buying...
Silver Sun Packaging is evaluating the vending machine project, a 2-year project that would involve buying equipment for 24,000 dollars that would be depreciated to zero over 2 years using straight-line depreciation. Cash flows from capital spending would be $0 in year 1 and 13,000 dollars in year 2. Relevant annual revenues are expected to be 61,000 dollars in year 1 and 61,000 dollars in year 2. Relevant expected annual variable costs from the project are expected to be 11,000...
Construct a finite-state machine, using combinational logic for an apple vending machine that only accepts nickels...
Construct a finite-state machine, using combinational logic for an apple vending machine that only accepts nickels (5 cents). When 15 cents is deposited the user can push a button to receive an apple and the machine resets. If the user inserts more than 15 cents no money will be returned. What are the machine states? What are the inputs? What are the outputs? Draw state table Draw state diagram Write the combinational logic for next state and output Explain if...
2. Significance tests Buying an item sight unseen on the Internet requires a significant amount of...
2. Significance tests Buying an item sight unseen on the Internet requires a significant amount of trust in the seller. Consider this hypothesis: Potential buyers tend to scrutinize the offers posted by sellers with poor reputations more than they do the offers posted by sellers with neutral or good reputations. As a result, if buyers notice a surcharge (such as a shipping fee) levied by a seller with a poor reputation, they reduce the (presurcharge) price they are willing to...
When the price of a soda from the campus vending machine was $0.50 per can, 100...
When the price of a soda from the campus vending machine was $0.50 per can, 100 cans were sold each day. After the price increased to $0.60 per can, sales dropped to 80 cans per day. Over this range, the absolute price elasticity of demand for soft drinks was approximately equal to A. 1.00 B. 2.00 C. 1.47 D. 1.22 1 points    QUESTION 9 Luna is a manufacturer of fashion jewelry. The CEO of Luna makes sure that the...
Instructions Vaccine-Preventable Diseases Influenza is a virus that can be easily spread from person to person...
Instructions Vaccine-Preventable Diseases Influenza is a virus that can be easily spread from person to person and kills thousands of people each year. Healthcare workers are at risk of exposing themselves to infectious diseases from patients and material and therefore can also potentially transmit these diseases to others. Preventing and controlling the spread of vaccine preventable diseases in the health care setting is vital to ensure proper infection control practices should an outbreak occur. As such, the Centers for Disease...
A person decides to get a loan from the bank (today) to finance buying a piece...
A person decides to get a loan from the bank (today) to finance buying a piece of land. The borrowed amount is equal to $140,000. The arrangements with the bank state that the loan will be paid off in 96 equal monthly payments, based on an annual market/combined rate of 12% compounded monthly. a) Calculate the monthly payment considering the given market/combined rate. (10 points) b) If the monthly inflation rate is estimated to be 0.5%, calculate the value of...
A person decides to get a loan from the bank (today) to finance buying a piece...
A person decides to get a loan from the bank (today) to finance buying a piece of land. The borrowed amount is equal to $140,000. The arrangements with the bank state that the loan will be paid off in 96 equal monthly payments, based on an annual market/combined rate of 12% compounded monthly. a) Calculate the monthly payment considering the given market/combined rate. (10 points) b) If the monthly inflation rate is estimated to be 0.5%, calculate the value of...
This problem requires you to use a heap to store items, but instead of using a key of an item to determine where to store the item in the heap
This problem requires you to use a heap to store items, but instead of using a key of an item to determine where to store the item in the heap, you need to assign a priority (key) to each item that will determine where it is inserted in the heap 7a) Show how to assign priorities to items to implement a first-in, first-out queue with a heap. 7b) Show how to assign priorities to items to implement a first-in, last-out stack with...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT