SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 1 Day Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 12 Oct 2017 My Price 8.00

When a user process is interrupted or causes a processor exception,

Question:

1. When a user process is interrupted or causes a processor exception, the

x86 hardware switches the stack pointer to a kernel stack, before saving

the current process state. Explain why.

3. For each of the three mechanisms that supports dual-mode operation—

privileged instructions, memory protection, and timer interrupts—explain

what might go wrong without that mechanism, assuming the system

still had the other two.

5. Define three types of user-mode to kernel-mode transfers.

7. Most hardware architectures provide an instruction to return from an

interrupt, such as iret. This instruction switches the mode of operation

from kernel-mode to user-mode.

a) Explain where in the operating system this instruction would be

used.

b) Explain what happens if an application program executes this instruction.

9. With virtual machines, the host kernel runs in privileged mode to create

a virtual machine that runs in user mode. The virtual machine provides

the illusion that the guest kernel runs on its own machine in privileged

mode, even though it is actually running in user mode.

Early versions of the x86 architecture (pre-2006) were not completely

virtualizable—these systems could not guarantee to run unmodified

guest operating systems properly. One problem was the popf "pop flags"

instruction that restores the processor status word. When popf was run

in privileged mode, it changed both the ALU flags (e.g., the condition

codes) and the systems flags (e.g., the interrupt mask). When popf was

run in unprivileged mode, it changed just the ALU flags.

a) Why do instructions like popf prevent transparent virtualization of

the (old) x86 architecture?

b) How would you change the (old) x86 hardware to fix this problem?

11. We described how the operating system kernel mediates access to I/O

devices for safety. Some newer I/O devices are virtualizable—they permit

safe access from user-level programs, such as a guest operating

system running in a virtual machine. Explain how you might design

the hardware and software to get this to work. (Hint: The device needs

much of the same hardware support as the operating system kernel.)

13. Suppose you have to implement an operating system on hardware that

supports interrupts and exceptions but does not have a trap instruction.

Can you devise a satisfactory substitute for traps using interrupts and/or

exceptions? If so, explain how. If not, explain why.

15. Explain the steps that an operating system goes through when the CPU

receives an interrupt.

17. Can you write program to verify that the operating system on your computer

correctly protects itself from rogue system calls. For a single system

call—such as file system open—try all possible illegal calls: e.g., an

invalid system call number, an invalid stack pointer, an invalid pointer

stored on the stack, etc. What happens?

Answers

(5)
Status NEW Posted 12 Oct 2017 12:10 PM My Price 8.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)