Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
6 Cards in this Set
- Front
- Back
what is the dining philosopher problem? |
1. philosophers must alternate think and eat 2. can only eat if they have both forks |
|
solution to dining philosopher problem |
|
|
a |
a |
|
in addition to semaphore what is used in dining philosopher problem? |
States 1. hungry 2. eating 3. thinking |
|
what does the dining philosopher problem model? |
it models threads that compete for exclusive access to a common resource |
|
explain the reader writer problem |
it deals with accessing a database. 1. a set of threads share a common memory 2. the set of threads is partitioned to readers and writers 3. no problem if 2 readers access the memory at the same time 4. problem if reader and writer both access or if 2 writers access the memory 5. therefore the writer must have exclusive access to memory |