Virtualization is a technique that allows a \"guest\" operating system to run as
ID: 3799377 • Letter: V
Question
Virtualization is a technique that allows a "guest" operating system to run as a normal, non-privileged user-level application on top of a different "host "operating system. Whenever the guest operating system runs, the host operating system must maintain the illusion to the guest that it is actually running on the bare hardware by creating the correct responses. How could the host operating system and virtualization software accomplish this, and how could this be related to interrupts, exceptions, and system calls? While interrupts, exceptions, and system calls are all handled in a similar way, there are important differences. What are those differences and why does the operating system need to be careful to treat them differently? Discuss the differences in overhead between system calls and simple function callsExplanation / Answer
Important difference between exception,interupts and system calls is :-
. Exception are normally general thing. We can't categorized it into something. Mostly can be considered as runtime error.
For example :-your procedure takes two numbers as input and divide the first number by the second. Somebody calls your procedure with 0 as the second number.
So,their possibilities are endless,in order to handle these these exceptions , one could specify code that would get called each time a certain exception occurs
.Interrupts:-They can be known as exceptions for the CPU (hardware) . The CPU under normal conditions, fetches and executes code sequentially . In any case, the flow of execution is well ordered,but when this order is violated,the we can say CPU is interrupted.
Ex:-A DMA device/sensor device is ready and wants to grab the attention of the CPU.
.System call :-this is really a kind of interrupt.In fact it is a deliberate interrupt triggered by a user-space process just to tell the kernel to do something on behalf of it.Any mechanism that allows the kernel to understand unambiguously that
a) it's a request from user space to get something done,
b) what it is that user space wants, would work perfectly.
And the reason why the operating needs to be careful while treating them carefully because even though they are very similar but some minutes imporatant difference are there which are need to be taken care of while handling them is required.Like for an system call, a particular sub routine is called but it may/may not need the current state of the CPU to be stored somewhere.Whereas,in interupts and exceptions the state of the CPU are need to be stored and restored are serving the subroutine.But,within the exception and interupts handling there is also a difference i.e interupts are mostly synchronous so that they can be said can be occured at particular intervals or time ; but whereas exceptions are asynchronous so it needs to look over the run-time state of the CPU also.
Difference function call and system calls :-
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.