In: Computer Science
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.
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