Package jline.io
Class LQN2QN
java.lang.Object
jline.io.LQN2QN
Converts a LayeredNetwork (LQN) to a Network (QN) using REPLY signals.
Java port of matlab/src/io/LQN2QN.m; the two must stay in step.
Construction
- One station per host processor (scheduling and multiplicity taken from the processor). Tasks sharing a processor share the station, as in the LQN semantics where the processor is the contended resource.
- One Delay per reference task, holding its think time.
- One closed class per step of the expanded activity graph. A step is an activity, or one call stage of an activity that issues synchronous calls. Steps of the reference task chain carry population 0 except the think class, which carries the reference task multiplicity.
- A synchronous call site blocks its caller: the step class has a REPLY signal bound to it, the token proceeds to the callee, and the callee's replying activity class-switches to that signal, which returns to the caller station and unblocks it.
- Call multiplicity mean m is unrolled into floor(m) mandatory call stages plus, if m is not integer, one further stage entered with probability m-floor(m).
- OR-branch and loop probabilities are read from the activity graph weights. Each call site receives its own copy of the callee subgraph.
- AND precedences become Fork and Join nodes, with one Router per branch since a Fork cannot switch class per output link. A branch tail that issues a synchronous call is given a merge step, so that it reaches the Join in an ordinary class rather than as a REPLY signal, which carries no forked-task identity.
- A CacheTask becomes a Cache node. The activity bound to an ItemEntry is the read step and sits on that node; its two CacheAccess successors become the hit and the miss class, and since the class switch is performed by the Cache node itself, the routes leaving it are written in the successor class.
- An asynchronous call is lowered to a non-blocking visit: the caller does not hold its server for the duration of the call, but it is serialised behind it, since a closed network has no means of creating the second token that a truly concurrent send would require.
- Entry forwarding splits the reply exits of the forwarding entry: with the forwarding probability the request is handed to the target entry, which replies to the original caller, so the forwarder is released while the caller stays blocked.
Not yet represented: phase-2 semantics (phase-2 activities are executed before the reply rather than after it), delayed-hit retrieval on the cache miss path, and the thread pool of a task with an internal AND-fork. Each is reported through line_warning.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Networkconvert(LayeredNetwork lqn) Converts a LayeredNetwork to an equivalent queueing network using REPLY signals.
-
Method Details
-
convert
Converts a LayeredNetwork to an equivalent queueing network using REPLY signals.- Parameters:
lqn- the LayeredNetwork model to convert- Returns:
- a Network that models the LQN behaviour with REPLY signal blocking
-