lab04: implement read() function using IRQs & sleeping