Thursday , 21 November 2024

CS604 Solved Mid Term latest Papers

Question No: 1    ( Marks: 1 )    – Please choose one

 The hardware mechanism that enables a device to notify CPU is called an ————-

 

       ►             Interrupt 

►             Signal

►             Trap

►             Process

 

Question No: 2    ( Marks: 1 )    – Please choose one

 You can display the contents (names of files and directories) of a directory in UNIX/Linux directory structure with the ————— command.

 

► l

► s

► ls 

► none of the given options

 

Question No: 3    ( Marks: 1 )    – Please choose one

 The ————– system call suspends the calling process.

 

► fork

     ► wait 

► exec

► exit

 

Question No: 4    ( Marks: 1 )    – Please choose one

 In ———addressing, the recipient is not required to name the sender.

 

  ► Symmetric 

►  Asymmetric

► Both symmetric and asymmetric

► None of the given options

 

Question No: 5    ( Marks: 1 )    – Please choose one

 ——– command gives a snapshot of the current processes.

 

  ► ps 

► top


► who

► ls

 

Question No: 6    ( Marks: 1 )    – Please choose one

 ————–command to resume the execution of a suspended job in the foreground

   ► fg 

► bg

► jobs

► kill

 

Question No: 7    ( Marks: 1 )    – Please choose one

 You can use the ————- command to display the status of suspended and background processes

 

► fg

► bg

       ► jobs

► kill

 

Question No: 8    ( Marks: 1 )    – Please choose one

 You can terminate a foreground process by pressing ————–

 

► <Ctrl-A>

    ► <Ctrl-C>

► <Ctrl-Z>

► None of the given options

 

Question No: 9    ( Marks: 1 )    – Please choose one

 A time sharing system is

 

► Multi tasking

► Interactive

       ► All of these

► Multi user

 

Question No: 10    ( Marks: 1 )    – Please choose one 

The main characteristic of a Real time system is

 

      ► Efficiency            (Not Sure)

► Large Virtual Memory

► Large secondary storage device

► Usability

 

Question No: 11    ( Marks: 1 )    – Please choose one

 Shared libraries and kernel modules are stored in _____________ directory

 

► /bin

► /dev

► /boot

       ► /lib

 

Question No: 12    ( Marks: 1 )    – Please choose one

 __________ scheduler selects the process from the job pool and put them in main memory.

 

      ► Long term

► Short term

► Medium term

► Swapper

 

Question No: 13    ( Marks: 1 )    – Please choose one

 In indirect inter process communication, a sender ___ mention the name of the recipient.

 

► do

     ► do not 

 

Question No: 14    ( Marks: 1 )    – Please choose one

A ______________ is an integer variable that, apart from initialization is accessible only through two standard atomic operations: wait and signal.

 

       ► Semaphore

► Monitor

► Critical region

► Critical section

 

Question No: 15    ( Marks: 1 )    – Please choose one 

A semaphore that cause Busy-Waiting is termed as ___________.

 

       ► Spinlock

► Monitor

► Critical region

► Critical section

 

Question No: 16    ( Marks: 1 )    – Please choose one

 The execution of critical sections must NOT be mutually exclusive

 

► True

       ► False

 

Question No: 17    ( Marks: 1 )    – Please choose one 

The performance of Round Robin algorithm does NOT depends heavily on the size of the time quantum.

 

  ► True

► False

 

Question No: 18    ( Marks: 1 )    – Please choose one

 The following requirement for solving critical section problem is known as ______________.

“There exists a bound on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.”

 

► Progress

       ► Bounded Waiting

► Mutual Exclusion


► Critical Region

 

Question No: 19    ( Marks: 1 )    – Please choose one

 The critical section problem can be solved by the following except

 

► Software based solution

      ► Firmware based solution

► Operating system based solution

► Hardware based solution

 

Question No: 20    ( Marks: 1 )    – Please choose one

 ___________ is also called Swapper.

 

► Swap space

► Medium term scheduler (not Sure)

Short term scheduler

► Long term scheduler

Question No: 21    ( Marks: 2 )

 Write the formula/ procedure for calculating the waiting time in preemptive Shortest Job First scheduling.

 

Question No: 22    ( Marks: 2 )

 What are the common data structures in Bakery Algorithm?

Question No: 23    ( Marks: 3 )

If a process exits and there are still threads of that process running, will they continue to run?

 

The bakery algorithm is due to Leslie Lamport and is based on a scheduling algorithm commonly used in bakeries, ice-cream stores, and other locations where order must be made out of chaos. On entering the store, each customer receives a number. The customer with the lowest number is served next. Before entering its critical section, process receives a ticket number. Holder of the smallest ticket number enters its critical section. Unfortunately, the bakery algorithm cannot guarantee that two processes (customers) will not receive the same number. In the case of a tie, the process with the lowest ID is served first. If processes Pi and Pj receive the same number, if i < j, then Pi is served first; else Pj is served first. The ticket numbering scheme always generates numbers in the increasing order of enumeration; i.e., 1, 2, 3, 4, 5 …

Question No: 24    ( Marks: 3 )

 What are the important characteristics of TestAndSet? What will be its advantage.

We can use these special instructions to solve the critical section problem. These instructions are TestAndSet (also known as TestAndSetLock; TSL) and Swap. The semantics of the estAndSet instruction are as follows:

boolean TestAndSet(Boolean &target)
{
boolean rv=target;
target=true;
r

Question No: 25    ( Marks: 5 )

Considering the Resource sharing feature of thread, what do you think is ‘resource sharing’ an advantage of a thread or disadvantage of a thread. Explain yours answer briefly.

Question No: 26    ( Marks: 5 )

 Analyze the given algorithm proposed to solve the critical section problem. Identify the shortcomings of this algorithm.

do{

while(turn!=j);

critical section

turn=j;

remainder section

} while(1)

CS604 Solved Mid Term Paper Solved by Arslan Ali & Muhammad Zeeshan

Check Also

CS604 Assignment no 02 Spring 2013

  Assignment No. 02 Total Marks:20 Due Date: Spring 2013 Tuesday 14th May CS604- Operating …

Leave a Reply

Your email address will not be published. Required fields are marked *

*