Studies in Operating Systems Design Part I: Semaphore Operations and Task Control