Given a mutex lock m, and a conditional variable c, threads…
Given a mutex lock m, and a conditional variable c, threads T1, T2, and T3 execute the following actions in order of occurrence: T2 executes mutex-lock(m). T3 executes mutex-lock(m). T2 executes cond-wait(c, m). T1 executes mutex-lock(m) T3 executes cond-signal(c) T3 executes mutex-unlock(m) For each of the following three questions, write down the state of the two waiting queues after the indicated number of steps has elapsed. For the mutex variable mm, write your answers as a comma-separated list with the first entry being the thread that currently has the lock. For example, if T1T1 has the lock and T2T2 is waiting for the lock, you should answer “T1, T2”. If the queue is empty, simply write “N/A”. For the conditional variable cc, write a comma-separated list of threads waiting in order that they arrived. For instance, if T1T1 and T2T2 are waiting for mutex lock mm, you should answer “T1 m, T2 m.” If the queue is empty, simply write “N/A”.
Read Details