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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.