----------
Problem 1:
----------
Given two threads,

	void *thread_a(void *arg)
	{
	  printf("Thread A: before synchronization\n");
	
	  <SYNCH_POINT>
	
	  printf("Thread A: after synchronization\n");
	}
	
	void *thread_b(void *arg)
	{
	  printf("Thread B: before synchronization\n");
	
	  <SYNCH_POINT>
	
	  printf("Thread B: after synchronization\n");
	}
	
write the code for the <SYNCH_POINT>, so that "Thread A: after synchronization" is always printed *after* "Thread B: before synchronization".

----------
Problem 2:
----------
Given the two threads above, write the code for the <SYNCH_POINT>, so that:

"Thread A: after synchronization" is always printed *after* "Thread B: before synchronization",  

*and* 

"Thread B: after synchronization" is always printed *after* "Thread A: before synchronization".


----------
Problem 3:
----------

Generalize the solution to problem 2 to N threads (with N arbitrary).




 
