This document contains tasks for a tutorial on chip multicore processors. Task 5.1 asks to explain the principle of semaphores and how they relate to mutexes. Task 5.2 presents the readers-writers problem and asks to develop an optimal solution using semaphores to allow multiple readers or a single writer but not both to concurrently access a shared resource.
This document contains tasks for a tutorial on chip multicore processors. Task 5.1 asks to explain the principle of semaphores and how they relate to mutexes. Task 5.2 presents the readers-writers problem and asks to develop an optimal solution using semaphores to allow multiple readers or a single writer but not both to concurrently access a shared resource.
MUNCHEN TECHNISCHE UNIVERSITAT Lehrstuhl f ur Integrierte Systeme
Chip Multicore Processors Tutorial 5
May 29, 2013
Task 5.1: Semaphores
Explain the principle of semaphores. How do semaphores relate to mutexes?
Task 5.2: Readers-Writers Problem
The Readers-Writers Problem is a concurrency problem. A shared ressource is used by threads reading from it and others writing from it. No thread should access the ressource while it is written, but it is allowed that several readers read from the resource concurrently. Develop an optimal solution to this problem using semaphores.