Package jline.io
Class LQN2QN
-
- All Implemented Interfaces:
public class LQN2QNConverts a LayeredNetwork (LQN) to a Network (QN).
The conversion uses REPLY signals to model synchronous call blocking: when a task makes a synchCall, the server blocks until a REPLY signal arrives from the called task.
- Each synchCall creates a Request class and a Reply signal class
- The caller queue blocks after completing service until Reply arrives
- The callee processes the request and class-switches to Reply on completion
- Reply signal unblocks the caller and continues downstream
Think → CallerQueue → CalleeQueue → CallerQueue (reply) → Think ↓ blocks ↓ class switch to Reply ↓ unblocksThis approach:
- Correctly models BLOCKING semantics (server waits for reply)
- Provides per-task queue metrics (queue length, utilization)
- Supports multi-tier call chains (A → B → C)
- Uses DES solver with REPLY signal support
When an entry has phase-2 activities, a Fork-Join structure handles the async continuation after reply:
CallerQueue → CalleeQueue_Ph1 → Fork → { Reply → CallerQueue } → { Ph2Queue → Join }Example usage:
LayeredNetwork lqn = new LayeredNetwork("MyLQN"); // ... define LQN model ... Network model = LQN2QN.convert(lqn); SolverDES solver = new SolverDES(model); solver.getAvgTable();
-
-
Constructor Summary
Constructors Constructor Description LQN2QN()
-
Method Summary
Modifier and Type Method Description static Networkconvert(LayeredNetwork lqn)Converts a LayeredNetwork to an equivalent queueing network using REPLY signals. -
-
Method Detail
-
convert
static Network convert(LayeredNetwork lqn)
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 behavior with REPLY signal blocking
-
-
-
-