Consider the following set of processes, assumed to have arrived at time 0 in the order P1, P2, P3, P4, and P5, with the given length of the CPU burst (in milliseconds) and their priority:
\[\begin{array}{|c|c|c|}\hline \text{Process} & \text{Burst Time (ms)} & \text{Priority} \\ \hline \text{P1} & 10 & 3 \\ \hline \text{P2} & 1 & 1 \\ \hline \text{P3} & 4 & 4 \\ \hline \text{P4} & 1 & 2 \\ \hline \text{P5} & 5 & 5 \\ \hline \end{array}\]
Using priority scheduling (where priority 1 denotes the highest priority and priority 5 denotes the lowest priority), find the average waiting time.
**Step 1: Determine the process execution order based on priority.**
We execute the processes in order of priority (highest to lowest):
- **P2** (Priority 1) runs first.
- **P4** (Priority 2) runs next.
- **P1** (Priority 3) runs after P4.
- **P3** (Priority 4) runs after P1.
- **P5** (Priority 5) runs last.
**Step 2: Calculate the waiting time.** The waiting time for each process is the total time the process spends waiting in the ready queue before it starts execution.
- **P2**: Waits 0 ms (it is the first to execute).
- **P4**: Waits for P2 to finish, which is 1 ms.
- **P1**: Waits for P2 and P4 to finish, which is 1 + 1 = 2 ms.
- **P3**: Waits for P2, P4, and P1 to finish, which is 1 + 1 + 10 = 12 ms.
- **P5**: Waits for P2, P4, P1, and P3 to finish, which is 1 + 1 + 10 + 4 = 16 ms.
**Step 3: Calculate the average waiting time.** The average waiting time is the sum of the waiting times divided by the number of processes:
\[ \text{Average waiting time} = \frac{0 + 1 + 2 + 12 + 16}{5} = \frac{31}{5} = 5.2 \text{ ms} \] Thus, the correct answer is **5.2 milliseconds**.
In C language, mat[i][j] is equivalent to: (where mat[i][j] is a two-dimensional array)
Suppose a minimum spanning tree is to be generated for a graph whose edge weights are given below. Identify the graph which represents a valid minimum spanning tree?
\[\begin{array}{|c|c|}\hline \text{Edges through Vertex points} & \text{Weight of the corresponding Edge} \\ \hline (1,2) & 11 \\ \hline (3,6) & 14 \\ \hline (4,6) & 21 \\ \hline (2,6) & 24 \\ \hline (1,4) & 31 \\ \hline (3,5) & 36 \\ \hline \end{array}\]
Choose the correct answer from the options given below:
Match LIST-I with LIST-II
Choose the correct answer from the options given below:
Match LIST-I with LIST-II
\[\begin{array}{|c|l|}\hline \textbf{LIST-I} & \textbf{LIST-II} \\ \hline \text{A. Encipherment} & \text{The use of mathematical algorithms to transform data into a form that is not readily intelligible.} \\ \hline \text{B. Digital Signature} & \text{Cryptographic transformation of a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery.} \\ \hline \text{C. Access Control} & \text{A variety of mechanisms that enforce access rights to resources.} \\ \hline \text{D. Data Integrity} & \text{A variety of mechanisms used to assure the integrity of a data unit or stream of data units.} \\ \hline \end{array}\]
\[\text{Matching\ Items\ in\ LIST\-I\ with\ LIST\-II}\]