Question

In: Computer Science

    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?

Solutions

Expert Solution

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

In Kernel mode, the executing code has complete and unrestricted access to the underlying hardware. It can execute any CPU instruction and reference any memory address. Kernel mode is generally reserved for the lowest-level, most trusted functions of the operating system. Crashes in kernel mode are catastrophic; they will halt the entire PC.

In User mode, the executing code has no ability to directly access hardware or reference memory. Code running in user mode must delegate to system APIs to access hardware or memory. Due to the protection afforded by this sort of isolation, crashes in user mode are always recoverable. Most of the code running on your computer will execute in user mode.

These two modes aren't mere labels; they're enforced by the CPU hardware. If code executing in User mode attempts to do something outside its purview-- like, say, accessing a privileged CPU instruction or modifying memory that it has no access to -- a trappable exception is thrown. Instead of your entire system crashing, only that particular application crashes. That's the value of User mode.

x86 CPU hardware actually provides four protection rings: 0, 1, 2, and 3. Only rings 0 (Kernel) and 3 (User) are typically used.

If we're only using two isolation rings, it's a bit unclear where device drivers should go-- the code that allows us to use our video cards, keyboards, mice, printers, and so forth. Do these drivers run in Kernel mode, for maximum performance, or do they run in User mode, for maximum stability? In Windows, at least, the answer is it depends. Device drivers can run in either user or kernel mode. Most drivers are shunted to the User side of the fence these days, with the notable exception of video card drivers, which need bare-knuckle Kernel mode performance. But even that is changing; in Windows Vista, video drivers are segmented into User and Kernel sections. Perhaps that's why gamers complain that Vista performs about 10 percent slower in games.

Kindly revert for any queries

Thanks.


Related Solutions

For PACMAN game specification 2.1   Product Perspective 2.2   Product Functions 2.3   User Classes and Characteristics 2.4  ...
For PACMAN game specification 2.1   Product Perspective 2.2   Product Functions 2.3   User Classes and Characteristics 2.4   Operating Environment 2.5   Design and Implementation Constraints 2.6   Assumptions and Dependencies
This assignment covers the material in: 2.1 Simple Interest 2.2 Compound Interest 2.3 Annuities 2.4 Amortization...
This assignment covers the material in: 2.1 Simple Interest 2.2 Compound Interest 2.3 Annuities 2.4 Amortization 33A. Just before his first attempt at bungee jumping, John decides to buy a life insurance policy. His annual income at age 30 is $35,000, so he figures he should get enough insurance to provide his wife and new baby with that amount each year for the next 35 years. If the long-term interest rate is 6.6%, what is the present value of John's...
2.1 What is the difference between a performance measure and a utility function? 2.3 Choose a...
2.1 What is the difference between a performance measure and a utility function? 2.3 Choose a domain that you are familiar with, and write a PAGE description of an agent for the environment. Characterize the environment as being accessible, deterministic, episodic, static, and continuous or not. What agent architecture is best for this domain? 2.4 While driving, which is the best policy? a. Always put your directional blinker on before turning, b. Never use your blinker, c. Look in your...
1. Why there needs to be user thread and kernel thread? 2. What are the advantages...
1. Why there needs to be user thread and kernel thread? 2. What are the advantages and disadvantages of writing an operating system in a highlevel language, such as C? 3. What is a critical section problem? Demonstrate that with an example. 4. With an example, show how critical section can led to dead locks. 5. Write two differences between a network OS and a distributed OS. 6. Identify the following environments as hard, firm or soft real time. Give...
QUESTION 2. 2.1 What is the difference between a natural person and a legal person 2.2...
QUESTION 2. 2.1 What is the difference between a natural person and a legal person 2.2 briefly explain what you understand by the docttrine of stare decsis
What runs in user mode             A.        Email reader             B.      
What runs in user mode             A.        Email reader             B.        Web browser             C.        User Interface Program             D.        Music Player             E.            Operating system             F.         Device drivers Choose one the following             a.         a and e             b.         a b,c,d             c.         a,f             d.         e,d             e.         f,b 2)         Choose which are parameters of a process table entry             A.        Process ID             B.            Program Counter             C.        Stack Pointer             D.        User ID             E.        ...
ECN 100B 2 Short answers 2.1 What is backward induction? 2.2 What are the three ways...
ECN 100B 2 Short answers 2.1 What is backward induction? 2.2 What are the three ways in which markets can differ? 2.3 What are the three models of oligopoly we discussed in class? Please summarize each model. 2.4 Assume two identical firms with M C= 5 are competing following a Bertrand Oligopoly model. Inverse market demandisp= 720−96Q. What is the Nash-Bertrand Equilibrium? 2.5 In what two ways is a Nash-Bertrand equilibrium without differentiated products inconsistent with real oligopoly markets? 2.6...
Group 1: 4.2, 4.2, 3.4 Group 2: 4.5, 2.1, 2.3 Group 3: 1.2, 0.3, -0.3, 2.3...
Group 1: 4.2, 4.2, 3.4 Group 2: 4.5, 2.1, 2.3 Group 3: 1.2, 0.3, -0.3, 2.3 Use the Bonferronni method to test each of the 3 possible hypotheses at the 3% significance level. (a) Find the value of the test statistic for each of the 3 possible hypotheses. (b) Which pairs of means are significantly different (using the Bonferronni method at the 3% significance level?
Consider the following data : 1.5, 1.5, 1.7, 1.7, 2.1, 2.3 a) If you were to...
Consider the following data : 1.5, 1.5, 1.7, 1.7, 2.1, 2.3 a) If you were to construct a normal probability plot by hand for the above data, what are the numerical values (in order) of the first five numbers that would go on the x-axis? Separate your answers with a comma b) If you were to construct a normal probability plot by hand for the above data, what are the numerical values (in order) of the first five numbers that...
Suppose the real risk-free rate is 2.3%, the average future inflation rate is 2.1%, and a...
Suppose the real risk-free rate is 2.3%, the average future inflation rate is 2.1%, and a maturity premium of 0.05% per year to maturity applies, i.e., MRP = 0.05%(t), where t is the years to maturity. What rate of return would you expect on a 5-year Treasury security, assuming the pure expectations theory is NOT valid? Group of answer choices 4.65% 4.30% 5.35% 5.00% 5.70% Your portfolio consists of $31,232 invested in a stock that has a beta = 1.9,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT