in reply to Re^3: Critical section FCFS
in thread Critical section FCFS
Apologies for the confusion.
1. FCFS = first come first serve
2. Re-framing the example
Critical section = CS lets say the CS is writing time-stamp (of when crit.pl is called) to file.
Example: Call1 to crit.pl - running CS Call2 to crit.pl - waiting for lock on CS Call3 to crit.pl - waiting for lock on CS
Time wise events
T1: Call1 locks CS, Call2 waits for the lock on CS
T2: Call1 still has lock on CS, Call2 waits + new Call3 arrives and also waits
T3: Call1 completes, Call2 acquires lock on CS, Call3 waits
T4: Call2 completes, Call3 acquires lock on CS
The CS time stamps should be ascending order
Hope this makes it clearer. Please let know if this can be achieved. Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Critical section FCFS
by BrowserUk (Patriarch) on Jul 14, 2016 at 18:56 UTC |