Question

In: Computer Science

does the exception handler run in kernel mode?

does the exception handler run in kernel mode?

Solutions

Expert Solution

Yes, the exception handler run in kernel mode.

There is a way to get into kernel mode from user mode and that is when an exception occurs on the cpu.

If the running program performs some illegal operation eg:a divide by zero, then the cpu issues an exception. Again the cpu switches to kernel mode and is diverted to some location unknown to the program where the machine code exists to deal with the exception.

The exception handler's job is to decide if the problem is recoverable or not. If the problem cannot be recovered, the program is terminated without the cpu ever returning back to the program.

If the exception can be recovered, the handler takes the steps required to do this and returns the cpu back to the culprit instruction, so that it can be percormed again.

In this situation, the program will have no idea that anything went wrong.


Related Solutions

    2.1) What is the kernel mode?     2.2) What is the user mode?     2.3)...
    2.1) What is the kernel mode?     2.2) What is the user mode?     2.3) Which mode has more different instructions?     2.4) Why do we need these two modes in designing an operating system?
Starting out with Python Files and Exceptions - Random Number Writer, Reader, and Exception Handler In...
Starting out with Python Files and Exceptions - Random Number Writer, Reader, and Exception Handler In this assignment, you will be writing a series of random numbers to a file, reading the file, and handling exceptions. Begin by writing a program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 100. The application should let the user specify how many random numbers the file will hold. Next, write...
How does try/catch(exception) processing help resolve run time exceptions? What is a custom exception? What are...
How does try/catch(exception) processing help resolve run time exceptions? What is a custom exception? What are it's benefits? What does it mean when we raise a custom exception?
I need to create an exception handler with the following code I have below public class...
I need to create an exception handler with the following code I have below public class Time { /** * Properties Declared; */ private int hours; private int minutes; private int seconds; /* * Default Constructor */ public Time() { hours = 0; minutes = 0; seconds = 0; } /** * Parameterized Contructor throws BadTimeException in any case that * there should be an error * @param h * @param m * @param s */ public Time(int h, int...
What does it mean to throw an Exception?
What does it mean to throw an Exception? Give two examples of when it might be appropriate to throw an Exception.
Write a jQuery click event handler for all tags within elements. In the handler, output the...
Write a jQuery click event handler for all tags within elements. In the handler, output the src attribute of the image to the console.
II. Application 1 and 2 run concurrently. Whenever a timeout interrupt occurs, the kernel switches control...
II. Application 1 and 2 run concurrently. Whenever a timeout interrupt occurs, the kernel switches control between the applications. Show the order of instruction execution, assuming application 1 is currently running. (42 pts) Application 1 Application 2 ... instruction i (timeout interrupt) instruction i+1 ... instruction k (timeout interrupt) instruction k+1 ... instruction 0 ... instruction j (timeout interrupt) instruction j+1 ... _______ _______ _______ _______ _______ _______
when i run the program on eclipse it gives me this error: Exception in thread "main"...
when i run the program on eclipse it gives me this error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0    at SIM.main(SIM.java:12) how do I fix that ? (please fix it ) import java.util.*; import java.util.Scanner; import java.util.ArrayList; import java.io.File; import java.io.FileNotFoundException; import java.lang.Math; public class SIM{    public static void main(String[] args) throws FileNotFoundException {       int cacheSize = Integer.parseInt( args[1] ); int assoc = Integer.parseInt( args[2] ); int replacement = Integer.parseInt(...
The stepper motor controller will run in full step mode. That means the clockwise sequence will...
The stepper motor controller will run in full step mode. That means the clockwise sequence will be Winding1 Winding2 Winding3 Winding4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Repeat the pattern The counterclockwise sequence will be Winding1 Winding2 Winding3 Winding4 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 Repeat the pattern Design a stepper motor controller for half step mode in VHDL using...
What does it mean when one says that the production of cDNA is an exception to...
What does it mean when one says that the production of cDNA is an exception to the central dogma of molecular biology?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT