What is Software and hardware interrupt
The software interrupts are program instructions. These instructions are inserted at desired location in a program. A program formed interrupt also called trap, which stops current processing in order to request a service given by the CPU. While running a program, if software interrupt instruction is encountered the CPU initiates an interrupt. For instances a program might generate a software interrupt to read input from keyboard. Hardware interrupt is a type of interrupt generated either externally by the hardware devices like input/ output ports, keyboard and disk drive etc or internally by the microprocessor. External hardware interrupts are used by device to request attention from CPU. Internal hardware interrupts are formed by the CPU to control events.