Test OS
Test OS
Ques 1 : If the waiting time for a process is p and there are n processes in the memory then the CPU utilization is given by (A) p/n (B) pn (C) 1- pn (D) n-( pn )
Ques 2 : Mark the incorrect statement (A) Multiprocessing operation (or multitasking) implies multiprogramming (B) Multiprogramming implies multiprocessing or multitasking operation (C) The simplest form of multitasking is called serial multitasking or context switching. (D) Multiuser operating system does not imply multiprogramming or multitasking. Ques 3 : The only state transition that is initiated by the user process itself is: (A) block (B) dispatch (C) wake up (D) None of these
Ques 4 : A binary semaphore is used : (A) to control access to a given resource consisting of finite number of instances (B) to prevent creation of threads (C) for avoiding busy waiting condition (D) to implement mutual exclusion and synchronize concurrent processes Ques 5 : Suppose a new process in a system arrives at an average of six processes per minute and each such process requires an average of 8 seconds of service time. Estimate the fraction of time the CPU is busy in a system with a single processor. (A) 20% (B) 80% (C) 48% (D) 60%
Ques 6 : Identify the semaphore from the definition given below: (A) signal() (B) wake up() (C) wait() (D) None of these
Ques 7 : The status of the Kernel is (A) task (B) process (C) not defined (D) None of these
Ques 8 : Which standard UNIX mechanism for passing data among processes allows a child process to inherit a communication channel from its parent (A) Shared Memory (B) Channelling (C) Pipe (D) Message Passing
Ques 10 : Arrange the following sequences of events in booting of a Windows XP PC in the correct order : 1) NTLDR is loaded from the root directory to determine the boot device 2) BIOS identifies the system device 3) Loads and executes the bootstrap loader 4) NTLDR does the Kernel execution (A) 2-3-1-4 (B)1-3-2-4 (C)3-2-1-4 (D)2-1-4-3
Ques 11 : Windows NT uses : (A) Layered Microkernel Organization (C) Microkernel Approach
Ques 12 : Which of the following files form the kernel of the DOS system? (A) COMMAND.COM (B) CONFIG.SYS and AUTOEXEC.BAT (C) IO.SYS and MSDOS.SYS (D) BIO.SYS and DOS .SYS Ques 13 : When a System call is executed, the mode bit is set to (A) Trap Mode (B) 1 (C) User Mode Ques 14 : Which one of the following is true : (A) In the Blocking or Asynchronous send, the process is blocked until the message is received by the mailbox. (B) In the Blocking receive, the process is blocked until the message, to be passed, is available. (C) In the Non-blocking or synchronous receive, either a valid message or a null is retrieved. (D) In the Non-Blocking send, message is sent after the acknowledgement of the receipt of the previous message is received.
(D) 0
Ques 15 : Find the correct matching order : 1) 2) 3) 4) The problem related to deadlock is Restriction on number of critical section access Disadvantage of Semaphore is the requirement of Solution to the problem of indefinite blockage (A) 1-b, 2-c, 3-a, 4-d (C) 1-d, 2-c, 3-b, 4-a a) b) c) d) aging busy waiting bounded waiting starvation
(B) 1-c, 2-b, 3-d, 4-a (D) 1-d, 2-b, 3-c, 4-a
Ques 16 : Dispatcher gives the control of the CPU to the process selected by the : (A) Short term Scheduler (B) Long term Scheduler (C) Process Swapping Scheduler (D) Job Scheduler
Ques 17 : In a multilevel Queue Scheduling, 1) A foreground process has a priority over background process 2) Different levels may use different scheduling techniques 3) A process is allowed to move between the queues (A) All three are true (B) Only 1 is true (C) 1 and 2 are true (D) 2 and 3 are true
Ques 18 : if (fork() = = 0) { a = a + 5 ; printf ( %d , %d \n , a, &a ); } else { a = a 5 ; printf ( %d , %d \n , a, &a ); } Let u,v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE ? (A) u = x + 10 and v = y (C) u + 10 = x and v = y (B) u = x + 10 and v y (D) u + 10 = x and v y
Ques 19 : Modes of Inter process Communications are : (1) Shared Memory (2) Message Passing (A) 1 & 2 (B) 1, 2 and 3
Ques 20 : Find the correct matching order :WINDOWS System Call a) CreateFileMapping() b) SetFileSecurity() c) MapViewOfFile() d) SetConsoleMode()
LINUX System Call i) mmap() ii) chmod() iii) shmget() iv) ioctl()
(A) a-i, b-iii, c-iv, d-ii (C) a-i, b-ii, c-iii, d-iv
(B) a-iii, b-iv, c-i, d-ii (D) a-iii, b-ii, c-i, d-iv
Ques 21 : Consider three CPU intensive processes, which require 10, 20 and 30 time units and arrive at times 0, 2 and 6, respectively. How many context switches are needed if the operating system implements a Shortest Remaining Time First scheduling algorithm. (A) 1 (B) 2 (C) 3 (D) 4
Ques 22 : Bounded Waiting Mutual exclusion can be implemented using : (A) TestAndSet() (B) mutex( ) (C) Swap() (D) spinlock Ques 23 : ____________ decreases in Deadlock avoidance. (A) Resource Utilization (B) Response Time (C) CPU throughput (D) Chances of Circular wait condition Ques 24 : Pre-emptive scheduling is the strategy of temporarily suspending a running process (A) (B) (C) (D) before the CPU time slice expires to allow starving processes to run when it requests I/O to enhance throughput
Ques 25 : Select the statement which is true : (A) Short term Scheduler selects those processes which are ready to execute and hence has to work least frequently (B) Long term Scheduler is a part of Time Sharing Systems (C) Medium term Scheduler can re-introduce the process into memory and execution can be continued (D) Long term Scheduler is also called CPU scheduler Ques 26 : A computer system has 6 tape drives, with n processes competing for them. Each process may need 3 tape drives. The maximum value of n for which the system is guaranteed to be deadlock free is : (A) 5 (B) 4 (C) 3 (D) 2
Ques 27 : Consider a system consisting of m instances of a resource, being shared by n processes. Resources can be requested and released by processes only one at a time. The system is deadlock free if : 1) 2) 3) 4) The sum of all maximum needs is less than m + n. The maximum need of each process is between 1 and m resources. The difference between the maximum and the current need of a process is less than m If the request made by a process is always greater than m - n (B) 2, 3 & 4 (C) 1 & 3 (D) 1, 2 & 3
(A) 1 & 2
NOTE : Consider the following and answer the next 3 questions : Given a set of 5 processes whose arrival time, CPU Burst and the priority are given as follows : Process Arrival Time (in ms) P1 0 P2 0 P3 2 P4 5 P5 10 Smaller the number, higher the priority CPU Burst (in ms) 10 5 3 20 2 Priority 5 2 1 4 3
Ques 28 : If the CPU Scheduling Policy is FCFS, the average waiting time will be (A) 8 ms (B) 12.8 ms (C) 16 ms (D) None
Ques 29 : If the CPU Scheduling is SJF without pre-emption (SRTF), the average waiting time will be (A) 12.8 ms (B) 17 ms (C) 6.8 ms (D) None
Ques 30 : If the CPU Scheduling policy is Priority Scheduling with pre-emption, the average waiting time will be (A) 7.6 ms (B) 19 ms (C) 8 ms (D) None