Hi,
I'm reading 'Modern Operating Systems' by Tanenbaum and I want to map
the inner process data structures to the
java language.
My questions:
Do Semaphores or Mutexes keep track of their callers ?
If i want to implement a Semaphore do I need to store the current executing
Thread in an instance variable of the Semaphore ?
Because if not it might be possible to do:
- Thread1.down();
- Thread2.up(); Thread2.down();
But it is nowhere stated, that a Mutex or Semaphore has an owner or needs to keep track of those.
Which inner Process / inner Thread implementations keep neep / are supposed to keep track of their owner ?
Just a Monitor or Mutex and Semaphores, too ?
Why is a Monitor implementation missing in Java (like java.util.Monitor) ?