In: Computer Science
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?
Ans:1)
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:
For example, output to the screen, execute file etc.
Ans:2)
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. |
|
|
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).