A B C D E F G I M N P R S

A

accessShared - Variable in class SyncData
Only one task can use the shared memory buffer at a time.
activity - Static variable in class BarrierSec
Current activity to be performed by every Bob.

B

barrier - Static variable in class Global
Use one semaphore for each activity.
BarrierMap - Class in <Unnamed>
This class shows how to synchronice a bunch of people who perform many activities.
BarrierMap() - Constructor for class BarrierMap
 
BarrierSec - Class in <Unnamed>
This class shows how to synchronice a bunch of people who perform many activities.
BarrierSec() - Constructor for class BarrierSec
 
BobAlice - Class in <Unnamed>
This class shows how to use a semaphore to make sure that Bob eats only after Alice eats.
BobAlice() - Constructor for class BobAlice
 
BobBank - Class in <Unnamed>
This class shows how to synchronice a bunch of people who take money out of the same bank account.
BobBank() - Constructor for class BobBank
 
bowBack(Friend) - Method in class Friend
Bow back to a friend.

C

consume(char) - Method in class Consumer
Consumes the letter.
Consumer - Class in <Unnamed>
This is eatVowels[i]'s thread.
Consumer(SyncData) - Constructor for class Consumer
Constructor.

D

Deadlock - Class in <Unnamed>
Alphonse bows to Gaston and Gaston bows to Alphonse.
Deadlock() - Constructor for class Deadlock
 
DeadlockSun - Class in <Unnamed>
Alphonse bows to Gaston and Gaston bows to Alphonse.
DeadlockSun() - Constructor for class DeadlockSun
 

E

eaterDone - Variable in class SyncData
Semaphore released when a consumer decides to stop consuming.
EatText - Class in <Unnamed>
This class shows how to use a semaphore to make sure that the consumer eatVowels[i] never eats letters before the producer moreText has stored them in shared memory.
EatText() - Constructor for class EatText
 
emptyCount - Variable in class SyncData
This semaphore is increased when a letter is consumed.

F

fillCount - Variable in class SyncData
This semaphore is increased when a new letter is produced.
Friend - Class in <Unnamed>
Alphonse and Gaston are friends.
Friend(String) - Constructor for class Friend
Constructor.

G

GaZillion - Static variable in class BobBank
I have this much money.
getMyPIpart() - Method in class Slave
Returns the current calculation result.
getName() - Method in class Friend
Get the name.
getString() - Method in class Consumer
Get all the letters that this thread eated.
Global - Class in <Unnamed>
Global structure to store global data.
Global() - Constructor for class Global
 

I

IAmAlice - Class in <Unnamed>
This is Alice's thread.
IAmAlice(Semaphore) - Constructor for class IAmAlice
The constructor just sets the synchronization this.semaphore.
IAmBob - Class in <Unnamed>
Each Bob is an instance of this class.
IAmBob(int) - Constructor for class IAmBob
Constructor that also remembers the semaphores.
iAmDone - Static variable in class Deadlock
Semaphore to signal that the bowing is over.
iAmDone - Static variable in class DeadlockSun
Semaphore to signal that the bowing is over.

M

main(String[]) - Static method in class BarrierMap
Main program.
main(String[]) - Static method in class BarrierSec
Main program.
main(String[]) - Static method in class BobAlice
Main program.
main(String[]) - Static method in class BobBank
Main program.
main(String[]) - Static method in class Deadlock
Main program.
main(String[]) - Static method in class DeadlockSun
Main program.
main(String[]) - Static method in class EatText
Main program.
main(String[]) - Static method in class MasterPI
Main program.
ManyBobs - Static variable in class BarrierSec
A bunch of Bobs perform the activities.
ManyBobs - Static variable in class BobBank
A bunch of Bobs compete to drain the bank account.
ManyBobs - Static variable in class Global
Number of workers for each activity.
MasterPI - Class in <Unnamed>
Uses many tasks to calculate PI.
MasterPI() - Constructor for class MasterPI
 
mutex - Static variable in class Global
Mutex to access global data stored in here.
myFriend - Variable in class Friend
My friend
mySync - Variable in class Consumer
Contains synchronization data.
mySync - Variable in class Producer
Contains synchronization data.

N

N_Activities - Static variable in class BarrierSec
This many task will be performed.
N_Activities - Static variable in class Global
Total number of activities.
N_eaters - Variable in class SyncData
Number of vowel eaters.
N_givers - Variable in class SyncData
Number of vowel producers.
N_intervals - Static variable in class MasterPI
Number of intervals used to calculate PI.
N_memSize - Variable in class SyncData
Size of the shared memory buffer.
N_tasks - Static variable in class MasterPI
Number of slaves used to calculate PI concurrently.

P

pleaseContinue - Variable in class SyncData
Flag to stop producers.
pleaseStop() - Method in class SyncData
Ask producers to stop producing vowels.
Producer - Class in <Unnamed>
This is moreText's thread.
Producer(SyncData) - Constructor for class Producer
Constructor.

R

reduce - Static variable in class Global
Semaphore to signal the end of the Map face.
reduce - Static variable in class MasterPI
Semaphore used to tell when all the slaves are done.
remain - Static variable in class BarrierSec
Number of Bobs that didnīt finish current activity yet.
remain - Static variable in class Global
Number of Bobs that didnīt finish yet the current activity.
run() - Method in class Consumer
Method invoked by Thread.start().
run() - Method in class Friend
Bow to a friend and later bow back.
run() - Method in class IAmAlice
Method invoked by Thread.start().
run() - Method in class IAmBob
Method invoked by Thread.start().
run() - Method in class Producer
Method invoked by Thread.start().
run() - Method in class Slave
Method invoked by Thread.start().

S

setFriend(Friend) - Method in class Friend
Make friends.
sharedMemory - Variable in class SyncData
 
Slave - Class in <Unnamed>
These are the slaves that do all the work.
Slave(int) - Constructor for class Slave
Constructor.
SyncData - Class in <Unnamed>
Contains synchronization data.
SyncData(int, int, int) - Constructor for class SyncData
Constructor.

A B C D E F G I M N P R S