The assignment is to implement the Banker's Algorithm using pthreads and mutex locks.

We implemented the Banker's Algorithm and it works fine. When we began implementing the pthreads and mutex locks we ran into problems.

We know that each process is a thread, and that the mutex lock is acquired once it is inside of the Banker's Algorithm function and it is released once you leave the function.

We are just confused about how the threads come into play.

Can you post your code?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.