use semaphore to lock buffer
Merge branch 'master' of https://github.com/yuanxiacpp/os_hw2