FOR MORE PAPERS, GO TO VUINSIDER.
COM
CS604 Mid Term
__________ integer shows the highest priority of a process in CPU scheduling.
1. small
2. Large
The process of switching from one process to another is called latency.
1. True
2. False
Batch programs are usually __________ programs.
1. interactive
2. Non-interactive
3. Fore ground
4. Preemptive
___________ is used in real time operating systems.
1. Non-preemptive scheduling
2. Preemptive scheduling
3. Dispatching scheduling
4. FCFS scheduling
Page 1 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
The procedure “The time at which the process finished working MINUS the
arrival time of the process MINUS CPU burst for that process” will help calculate
the _________.
1. Non-preemptive Shortest Job First scheduling
2. Preemptive Shortest Job First scheduling.
3. FCFS
4. RR Scheduling
The priorities of processes in the __________ group remain fixed.
1. Kernel
2. User
_____________ is a preemptive scheduling algorithm.
1. First Come First Serve
2. Shortest Job First
3. Round Robin
4. None of these
_______________ scheduling algorithm can be preemptive or non-preemptive.
1. First Come First Serve
Page 2 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
2. Shortest Job First
3. Round Robin
4. Priority
Cooperating processes never share any data, code, memory or state.
1. True
2. False
Whenprocess opens its first file explicitly it will get descriptor number ______
1
2
3
4
Taking the CPU from one process and giving the CPU to another process is
termed as
1. Context switching
2. Dispatching
3. Swapping
4. Tracking
Page 3 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
The correct command for compiling C program named program.c in Linux
environment is
1. gcc program.c –o FirstPrgram
2. gcc –o FirstProgram program.c
3. gcc –z FirstProgram program.c
4. gcc program.c –m FirstPrgram
In Unix/ Linux, by default the standard output file is attached to the_________
1. File
2. Screen
3. Printer
4. Scanner
The priority of a process can be changed using __________ command.
1. nice
2. cmd
3. cat
4. grep
Page 4 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
___________ is the basis of queuing theory which is branch of mathematics
used to analyze systems involving queues and servers.
1. Little’s Formula
2. Deterministic Modeling
3. Queuing Theory
4. Queuing analysis
In Unix/ Linux, by default the standard output file is attached to the ___________
1. File
2. Screen
3. Printer
4. Scanner
Questions:
QNo.1 List and define the different metrics by which might evaluate a
scheduler (List at least 4). 5 marks
Answer:-
Page 5 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
When evaluating a scheduler’s performance, utilization and Throughput are
traded off for better Response Time. Response time is important for OS’s that aim
to be user-friendly.
List of Schedulers include:
First-Come, First-Served (FCFS)
Round-Robin (RR)
Shortest-Job-First (SJF)
Priority Scheduling (PS)
REF :: handouts Page No. 80
QNo.2 Write brief the multilevel feedback queue scheduling. 5 marks
Answer:-
Multilevel feedback queue scheduling allows a process to move between queues.
The idea is to separate processes with different CPU burst characteristics. If a
process uses too much CPU time, it will be moved to a lower-priority queue. This
scheme leaves I/O bound and interactive processes in the higher-priority queues.
Similarly a process that waits too long in a lower-priority queue may be moved o a
higher priority queue. This form of aging prevents starvation.
Page 6 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
In general, a multi-level feedback queue scheduler is defined by the following
parameters:
Number of queues
Scheduling algorithm for each queue
Method used to determine when to upgrade a process to higher priority queue
Method used to determine when to demote a process
Method used to determine which queue a process enters when it needs service
REF :: handouts Page No. 89
Qno.3 Assumption made while formulating a solution to the critical
section problem. 2 marks
Answer:-
A solution to the critical section problem must satisfy the following three
requirements:
Assumptions made While formulating a solution, we must keep the following
assumptions in mind:
Assume that each process executes at a nonzero speed
Page 7 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
No assumption can be made regarding the relative speeds of the N processes.
REF :: handouts Page No. 98
Qno.4 There are many commands. Write the method through which these
commands can communicate with each other. 3 marks
Answer:-
There are many commands some of these are given below:-
Command Name $ pw
Details
You can display the absolute pathname of your working directory with the pwd
command
Syntax
/home/students/nadeem/courses/cs604/programs
Command Name cp
Details
Page 8 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
You can use the cp command for copying files. You can use the cp file1
file2 command to copy file1 to file2.
Syntax
cp ~/file1 ~/memos/file2
Command Name mv
Details
You can use the mv command for moving files. You can use the mv file1
file2 command to move file1 to file2.
Syntax
$ mv ~/file1 ~/memos/file2
Command Name rm
Details
You can use the rm command to remove files. You can use the rm file1
command to remove file1
Page 9 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
Syntax
$ rm ~/courses/cs604/programs/test.c $ For single file
rm *.o For all files
REF :: handouts Page No. 27
Qno.5 Write Difference between SJF and Shortest Remaining Time First
Scheduling algorithm. 3 marks
Answer:
Shorted Job First (SJF) Scheduling Shortest Remaining Time First
Scheduling
For long term scheduling in a batch Whenever a new job comes in,
system, we can use as the length the check the remaining service time on
process time limit that a user the
specifies when he submits the job current job.
Preemptive SJF scheduling is For all but the longest jobs, SRT
sometimes called shortest- better than SJF
remaining-time-first scheduling.
The response ratio is good (Fast) The response ratio is good (low)
Page 10 of 11
For more papers, go to VUInsider.com
FOR MORE PAPERS, GO TO VUINSIDER.COM
CS604 Mid Term
Waiting time is fast Waiting time is also quite low for
most processes
REF :: handouts Page No. 82
Page 11 of 11
For more papers, go to VUInsider.com