Question

In: Computer Science

When an interrupt occurs while operating in User mode, present the rWhen an interrupt occurs while...

When an interrupt occurs while operating in User mode, present the rWhen an interrupt occurs while operating in User mode,

present the return instruction of the exception handler and describe the reason for such a 3 stage pipeline structure

Solutions

Expert Solution

In three stage pipeline structure , there are three main cycle performed :

Fetch – In this process instruction is fetched from memory and placed in the instruction pipeline

Decode – At this level, instruction is decoded and the datapath control signals prepared for the next cycle

Execute – At this final stage register bank is read, an operand shifted, the ALU generated result is written back into destination register.

Now with this process there are lots of interrupt mainly because of following reasons:

1. Due to misaligned memory access, protection violation and page fault

2. Illegal opcode

3. Arithmetic overflow is also considered as cause of interrupts

To overcome the interrupts we required a precise interrupt, which undo all instructions once interrupting instruction occurs and restart the process from the faulting instruction. if not then the interrupt becomes imprecise.

Example:

Let there be two instructions name first instruct and second instruct. If second instruct interrupts first? If the second instruct is restarted first, and then the first instruct is restarted, then second instruct is executed twice.

So to solve this we will let hardware post a interrupt for each instruction and when we reach W stage it will check the interrupt flags and then follow the instruction order as per the flags.


Related Solutions

When is an external interrupt recognized by the CPU?  When more than one interrupt occurs, what approaches...
When is an external interrupt recognized by the CPU?  When more than one interrupt occurs, what approaches would you use to service them? What approaches should be taken when an interrupt occurs within an interrupt service routine Consider a hypothetical microprocessor having 64-bit instructions composed of two fields: the first 16-bits contains the op-code and the remainder the immediate operand or an operand address.  Assume memory is organized in 32-bit words, i.e. one r/w access can yield a maximum of 32 bits.  ...
How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control...
How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control branch to?
A) What happens when a software Interrupt occurs? Write steps briefly?                              &nbsp
A) What happens when a software Interrupt occurs? Write steps briefly?                                                    B)  Differentiate between maskable and non-maskable interrupts? C) How are the multiplexed bus of 8086 demultiplexed? D) Find the address range when a 2K x 8 memory is interfaced with 8086/8088?
Outline the process that occurs when a hardware interrupt is generated by a disk controller. Set...
Outline the process that occurs when a hardware interrupt is generated by a disk controller. Set the context for the interrupt disk read and describe how an interrupt handler would address the event.
A) What happens when a software Interrupt occurs? Write steps briefly?    B) Differentiate between maskable...
A) What happens when a software Interrupt occurs? Write steps briefly?    B) Differentiate between maskable and non-maskable interrupts? C) How are the multiplexed bus of 8086 demultiplexed? D) Find the address range when a 2K x 8 memory is interfaced with 8086/8088?
    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?
In statistics, the mode of a set of values is the value that occurs most often...
In statistics, the mode of a set of values is the value that occurs most often or with the greatest frequency. Write a function that accepts as arguments the following: An array of integers An integer that indicates the number of elements in the array The function should determine the mode of the array. That is, it should determine which value in the array occurs most often. The mode is the value the function should return. If the array has...
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.        ...
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 ... _______ _______ _______ _______ _______ _______
Referring 8051 User’s Manual ,study how to use timer when operating in mode 2. Understand the...
Referring 8051 User’s Manual ,study how to use timer when operating in mode 2. Understand the manual (p. 112~)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT