So I am trying to construct a timeline graph for threads interacting with synchronization functions e.g.
I have the following information:
1- thread ids
2- ids for the synchronization functions
3- Arrival times of the threads at the synchronization functions e.g. the time at which the thread encountered
4- Crossing time i.e. the time at which the thread crossed in to the critical section (e.g. crosses
1- Sort all the times (both arrivals and crossings)
2- for each time construct the event i.e. thread x arrived/crossed at synchronization y.
1- The time complexity for this will be O(n log n) where n is the number of events (i.e arrival and crossing)?
2- Any possible imporvements/alternative ways/existing algorithms?