How Operating Systems Handle Multitasking