Saturday, July 30, 2011

[abclryah] Computer without interrupts or exceptions

Exceptions are a sophisticated software control structure, so I am somewhat surprised we implement them in hardware as interrupts and exceptions.  They make implementing real microprocessors extremely difficult.  (Precise exceptions, rolling back a deep pipeline, etc.)

Consider a processor without exceptions or interrupts (again, the philosophy of RISC: make things simpler).  The software (operating system) is required to run an event loop polling status registers for exceptional conditions.  The complexity goes to the branch predictor.

Would it work?  We use exceptions and interrupts for a great many things: virtual memory, input-output devices and peripherals, timers and process scheduling.  Computers might have to be completely redesigned from the ground up.

No comments :