Added process switching functionality with irq