Consider the computer system shown in Figure 1. The system consists of three dev
ID: 3813845 • Letter: C
Question
Consider the computer system shown in Figure 1. The system consists of three devices: a disk and 2 CPUs. Each device is modelled as a server and a queue. The system is at peak load and there are three (3) jobs circulating in the system at all times. During each round that a job circulates the system, the job requires processing from one of the CPUs and then followed by the disk. Assuming that:
The processing time required by each job per visit to the disk is exponentially distributed with mean 50 milli-seconds.
The two CPUs have different mean processing times. The mean processing times for CPU1 and CPU2 are, respectively, 50 and 100 milli-seconds. Both processing time distributions are assumed to be exponential.
After a job has left the disk, it will proceed to receive processing at one of the CPUs immedi- ately. In any attempt to utilise the faster CPU (i.e. CPU1), a job will only be sent to CPU2 if it is idle CPU2 is idle and CPU1 is busy. In other words, if CPU2 is busy, the job will be sent to CPU1; and if both CPU1 and CPU2 are idle, the job will be sent to CPU1.
Question:
(a) Let the states be the following 3-tuple:
(number of users in the CPU1, number of users in CPU2, number of users in the disk), formulate a continuous-time Markov chain for this computer system. Your formulation should
include (1) a list of states; (2) the transition rates between the states.
CPU 1 CPU 2 DiskExplanation / Answer
import java.util.Scanner;
/* category BSTNode */
category BSTNode
builder */
public BSTNode()
/* creator */
public BSTNode(int n)
/* perform to line left node */
public void setLeft(BSTNode n)
/* perform to line right node */
public void setRight(BSTNode n)
/* perform to induce left node */
public BSTNode getLeft()
come left;
}
/* perform to induce right node */
public BSTNode getRight()
come right;
}
/* perform to line knowledge to node */
public void setData(int d)
/* perform to induce knowledge from node */
public int getData()
come data;
}
}
/* category BST */
class BST
non-public BSTNode root;
/* creator */
public BST()
/* perform to ascertain if tree is empty */
public Boolean isEmpty()
come root == null;
}
/* Functions to insert knowledge */
public void insert(int data)
/* perform to insert knowledge recursively */
non-public BSTNode insert(BSTNode node, int data)
come node;
}
/* Functions to delete knowledge */
public void delete(int k)
rval)
r = r.getRight();
else
{
found = true;
break;
" id="tip_70">
found = search(r, val);
}
come found;
}
/* perform for inorder traversal */
public void inorder()
non-public void inorder(BSTNode r)
non-public void preorder(BSTNode r)
non-public void postorder(BSTNode r)
making object of BST */
BST bst = new BST();
System.out.println("Binary Search Tree Test ");
char ch;
/* Perform tree operations */
do