Experimental Physics and
| |||||||||||||||||
|
Yes. Records are "Active" until all the related processing is done. Active records are not "refired". in reply to Emmanuel Mayssat's question: I just wanted to have confirmation that in the case of a FLNK loop ( 2 records FLNK to one another ), the loop stops once before processing an already processed record. While Ron is right about this most all the time, there are circumstances where two records can FLNK each other and cause a loop; both records must have asynchronous device support for that to occur. Here's the timeline with two synchronous records, showing how we break these loops using the record PACT field: Request to process r1 is made. dbProcess() checks r1.PACT, finds it false. r1.process() called: r1.PACT = true r1 performs I/O etc according to record type, calls recGblFwdLink() r1.FLNK => r2 dbProcess() checks r2.PACT, finds it false, r2.process() called: r2.PACT = true r2 performs I/O etc according to record type, calls recGblFwdLink() r2.FLNK => r1 dbProcess() checks r1.PACT, finds it true. dbProcess() returns r2.PACT = false r2.process() returns r1.PACT = false r1.process() returns. However if both records have asynchronous device support, the timeline changes and we can get into a continuous loop, controlled by the speed of the device: Request to process r1 is made. dbProcess() checks r1.PACT, finds it false. r1.process() called: r1.PACT = true r1 starts I/O operation r1.process() returns. r1.device finishes I/O operation, r1.process() called: r1 completes I/O processing calls recGblFwdLink() r1.FLNK => r2 dbProcess() checks r2.PACT, finds it false, r2.process() called: r2.PACT = true r2 starts I/O operation r2.process() returns r1.PACT = false r1.process() returns. r2 device finishes I/O operation, r2.process() is called: r2 completes I/O processing calls recGblFwdLink() r2.FLNK => r1 dbProcess() checks r1.PACT, finds it false, r1.process() called: r1.PACT = true r1 starts I/O operation r1.process() returns. r2.PACT = false r2.process() returns At this point the IOC will continue to loop between the second and third paragraphs of that description forever, although the time it takes for the I/O operation to complete will control how often it loops. It is necessary to have two or more asynchronous device supports in a FLNK loop for this situation to occur - with a single asynchronous record processing will always come back to the original record with the PACT field set and thus break the loop. Synchronous records in the loop have no effect on this argument except to increase the stack usage. Note that the infinite loop will not result in a stack overflow, since the two paragraphs can never nest - the lockset locking prevents the I/O completion from happening until after the previous paragraph has come to the end of its work. - Andrew -- There is no S in exprexxo.
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |