15
Unit-I 1) Which of the following is responsible for the management and coordination of activities and sharing of resources of computer A)Application Software B) Mother Board C) Operating System D) RAM Ans: C 2) When a computer is first turned on or restarted, a special type of absolute loader is executed, called a A) Compile and Go loader B) Boot loader C) Bootstrap loader D) Relating loader Ans: C 3) Which of the following is not a part of operating system? A) supervisor B) performance monitor C) job-control program D) input/output control program Ans: B 4) Moving Process from main memory to disk is called A) scheduling B) caching C) swapping D) spooling Ans: C 5) Interval between the time of submission and completion of the job is called A) Waiting time B) Turnaround time C) Throughput D) Response time Ans: B 6) A scheduler which selects processes from secondary storage device is called A) Short term scheduler B) Long term scheduler C) Medium term scheduler D) Process scheduleR

Objective Questions 1&2units

Embed Size (px)

DESCRIPTION

OS bits

Citation preview

Unit-I1) Which of the following is responsible for the management and coordination of activities and sharing of resources of computer

A)Application SoftwareB) Mother Board C) Operating System D) RAMAns: C

2) When a computer is first turned on or restarted, a special type of absolute loader is executed, called a

A) Compile and Go loader

B) Boot loader C) Bootstrap loader D) Relating loader

Ans: C

3) Which of the following is not a part of operating system?

A) supervisorB) performance monitorC) job-control program D) input/output control program

Ans: B

4) Moving Process from main memory to disk is called

A) scheduling B) cachingC) swapping D) spooling

Ans: C

5) Interval between the time of submission and completion of the job is called

A) Waiting time B) Turnaround time C) Throughput D) Response time

Ans: B

6) A scheduler which selects processes from secondary storage device is called

A) Short term scheduler B) Long term scheduler

C) Medium term scheduler

D) Process scheduleRAns: C

7) Jobs which are admitted to the system for processing is called

A) long-term scheduling B) short-term scheduling

C) medium-term scheduling D) queuing

Ans: A

8) The scheduling in which CPU is allocated to the process with least CPU-burst time is called

A) Priority Scheduling B) Shortest job first Scheduling

C) Round Robin Scheduling D) Multilevel Queue Scheduling

Ans: B

9) Program preemption is

A) Forced de allocation of the CPU from a program which is executing on the CPU.

B) Release of CPU by the program after completing its task.

C) Forced allotment of CPU by a program to itself.

D) A program terminating itself due to detection of an error.

Ans: A

10) Throughput of a system is

A) Number of programs processed by it per unit time

B) Number of times the program is invoked by the system

C) Number of requests made to a program by the systemD) Number of system calls invoked in a programAns: A

11) In interactive environments such as time-sharing systems, the primary requirement is to provide reasonably good response time and in general, to share system resources equitably. In such situations, the scheduling algorithm that is most popularly applied is ________.

A) Shortest-job First B) Elevator C) Round-RobinD) First-Come-First-Serve.

Ans: C

12) Which of the following is not a fundamental process state

A) ready B) terminated C) executing D) blockedAns: D

13) Which amongst the following is not an advantage of Distributed systems?

A)Reliability B)Incremental growth C)Resource sharing D)availability

Ans: A

14) The turn-around time of a user job is the

A) time since its submission to the time its results become available

B) time duration for which the CPU is allotted to the job

C) total time taken to execute the job

D) time taken for the job to move from assembly phase to completion phase.

Ans: C

15) The Occurrence of event is usually signaled by

A) boot strap program B) Interrupt C) RAM D) Linker

Ans: B

16) If Round Robin is used with a time quantum of 1 second, the turnaround time for Job 2 will be

A) 1 second B) 2 seconds C)1 hour D) 1 hour, 1 secondAns: B

17) For multiprogramming systems, most UNIX operating systems use

A) semaphoreB) demand paging C) monitorD) bounded waitAns: B

18) Process State is a part of

A) Process Control block B) Inode C) File Allocation Table D) Segmentation table

Ans : A

19) The kernel keeps track of the state of each task by using a data structure called __

A) Process control block B) User control block C) Memory control blockD) File Control blockAns : A

20) In a multithreaded environment _______.

A) Each thread is allocated with new memory from main memory.

B Main thread terminates after the termination of child threads.

C) Every process can have only one thread.

D) child thread terminates after main threadAns: B

21) CPU Scheduling is the basis of _________ operating system

A)Batch

B) Real time

C)Multiprogramming

D)Mono-programming Ans: C

22) A major problem with priority scheduling is _________.

A )Definite blocking

B )Starvation

C )Low priority

D) hi priorityAns: B

23) Saving the state of the old process and loading the saved state of the new process is called ________.

A) Context Switch

B) State

C) Multi programming

D) SYSGENAns : A

24) In Priority Scheduling a priority number (integer) is associated with each process. The CPU is allocated to the process with the highest priority (smallest integer = highest priority). The problem of, Starvation ? low priority processes may never execute, is resolved by __________.

A) Terminating the process.

B) Aging

C) Mutual Exclusion

D) Semaphore Ans : B

25) Which of the following is not a model of multithreading

A) Many-to-one

B) One-to-one

C) Many-to-many

D)One-to-ManyAns:D

26) Which system call is used to create a separate, duplicate process?

A) fork()

B) exec()

C)clone()

D) dup()

Ans: A

27) Communication between the user thread library and the kernel is known as

A) Signal handling

B) Scheduler activation

C) Multithreading

D) SynchronizationAns: B

28) Which one among the following is not a function of OS?A) Resource allocation

B) Accounting

C) Debugging

D) Protection & security

Ans: C

29) ..Provides an interface to sevice made available by an OS.A) Interrrupts

B) Systemcalls

C) I/O devices

D) System bus

Ans: B

30) As the process enters the system it is put intoA) Ready queue

B) Job queue

C) Processor

D) I/O queue

Ans: B

31) Contextext switching is the function of

A) Dispatcher

B) Processor

C) Interrupt handler

D) RAM

Ans: A

32) Load balancing approches involve

A) Only Push migration

B) Only pull migration

C) Push and pull migration

D) No push and pull migration

Ans: C

33) Many systems implementing the many-to-many or two-level model place the following intermediated data structure between the user and kernel threads.A) KUPB) LWD

C) UKD

D) LWP

Ans: D

34) Idea behind thread pool is.A) Create number of threads at and wait for work

B) Create number of threads once the request are arrived

C) Create each thread separately for each request

D) Create a single thread for bulk of requests

Ans: A

35) Scheduling algorithm evaluation doesnt involveA) Deterministic modeling

B) Queuing modeling

C) Simulations

D) Swapping

Ans: D

36) Benefit of multithreadingA) Responsiveness

B) Accounting

C) Ability to evolve

D) SchedulingAns: A

37) When the process is interrupted in changes the state asA) Ready to running

B) Running to terminated

C) Running to waiting

D) Running to ready

Ans: D

38) Number of types of schedulersA) 2

B) 3

C) 4

D) 5

Ans: B

39) Time from submission of a request until the first response is producedA) Turnaround time

B) Waiting time

C) Response time

D) Throughput

Ans: C

40) In LINUX clone() is invoked

A) To create parent process

B) To provide how much sharing is to take place between parent and child

C) Not to provide any sharing between parent and child

D) Child should not access parent data

Ans: B

UNIT-II1) Mutual exclusion

A) if one process is in a critical region others are excluded

B) prevents deadlock

C) requires semaphores to implement

D) is found only in the Windows NT operating system

Ans: A

2) The section of code which accesses shared variables is called as __________.

A) Critical section

B) Block

C) Procedure

D) SemaphoreAns: A

3) In one of the deadlock prevention methods, impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. This voilates the _______________ condition of deadlock

A) Mutual exclusion

B) Hold and Wait

C) Circular Wait

D) No Preemption

Ans:C

4) Semaphore can be used for solving __________.

A) Wait & signal

B) Deadlock

C) Synchronization

D) Priority

Ans: C

5) The necessary condition before the deadlock can occurA) No Mutual exclusion,Hold and wait, preemption, circular wait

B) Mutual exclusion,no Hold and wait, preemption, circular waitC) Mutual exclusion,Hold and wait, no preemption, circular waitD) Mutual exclusion,Hold and wait, preemption, no circular waitAns: C

6) Let S and Q be two semaphores initialized to 1, where P0 and P1 processes the following statements wait(S);wait(Q); ---; signal(S);signal(Q) and wait(Q); wait(S);---;signal(Q);signal(S); respectively. The above situation depicts a _________ .

A) Semaphore

B) Deadlock

C) Signal

D) Interrupt

Ans: B

7) The solution to Critical Section Problem is : Mutual Exclusion, Progress and Bounded Waiting.

A) The statement is false

B) The statement is true.

C) The statement is contradictory.

D) Not related to the statementAns: B

8) _________ is the situation in which a process is waiting on another process, which is also waiting on another process ... which is waiting on the first process. None of the processes involved in this circular wait are making progress.

A) Deadlock

B) Starvation

C) Dormant

D) SynchronizationAns: A

9) The Bankers algorithm is used

A) to prevent deadlock in OSB) to detect deadlock in OSC) to rectify a deadlocked state

D) to avoid deadlock in OSAns: D

10) _____ is a high level abstraction over Semaphore.

A) Shared memory

B) Message passing

C) Monitor

D) Mutual exclusion

Ans: C

11) A binary semaphore

A) has the values one or zero

B) is essential to binary computers

C) is used only for synchronisation

D) is used only for mutual exclusion

Ans : A

12) A process said to be in ___________ state if it was waiting for an event that will never occur.

A) Safe

B) Unsafe

C) Starvation

D) Dead lock

Ans : D

13) Which process can affect of be affected by other processes executing in the system?

A) cooperating process

B) child process

C) parent process

D) init processAns: A

14) When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called

A) dynamic condition

B) race condition

C) essential condition

D) critical conditionAns: B

15) If a process is executing in its critical section, then no other processes can be executing in their critical section. This condition is called

A) mutual exclusion

B) critical exclusion

C) synchronous exclusion

D) asynchronous exclusionAns: A

16) Which one of the following is a synchronization tool?

A) thread

B) pipe

C) semaphore

D) socketAns: C

17) A semaphore is a shared integer variable

A) that cannot drop below zero

B) that cannot be more than zero

C) that cannot drop below one

D) that cannot be more than oneAns: A

18) The circular wait condition can be prevented by

A) defining a linear ordering of resource types

B) using thread

C) using pipes

D) Using threads and pipes togetherAns: A

19) Which one of the following is the deadlock avoidance algorithm?

A) bankers algorithm

B) round-robin algorithm

C) elevator algorithm

D) karns algorithmAns: A

20) A problem encountered in multitasking when a process is perpetually denied necessary resources is called

A) deadlock

B) starvation

C) inversion

D) agingAns: B

21) Which one of the following is a visual ( mathematical ) way to determine the deadlock occurrence?

A) resource allocation graph

B) starvation graph

C) inversion graph

D) Bankers mentionedAns: A

22) To avoid deadlock

A) resource allocation must be done only once

B) all deadlocked processes must be aborted

C) inversion technique can be usedD) there must be a fixed number of resources to allocate

Ans: D

23) The request and release of resources are ___________.

A) command line statements

B) interrupts

C) system calls

D) special programsAns: C

24) For a deadlock to arise, which of the following is not the necessary conditionA) Mutual exclusion

B) Starvation

C) No preemption

D) Circular waitAns: B

25) For a Hold and wait condition to prevail :

A) A process must be not be holding a resource, but waiting for one to be freed, and then request to acquire it

B) A process must be holding at least one resource and waiting to acquire additional resources that are being held by other processes

C) A process must hold at least one resource and not be waiting to acquire additional resources

D) Process must not hold any resourceAns: B

26) Deadlock prevention is a set of methods :

A) to ensure that at least one of the necessary conditions cannot hold

B) to ensure that all of the necessary conditions do not hold

C) to decide if the requested resources for a process have to be given or not

D) to recover from a deadlockAns: A

27) For non sharable resources like a printer, mutual exclusion :

A) must exist

B) must not exist

C) may exist

D) may not existAns: A

28) To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it :

A) then the process waits for the resources be allocated to it

B) the process keeps sending requests until the resource is allocated to it

C) the process resumes execution without the resource being allocated to it

D) then all resources currently being held are preemptedAns: D

29) Given a priori information about the ________ number of resources of each type that maybe requested for each process, it is possible to construct an algorithm that ensures that the system will never enter a deadlock state.

A) minimum

B) average

C) maximum

D) approximateAns: C

30) A deadlock avoidance algorithm dynamically examines the __________, to ensure that a circular wait condition can never exist.

A) resource allocation state

B) system storage state

C) operating system

D) resourcesAns: A

31) A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.

Process

P0

P1

P2

Maximum needs (process-wise : P0 through P2 top to bottom)

10

4

9

Currently allocated (process-wise)

5

2

2

Which of the following sequence is a safe sequence ?

A) P0, P1, P2

B) P1, P2, P0

C) P2, P0, P1

D) P1, P0, P2Ans: D

32) The content of the matrix Need is :

A) Allocation Available

B) Max Available

C) Max Allocation

D) Allocation MaxAns: C

33) A system with 5 processes P0 through P4 and three resource types A, B, C has A with 10 instances, B with 5 instances, and C with 7 instances. At time t0, the following snapshot has been taken :

Process

P0

P1

P2

P3

P4

Allocation (process-wise : P0 through P4 top to bottom)

A B C

0 1 0

2 0 0

3 0 2

2 1 1

0 0 2

Max (process-wise : P0 through P4 top to bottom)

A B C

7 5 3

3 2 2

9 0 2

2 2 2

4 3 3

Available

A B C

3 3 2

The sequence leads the system to :

A) an unsafe state

B) a safe state

C) a protected stateD) a deadlockAns: B

34) An edge from process Pi to Pj in a wait for graph indicates that :

A) Pi is waiting for Pj to release a resource that Pi needs

B) Pj is waiting for Pi to release a resource that Pj needs

C) Pi is waiting for Pj to leave the system

D) Pj is waiting for Pi to leave the systemAns: A

35) 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) 2

B) 3

C) 4D) 1Ans: A

36) If we preempt a resource from a process, the process cannot continue with its normal execution and it must be :

A) aborted

B) rolled back

C) terminatedD) queuedAns: B

37) If the resources are always preempted from the same process, __________ can occur.

A) deadlock

B) system crash

C) agingD) starvationAns: D

38) Semaphore is a/an _______ to solve the critical section problem.

A) hardware for a system

B) special program for a system

C) integer variable

D) system callAns: C

39) The main disadvantage of spinlocks is that :

A) they are not sufficient for many process

B) they require busy waiting

C) they are unreliable sometimesD) they are too complex for programmersAns: B

40) The dining philosophers problem will occur in case of :

A) 5 philosophers and 5 chopsticks

B) 4 philosophers and 5 chopsticks

C) 3 philosophers and 5 chopsticksD) 6 philosophers and 5 chopsticksAns: A

Prepared byName of the Faculty: Sheena MohammedDesignation

: Assistant ProfessorDepartment

: Computer Science and Engineering