Aspire Faculty ID #18885 · Topic: UGC NET Computer Science Nov 2021 (Paper II) · Just now
UGC NET Computer Science Nov 2021 (Paper II)

Consider the following 3 processes with the length of the CPU burst time given in milliseconds:
ProcessArrival TimeBurst Time
P108
P214
P329
What is the average waiting time for these processes if they are scheduled using preemptive shortest job first scheduling algorithm?

Solution

Preemptive SJF is also called Shortest Remaining Time First.

At time $0$, only $P1$ is available, so $P1$ runs.

At time $1$, $P2$ arrives. Remaining time of $P1=7$ and burst time of $P2=4$, so $P2$ runs.

At time $2$, $P3$ arrives, but $P2$ has remaining time $3$, which is shortest. So $P2$ continues.

Gantt chart:

$0\to1:P1,\ 1\to5:P2,\ 5\to12:P1,\ 12\to21:P3$

Completion times:

$CT(P1)=12,\ CT(P2)=5,\ CT(P3)=21$

Waiting time formula:

$WT=CT-AT-BT$

$WT(P1)=12-0-8=4$

$WT(P2)=5-1-4=0$

$WT(P3)=21-2-9=10$

Average waiting time:

$\frac{4+0+10}{3}=\frac{14}{3}=4.66$

Previous 10 Questions — UGC NET Computer Science Nov 2021 (Paper II)

Nearest first
1
Match List I with List IIList-IList-IIA. fork()I. sends a signal from one process to particular processB. exec()II. Ind…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
2
Given below are three statements related to interrupt handling mechanism.A. Interrupt handler routine is not stored at …
Topic: UGC NET Computer Science Nov 2021 (Paper II)
3
In a file allocation system, the following allocation schemes are used:A. ContiguousB. IndexedC. Linked allocationWhich…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
4
Given memory access time as $p$ nanoseconds and additional $q$ nanoseconds for handling the page fault. What is the eff…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
5
 Which of the following is used to create a database schema?
Topic: UGC NET Computer Science Nov 2021 (Paper II)
6
 A transaction may be in one of the following states during its execution life cycle in concurrent execution envir…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
7
A company is consuming parts in the manufacturing of other products. Each of the part is either manufactured within the…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
8
Given a relation scheme $R(x,y,z,w)$ with functional dependencies set$F=\{x\to y,\ z\to w\}$.All attributes take single…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
9
Suppose a B tree is used for indexing a database file. Consider the following information:size of the search key field …
Topic: UGC NET Computer Science Nov 2021 (Paper II)
10
STUDENT(Rollno, Name, Courseno)COURSE(Courseno, Coursename, Capacity)where Rollno is the primary key of relation STUDEN…
Topic: UGC NET Computer Science Nov 2021 (Paper II)

Next 10 Questions — UGC NET Computer Science Nov 2021 (Paper II)

Ascending by ID
1
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size a…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
2
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size a…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
3
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size a…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
4
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size a…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
5
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size a…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
6
. Match List I with List IIList-IList-IIA. Odd FunctionI. NAND GateB. Universal GateII. XOR GateC. 2421 CodeIII. Amplif…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
7
The Octal equivalent of hexadecimal $(D.C)_{16}$ is:
Topic: UGC NET Computer Science Nov 2021 (Paper II)
8
A digital computer has a common bus system for $8$ registers $16$ bits each. How many multiplexers are required to impl…
Topic: UGC NET Computer Science Nov 2021 (Paper II)
9
Which of the following is not an example of pseudo-instruction?
Topic: UGC NET Computer Science Nov 2021 (Paper II)
10
The reverse Polish notation of the following infix expression$[A*\{B+C*(D+E)\}]/\{F*(G+H)\}$is __________.
Topic: UGC NET Computer Science Nov 2021 (Paper II)
Ask Your Question or Put Your Review.

loading...