Gate/Operating system set1 Sample Test,Sample questions

Question: A binary semaphore

1.has the value one or zero

2.is essential to binary computers

3.is used only for synchronization

4.is used only for mutual exclusion


Question: A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative.

1.11 bit

2.20 bit

3.13 bit

4.15 bit


Question: A critical region

1.is a piece of code which only one process execute at a time

2.is a region prone to deadlock

3.is a piece of code which only a finite number of process execute

4.None of the above


Question: A file system with 300 GByte uses a file descriptor with 8 direct block address. 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of

1.3KB

2.34KB

3.35KB

4.21KB


Question: A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because

1.It reduces the memory access time to read or write a memory location

2.It helps to reduce the size of page table needed to implement the virtual a

3.It is required by the translation lookaside buffer

4. It helps to reduce the number of page faults in page replacement algorithm


Question: A process executes the code fork(); fork(); fork(); The total number of child processes created is

1.3

2.4

3.5

4.7


Question: A state is safe if the system call allocate resources to each process(upto its maximum) in same order and still avoid deadlock. Then

1.deadlock state is safe

2.unsafe state may lead deadlock situation

3.deadlock state is subset of unsafe state

4.All of the above


Question: A system has 3 processes sharing 4 resources. If a each process need maximum of 2 units, then

1.deadlock can never occur

2.deadlock may occur

3.deadlock has to occur

4.None of the above


Question: A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 100 distinct pages in some order and then accesses the same 100 pages

1.196

2.197

3.123

4.234


Question: A thread -

1.is a light weight process where the context switching is low

2.is a light weight process where the context switching is high

3.is used to speed up paging

4.None of the above


Question: A threads is a

1.Heavy weight process

2.multi process

3.inter-tread process

4.light weight process


Question: At particular time of computation the value of a counting semaphore in 7. Then 20P operation and X V operation were performed on this semaphore. If the final value of semaphore is 5, X will be -

1.22

2.18

3.15

4.13


Question: At particular time, the value of a counting semaphore is 10. It will become 7 after

1.3V operation

2.3P operation

3.13 P operation and 10 V operation

4.2 and 3


Question: At particular time, the value of a counting semaphore is 10. It will become 9 after

1.1P operation

2.1V operation

3.2P operation and 3V operation

4.1 and 3


Question: At particular time, the value of a counting semaphore is 4. It will become 7 after

1.3V operation

2.3P operation

3.13 P operation and 10 V operation

4.All of the above


Question: Banker algorithms is a example of

1.deadlock avoidance

2.deadlock prevention

3.deadlock detection and prevention

4.All of the above


Question: Consider a disk system with 100 cylinders. The requests to access the cylinders occur in following sequence: 4, 34, 10, 7, 19, 73, 2, 15, 6, 20 Assuming that the head is currently at cylinder 50, wh

1.190ms

2.256ms

3.119ms

4.341ms


Question: Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size is 4KB, what is the approximate size of the page table?

1.2 MB

2.12 MB

3.16 MB

4.8 MB


Question: Consider a virtual memory system with FIFO page replacement policy. For an arbitrary page access pattern, increasing the number of page frames in main memory will

1. Always decrease the number of page faults

2. Always increase the number of page faults

3.Some times increase the number of page faults

4.Never affect the number of page faults


Question: Consider The following statements with respect to user clever threads and kernel supported threads: a. context switch is faster with kernel supported threads b. for user level threads, a system call

1.a,c,d

2.b,c

3.a,c

4.a,b


Question: 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 s

1.1

2.2

3.3

4.4


Question: FIFO scheduling is :-

1.Preemptive scheduling

2.Non preemptive scheduling

3.deadline scheduling

4.fare share scheduling


Question: Function of operating system :-

1.resource utilization

2.resource allocation

3.file management

4.All of the above


Question: If a process require a input/output then process goes to

1.ready state

2.running state

3.waiting state

4.none of the above


Question: In real time operating system,which of the following is the most suitable scheduling algorithms

1.Round-robin

2.FCFS

3.preemptive

4.Random


Question: In round-robin CPU scheduling, as the time quantum is increased , the average turn around time

1.increase

2.decrease

3.remain constant

4.varies irreguraly


Question: In time sharing system, when time slot given to a process is compared, the process goes from the running state to the

1.Blocked state

2.Dead state

3.Suspended state

4.Terminated state


Question: In which one of the following page replacement policies, Belady’s anomaly may occur?

1.FIFO

2.Optimal

3.LRU

4.MRU


Question: In which state, a process goes to the CPU

1.New

2.Running

3.Waiting

4.Ready


Question: Method of handling deadlock ?

1.deadlock avoidance

2.deadlock prevention

3.deadlock detection and prevention

4.All of the above


Question: Mutual exclusion is a problem occurs between

1.two disjoint process that do not interact

2.processes that share resources

3.processes that do not use the some resources

4.None of the above


Question: Necessary condition for deadlock

1.Mutual exclusion

2.Hold and wait

3.No preemption and circular wait

4.All of the above


Question: Preemptive scheduling is the strategy of temporarily suspending a running process

1.before the CPU time slice expires

2.to allow starving process to run

3.when it request I/O

4.None of the above


Question: Processes wait for infinite time in

1.Deadlock

2.starvation

3.Both of the above

4.None of the above


Question: Resources are allocated to a process on non-shareable basic in

1.Mutual exclusion

2.Hold and wait

3.No preemption

4.circular wait


Question: Round-robin scheduling is essentially the preemptive version of :-

1.FIFO

2.Shortest job first

3.shortest remaining time first

4.longest time first


Question: Supervisor call :-

1.is a call made by the supervisor of the system

2.is a call with a control functions

3.are pixilated calls that are used to perform resource management functions

4.in a call made by someone working in root directory


Question: The essential content(s) in each entry of a page table is / are

1.Virtual page number

2.Page frame number

3.Both of the above

4.None of the above


Question: The method of dealing with deadlock problem is

1.use a protocol to make sure that the system never enters to a deadlock stat

2.allow a system to enter a deadlock state and increases

3.ignore the problem and pretend that deadlocks never occur

4.All of the above


Question: Total number of child processes created by following program is for(i=0;i<1;i++) fork();

1.7

2.2

3.0

4.1


Question: Total number of child processes created by following program is for(i=0;i<3;i++) fork();

1.3

2.0

3.7

4.6


Question: Total number of child processes created by following program is for(i=0;i<4;i++) fork();

1.15

2.4

3.7

4.1


Question: Total number of child processes created by following program is x for(i=0;i<8;i++) fork(); then x-250= ?

1.5

2.0

3.6

4.1


Question: Value of Counting semaphore is -

1.0 or 1

2.7

3.Natural number

4.All of the above


Question: Which of the following is NOT a valid deadlock prevention scheme?

1.Release all resources before requesting a new resource

2.Number the resources uniquely and never request a lower numbered resource t

3.Never request a resource after releasing any resource

4.Request and all required resources be allocated before execution


Question: Which of the following requires a device driver?

1.Disk

2.Cache

3.Main memory

4.Register


Question: Which of the following statements are true?

1.value of binary semaphore is a subset of value of counting semaphore

2.counting semaphore is a subset of binary semaphore

3.binary semaphore contain only 0 or 1

4.1 and 3 are true


Question: Which of the following statements is true? 1. Shortest remaining time first scheduling may cause starvation 2.Preemptive scheduling may cause starvation 3. Round robin is better than FCFS in terms

1.1 only

2.1 and 3

3.2 and 3

4.1,2 and 3


Question: which one is a high level abstraction over semaphore ?

1.shared memory

2.message passing

3.monitor

4.mutual exclusion


Question: With a single resource, deadlock occurs

1.if there are more than one processes competing for that resources

2.if there are only two processes competing for that resources

3.if there is a single processes competing for that resources

4.None of the above


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!