Question

In: Computer Science

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?

Solutions

Expert Solution

Ans:​​​​​​​1)

  • An interrupt is a signal sent to the processor that interrupts the current process. It may be generated by a hardware device or a software program.An interrupt is a signal to the kernel (i.e., the core of the operating system) that an event has occurred, and this results in changes in the sequence of instructions that is executed by the CPU (central processing unit).
  • A software interrupt, also called an exception, is an interrupt that is caused by software, usually by a program in user mode.

​​​​​​​When an interrupt occurs, it causes the CPU to stop executing the current program. The control then passes to a special piece of code called an Interrupt Handler or Interrupt Service Routine. The interrupt handler will process the interrupt and resume the interrupted program.

A context switch is the process of storing and restoring state (the context) of a CPU, so that execution can be resumed from the same point at a later time. When an interrupt is generated, the processor saves its execution state via a context switch, and begins executing the interrupt handler at the interrupt vector.

Steps involved in Software interrupts are:

  1. Software Interrupt is invoked by the use of INT instruction.
  2. This event immediately stops execution of the program and passes execution over to the INT handler.
  3. The INT handler is usually a part of the operating system and determines the action to be taken.
  4. It occurs when an application program terminates or requests certain services from the operating system.

For example, output to the screen, execute file etc.

Ans:2)

  • An Interrupt that can be disabled or ignored by the instructions of CPU are called as Maskable Interrupt.The interrupts are either edge-triggered or level-triggered or level-triggered.

An interrupt that cannot be disabled or ignored by the instructions of CPU are called as Non-Maskable Interrupt.A Non-maskable interrupt is often used when response time is critical or when an interrupt should never be disable during normal system operation.​​​​​​​

MASKABLE INTERRUPT
Maskable interrupt is a hardware Interrupt that can be disabled or ignored by the instructions of CPU. A non-maskable interrupt is a hardware interrupt that cannot be disabled or ignored by the instructions of CPU.
When maskable interrupt occur, it can be handled after executing the current instruction. When non-maskable interrupts occur, the current instructions and status are stored in stack for the CPU to handle the interrupt.
Maskable interrupts used to interface with peripheral device. Non maskable interrupt used for emergency purpose e.g power failure, smoke detector etc .
It may be vectored or non-vectored.
All are vectored interrupts.
Maskable interrupts help to handle lower priority tasks. Non-maskable interrupt help to handle higher priority tasks such as watchdog timer.
Ex: RST6.5, RST7.5, and RST5.5 of 8085 are some common examples of maskable Interrupts. Ex:Trap of 8085 microprocessor is an example for non-maskable interrupt.
Operation can be masked or made pending. Operation Cannot be masked or made pending.

Ans:3)

Basically , Demultiplexing is breaking of multiplexed signal .Recall that A/D0 -A/D15 and A16/S3-A19/S6 are the multiplexed signals in 8086.To do so, three demultiplexing latches are used .ALE (Address Enable Latch) is used for strobe Demultiplexing.8086 is 16bit data lines and 20 bit address line microprocessor.BY the Demultiplexing ,we Get A0-A19 separate Address lines and D0-D15 Data lines .

The 8086 had more signals on its interface than it had pins. Thus some pins did double duty. For example, the low 16 bits of the address bus were multiplexed with the 16 data signals, and the four high bits of address were multiplexed with four status signals. So to actually interface to 8086 to memory or I/O devices, you needed some latches and bus drivers to deal with one or the other mode of operation as needed.

Ans: 4)

An address line(range) basically means to a physical connection between a CPU/chipset and memory. They tell us that which address to use in the memory. So the task is to calculate  how many bits are required to pass the input number as an address.

In your example, the input is 2 kilobytes = 2048 = 2^11, hence the answer 11. If your input is 64 kilobytes, the answer is 16 (65536 = 2^16).


Related Solutions

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?
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.  ...
V. How does ARM processor differentiate between a timer interrupt and an A/D interrupt? VI. What...
V. How does ARM processor differentiate between a timer interrupt and an A/D interrupt? VI. What does privileged mode mean and what is the major difference between this mode and non-privileged mode? VII. There are two interrupt pins on ARM microprocessor: IRQ and FIQ. Which one can interrupt the other one and why?
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?
Differentiate between a direct cost and an indirect cost of a segment. What happens to these...
Differentiate between a direct cost and an indirect cost of a segment. What happens to these categories if the segment to which they are related is eliminated?
Explain the biochemical steps of what happens when someone falls into a swimming pool and is...
Explain the biochemical steps of what happens when someone falls into a swimming pool and is submerged for a period of 2 minutes. Why do we sometimes administer Sodium Bicarbonate to patients during the resuscitation of cardiac arrest?
.What is the role of interrupt vector table during interrupt processing? b. How does OS make...
.What is the role of interrupt vector table during interrupt processing? b. How does OS make sure that a user process cannot access I/O devices or any other process’ memory areas? c. How is data parallelism different from task parallelism? Which one of these approaches would you use if you had to compute the average of an array of million numbers? Why? d. What kind of events can cause a process to leave CPU? e. What is the main different...
What is the corpus leteum? What happens to it if fertilization occurs?
What is the corpus leteum? What happens to it if fertilization occurs? And what happens If fertilization does not occur?
Differentiate between humoral and cellular immunity. Include what cells they use and the steps they take...
Differentiate between humoral and cellular immunity. Include what cells they use and the steps they take to protect the body from infection. I want a detailed accounting of what happens when both types encounter an antigen
What happens if you have an imbalance between osteoblasts and osteoclasts? Specifically, what happens when you...
What happens if you have an imbalance between osteoblasts and osteoclasts? Specifically, what happens when you have too many osteoblasts versus when you have too many osteoclasts?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT