Anda di halaman 1dari 13

` Operating System Questions & Answers – Basics

Multipal choie Questions

1.What is operating system?


a) collection of programs that manages hardware resources
b) system service provider to the application programs
c) link to interface the hardware and application programs
d) all of the mentioned
Answer:d

2. To access the services of operating system, the interface is provided by


the
a) system calls
b) API
c) library
d) assembly instructions
Answer:a

3. Which one of the following is not true?


a) kernel is the program that constitutes the central core of the
operating system
b) kernel is the first part of operating system to load into memory during
booting
c) kernel is made of various modules which can not be loaded in running
operating system
d) kernel remains in the memory during the entire computer session
Answer:c

4. Which one of the following error will be handle by the operating system?
a) power failure
b) lack of paper in printer
c) connection failure in the network
d) all of the mentioned
Answer:d

5. The main function of the command interpreter is


a) to get and execute the next user-specified command
b) to provide the interface between the API and application program
c) to handle the files in operating system
d) none of the mentioned
Answer:a

6. By operating system, the resource management can be done via


a) time division multiplexing
b) space division multiplexing
c) both (a) and (b)
d) none of the mentioned
Answer:c

7. If a process fails, most operating system write the error information to


a
a) log file
b) another running process
c) new file
d) none of the mentioned
Answer:a

8. Which facility dynamically adds probes to a running system, both in user


processes and in the kernel?
a) DTrace
b) DLocate
c) DMap
d) DAdd
Answer:a

9. Which one of the following is not a real time operating system?


a) VxWorks
b) Windows CE
c) RTLinux
d) Palm OS
Answer:d

10. The OS X has


a) monolithic kernel
b) hybrid kernel
c) microkernel
d) monolithic kernel with modules
Answer:b

11) The disadvantage of real addressing mode is :


a) there is a lot of cost involved
b) time consumption overhead
c) absence of memory protection between processes
d) restricted access to memory locations by processes
Answer : c

12) Preemptive, priority based scheduling guarantees :


a) hard real time functionality
b) soft real time functionality
c) protection of memory
d) None of these
Answer : b

13) Real time systems must have :


a) preemptive kernels
b) non preemptive kernels
c) a or b
d) neither a nor b
Answer : a

14) Event latency is :


a) the amount of time an event takes to occur from when the system started
b) the amount of time from the event occurance till the system stops
c) the amount of time from event occurance till the event crashes
d) the amount of time that elapses from when an event occurs to when it is
serviced.
Answer : d

15) Interrupt latency refers to the period of time :


a) from the occurance of an event to the arrival of an interrupt
b) from the occurance of an event to the servicing of an interrupt
c) from arrival of an interrupt to the start of the interrupt service
routine
d) None of these
Answer : c

16) Real time systems need to __________ the interrupt latency.


a) minimize
b) maximize
c) not bother about
d) None of these
Answer : a

17) The amount of time required for the scheduling dispatcher to stop one
process and start another is known as ______________.
a) event latency
b) interrupt latency
c) dispatch latency
d) context switch
Answer : c

18) The most effective technique to keep dispatch latency low is to :


a) provide non preemptive kernels
b) provide preemptive kernels
c) make it user programmed
d) run less number of processes at a time
Answer : b

19) Priority inversion is solved by use of _____________.


a) priority inheritance protocol
b) two phase lock protocol
c) time protocol
d) All of these
Answer : a

20.Which of the following statement about operating systems is correct?

I. Operating system is not the interface between user and computer.


II. The batch systems used in the second generation of operating
systems allow several user jobs to be in the primary memory of a computer
system at any given time.
III. An interactive operate system provides on-line communication
between the user and the system.
IV. In a real-time operating system response time is not a key issue.

(a) Only (I) above (b) (I), (III) and


(IV) above
(c) Both (II) and (III) above (d) Both (I) and
(III) above
(e) (I), (II), and (IV) above.
Answer : (c)

21.Which of the following statement(s) about operating system is/are


correct?

I. It manages the computer’s resources.


II. Some operating systems distinguish between upper case and lower
case letters in naming files.
III. MS-Office is an operating system.
IV. The operating system can be viewed as a virtual machine, which runs
on top of the computer hardware.

(a) Only (I) above (b) Only (II) above


(c) Only (III) above
(d) Only (IV) above (e) (I), (II) and
(IV) above.
Answer : (e)

22. In the Unix file system:


(a) Directories and ordinary files are arranged in a hierarchical tree
structure
(b) Files can be accessed only by using its absolute path name
(c) A file cannot have many extensions
(d) A directory entry cannot contain a pointer to the file’s inode
(e) ./usr/passwd and /usr/passwd represent two different files.
Answer : (a)

23.Suppose we have a logical address space of 64 pages of 1024 words each,


mapped onto a physical memory of 256 frames. How many bits are there in
the logical address?
(a) 15 (b) 16 (c) 17
(d) 18 (e) 19.
Answer : (b)

24.Which of the following is not a necessary condition for deadlock to


occur?
(a) Mutual exclusion
(b) Hold and wait (c) Wait and signal
(d) Circular wait (e) Hold.
Answer : (c)

25.Suppose a system has six equivalent tape drives. Three concurrent


processes P1,
P2 and P3 require three, two and four of these tape drives, respectively,
to complete their execution. At a given instance two, one and one of these
tape drives are allocated to these processes P1, P2 and P3 respectively.
Which of the following allocations will bring the system to an unsafe
state?

(a) Allocating one tape drive to process P1


(b) Allocating one tape drive to process P2
(c) Allocating one tape drive to process P3
(d) allocating two tape drives to process P3
(e) Allocating one tape drive to P1 and another one to P3.
Answer : (d)

26.A system suffering from an excessive number of page faults is said to be


(a) Crashing (b) Hashing (c) Trashing
(d) Thrashing (e) Bashing.
Answer : (d)

27.A process P consists of five pages P1, P2, P3, P4, and P5, but the
operating system allows it only THREE page-frames. During its lifetime the
process references its pages in the order P1, P2, P3, P2, P1, P4, P1, P5.
If the memory management policy is LFU (Least Frequently Used, with FIFO
used to decide ties), which page will be replaced to make room for P5?
(a) P1 (b) P2 (c) P3
(d) P4 (e) P5.
Answer : (d)

28.The critical section problem can be solved in numerous ways. What


statement is not true?
(a) A test-and-set-lock (TSL) approach is known as a 'busy-wait' solution
(b) A 'busy-wait' solution is good for short duration critical sections
(c) When a binary semaphore is used and when SLEEP() is called the
calling process goes into 'ready-to -run' mode
(d) Monitors are more secure than less problematic than semaphores
(e) All tools used to implement CS solutions must have atomic operations.
Answer : (c)
29.A light weight process (LWP) is supported by a single kernel space
thread, and it in turn supports several user space threads, belonging to a
single user task. Which statement is true?

(I) The user task is made to be multithreaded in order to make it more


efficient.
(II) Only kernel space threads can utilize multiple CPU’s power.
(III) If a user space thread blocks due to an I/O operation, the whole
user task blocks.
(IV) Kernel space threads have higher context switching overhead than user
space threads.

(a) (I), (II) and (IV) are only true (b) (I), (II) and
(III) are only true
(c) None is true (d) All are true
(e) (I) and (IV) are only true.
Answer : (a)

30.Three non-preemptive jobs J1, J2, J3 are waiting to be run. Their


expected processor times are 6, 3 and 5 time units respectively. In which
order should they be run to minimize the average response time?
(a) J1, J2, J3 (b) J1, J3, J2 (c) J2, J3, J1
(d) J2, J1, J3 (e) J3, J2, J1.
Answer : (c)

31.The arrival times of four pre-emptive processes P1, P2, P3 and P4 to the
‘ready to run’ queue and their expected PROCESSOR times are given in the
following table.
Process
Arrival Time
Expected PROCESSOR Time
P1
0
6
P2
1
4
P3
2
8
P4
3
5
If these processes are scheduled by using the pre-emptive Shortest-Job-
First scheduling algorithm, what would be the possible sequence/sequences
of their execution?
(a) P1, P2, P3, P4 (b) P1, P2, P4, P1, P3
(c) P1, P2, P3, P4, P3
(d) P1, P2, P1, P3, P4
(e) P1, P3, P2, P4, P3.
Answer : (b)

32.If /usr/etc/sunos/utils/emacs and utils/emacs denote the same file, what


is the current directory?
(a) / (b) sunos (c) /usr/etc
(d) emacs (e) //.
Answer : (b)

33.let the waiting time of a process for the CPU be the total time the
process waiting in the ready to run queue. Three pre-emptive processes P1,
P2, P3 are in the ready to run queue at time 0. P1 is at the head of the
queue and P3 is at the tail. The expected CPU time for these processes P1,
P2, P3 are 24, 3 and 3 time units respectively. If the PROCESSOR time
quantum given for a process to use the CPU continuously is 4 time units,
what is the average waiting time for a process if the processes are
scheduled using the Round-Robin scheduling algorithm?
(a) 2 time units (b) 9 time units
(c) 5.66 time units
(d) 8.66 time units (e) 3.66 time units.
Answer : (c)

34.Consider a swapping system in which memory consists of the following


hole sizes 10K, 4K, 16K, 2K, 11Kbytes. Which holes are taken for the
successive segment requests of 12K, 10K and 9K if the best fit algorithm
(a) 14K, 16K, 11K (b) 14K, 10K, 11K
(c) 16K, 14K, 11K
(d) 16K, 11K, 14K (e) 10K,14K,16K.
Answer : (b)

35.What is not the major objective of operating systems?


(a) To act as a resource manager for multiple tasks running on the CPU,
the memory and disk resources
(b) To provide a programming interface to the user
(c) To act as an uniform abstract machine on top of a variety of
different hardware platforms
(d) To act as a File server to client machines requiring such service
(e) To enable loading and execution of binary code with minimum
intervention by the user.
Answer : (d)

36.Which of the following statements comparing the context of a thread with


that of a process is true?
(a) Two processes will share any context; two threads of a same process
will only share the data and the code (text) areas of the context
(b) Two processes will not share any context; two threads of a same
process will share the data, code (text) and the stack areas of the context
(c) Two processes will share the data and the code (text) areas of the
user context; two threads of a same process will only share the register
context
(d) The overhead involved in context switching for processor is much
higher than that for threads
(e) The overhead involved in context switching for threads is much higher
than that for processes.
Answer : (d)

37.A certain task is multithreaded in such a way that it is supported by


two kernel threads where each kernel thread is supporting more than one
user thread. Which of the following statement is not true about this
scenario?
(a) The task can utilize the combined power of more than one CPU, if CPUs
are available
(b) If a user thread makes a blocking system call, the corresponding
kernel thread blocks but the task is still able to continue through the
remaining kernel thread
(c) The task could have been programmed using a thread library such as
POSIX threads or Java threads
(d) If a user thread makes a blocking system call, the corresponding
kernel thread blocks and the task will also be blocked
(e) Kernel threads capability needs to be built into the operating
system, and cannot be provided by a system call library.
Answer : (d)
38.One needs a good practical example of a “producer-consumer” type problem
from among the following.
(I) A multithreaded audio server, where a thread writes digitized sound
into a circular buffer and another thread reads it over to a web page.
(II) a printer spooler where files are spooled on to the printer queue,
to be taken and printed by the printer driver.
(III) a shared data base updated by simultaneous queries.

Which of the following is/are true of such a good practical example?


(a) Only (I) is true (b) Only (II) is
true (c) Both (I) and (III) are true
(d) Both (I) and (II) above (e) All are true.
Answer : (d)

39.Demand paging and swapping are two widely used memory management
techniques. Which of the following statements is not true in this regard?
(a) Moving the whole user context of a process between the main memory
and the virtual memory is known as swapping
(b) Moving pages corresponding to the user context of a process between
the main memory and the virtual memory as and when required is known as
demand paging
(c) Demand paging incurs a higher overhead than swapping
(d) If both demand paging and swapping are implemented by the memory
management system, the default mechanism resorted to is demand paging
(e) When the system’s main memory space becomes comparatively smaller
than the space required to run its applications, swapping activity becomes
more visible.
Answer : (c)

40.Which of the following can be said about a segmentation fault caused


when a process is active?
(a) It will recover from the fault transparently to the user, by moving
the required page from the secondary memory
(b) The fault’s cause may most likely be an error in programming
(c) It will not abruptly terminate the process and a core image of the
process will be saved for further observations
(d) It will cause the process to go into the ‘blocked’ state
(e) It will most likely be caused by a hardware fault.
Answer : (b)

41.A common programming construct for implementing mutual exclusion which


uses condition variables is called
(a) Semaphore (b) Deadlock
(c) Monitor
(d) Locking interrupts (e) Threads.
Answer : (c)

42.Suppose requests have recently arrived for data on cylinders 25, 46, 12,
and 3, in that order, and that the read-write head is currently at cylinder
20. If the disk scheduling policy is SSTF, the outstanding requests will
be serviced in the order
(a) 25, 46, 12, 3 (b) 25, 46, 3, 12
(c) 3, 12, 25, 46
(d) 25, 12, 3, 46 (e) 12,3,25,46.
Answer : (d)

43.DMA stands for


(a) Direct Management access (b) Direct memory access
(c) Dual memory access (d) Data memory access
(e) Dual memory array.
Answer : (b)

44.Which of the following disk-scheduling methods is most likely to lead to


starvation for requests on inner or outer cylinders?
(a) FCFS (b) SSTF (c) SCAN
(d) C-SCAN (e) b-SCAN.
Answer : (b)

45.Which of the following is in correct order of size, smallest first?


(a) Cylinder, track, sector (b) Cylinder, sector,
track
(c) Sector, track, cylinder (d) Sector, cylinder,
track
(e) Track, cylinder, sector.
Answer : (c)

46.A process that executes a READ instruction for a data record currently
on disk will undergo a process state transition from
(a) Ready to blocked
(b) Running to blocked (c) Blocked to ready
(d) Blocked to running (e) Terminated.
Answer : (b)

47.In a certain system, process A has just arrived at time 0, process B at


time 3, and process C at time 6. A needs 5 seconds in the CPU, B 3
seconds, and C 1 second. All processes are totally CPU-bound and process-
switching time is negligible, so that after 9 seconds all processes have
completed. At what time does process B complete if the process-scheduling
algorithm is preemptive SJF and the quantum is 1 second?
(a) 6 (b) 7 (c) 8
(d) 9 (e) 10.
Answer : (d)

48.If the value of a binary semaphore S is 0, and a process executes a WAIT


instruction on S, then
(a) S will remain zero and the process will proceed
(b) S will remain zero and the process will be placed on a queue
(c) S will become one and the process will proceed
(d) S will become one and the process will be placed on a queue
(e) S will become -1 and the process will not be placed on a queue.
Answer : (b)

49.The process of collecting fragments of available memory space into


contiguous blocks by moving programs and data in a computer's memory or
disk is known as
(a) Compaction (b) Coalescing (c) Segmentation (d)
Fragmentation (e) Paging.
Answer : (a)

50.Which of the following controls all the computer resources and provides
the base upon which the application programs can be written?
(a) Application Software (b) C.P.U
(c) Operating System
(d) Bare Hardware (e) Device Drivers.
Answer : (c)

51.Which of the following system call loads a process into memory?


(a) Load (b) Create (c) Fork
(d) Execv (e) Copy.
Answer : (a)
52.Expand the term UNICS
(a) Uniplexed Information Computing System
(b) Unipoint Information Computing System
(c) Uniplexed Instruction Computing System
(d) Unipoint Instruction Computing System
(e) Union Instruction Common System.
Answer : (a)

53.Which of the following software layer is used between the kernel and the
user computations in the network O.S?
(a) Local O.S (b) Network O.S
(c) Global O.S
(d) Distributed O.S (e) Remote O.S.
Answer : (b)

54.Which of the following allows many users to share the computer


simultaneously?
(a) Time Sharing O.S
(b) Real Time O.S
(c) Interactive O.S (d) Batch O.S
(e) Network O.S.
Answer : (a)

55.If a program is under execution by CPU then we say the process is under
(a) CPU Burst (b) Process
(c) I/O Burst
(d) Ready Queue (e) New State.
Answer : (a)

56.Each process is represented in the operating system by its own


(a) Thread (b) PCB (c) State
(d) Instructions (e) PCC.
Answer : (b)

57.The amount of time that a job waits in a ready queue for getting
selected by CPU is called
(a) Turn around time
(b) Waiting time (c) Completion time
(d) Submission time
(e) Throughput.
Answer : (b)

58.The process of storing and restoring from PCB is called


(a) Loading (b) Relocation
(c) Dispatcher
(d) Process (e) context switch.
Answer : (e)

59.Which of the following memory management scheme loads all pages of a


program from disk into main memory?
(a) Paging (b) Demand paging
(c) Segmentation (d) Segmentation with
paging
(e) Demand segmentation.
Answer : (a)

60.Which of the following page replacement algorithm use the technique of


replace that page which is not used in the near future?
(a) LRU (b) LFU (c) ORA
(d) FIFO (e) MFU.
Answer : (c)
61.The set of pages that a process is currently using is called as
(a) Program (b) Page Group
(c) Working Group
(d) Working Set (e) None of the
above.
Answer : (d)

62.Which of the following registers contains starting address of the


program in the main memory?
(a) Address register (b) Base register
(c) GPR
(d) Index register (e) Limit register.
Answer : (b)

63.The process of converting logical address into physical address is known


as
(a) Conversion (b) Displacement
(c) Relocation
(d) Transfer (e) None of the
above.
Answer : (c)

64.In a segmentation scheme the logical memory will be divided into


(a) Pages (b) Frames (c) Blocks
(d) Cells (e) Segments.
Answer : (e)

65.Which of the following area is used to store the O.S programs in the
main memory?
(a) User memory area
(b) Monitor memory area
(c) Heap area (d) Stack area
(e) Data area.
Answer : (b)

66.In Unix which of the following system calls returns the meta data about
a file?
(a) fstat (b) mstat (c) Metacall
(d) Sigabort (e) fork.
Answer : (a)

67.Information in the file is processed in order, one record after another.


This mode of access is called________.
(a) Relative (b) Sequential (c) Direct
(d) Index (e) Indexed-sequential.
Answer : (b)

68.Which of the technique is used to recover the process from starvation


situation?
(a) Paging (b) Aging (c) Compaction
(d) Starvation (e) Reduction.
Answer : (b)

69.Before we store data into a disk it must be divided into sectors and
from where the disk controller can read and write. This is known
as________.
(a) Low-level formatting (b) Fragmenting
(c) High-level formatting
(d) Cleaning (e) Portioning a
disk.
Answer : (d)

70.The disk controller can be told to replace each bad sector logically
with one of the spare sectors in the disk. This scheme is known as_______.
(a) Sector sparing (b) Sector slipping
(c) Forwarding
(d) Back word replacing (e) Sector replace.
Answer : (a)

71.Controlling the access of programs, processes or users to the resources


defined by the system is known as_______.
(a) Prevention (b) Security
(c) Protection
(d) Access stop (e) Access right.
Answer : (c)
-------------------------------------------------------------
72.The ability to execute an operation on an object is known as
(a) Access Right (b) Access Control
(c) Domain Knowledge
(d) Control Right (e) Protection.
Answer : (a)

73.The time required to move the disk head to the desired track is known as
(a) Access Time (b) Track Time
(c) Latency Time
(d) Seek Time (e) Block Time.
Answer : (d)

74.A distributed system is a collection of processors that do not


share_______.
(a) CPU (b) Memory (c) I/O devices
(d) Network (e) File.
Answer : (b)

75.The name of the file does not reveal any hint of the file’s physical
storage location is called_____.
(a) Location independence (b) Protection
(c) Location transparency
(d) File migration (e) Inter-machine
interface.
Answer : (c)

76.software entity running on one or more machines and providing a


particular type of function to a priori unknown clients is called________.
(a) Client (b) Server (c) Service
(d) Process (e) None of the above.
Answer : (c)

Answers
1.
Answer : (c)
2.
Answer : (e)
3.
Answer : (a)
4.
Answer : (b)
5.
Answer : (c)
6.
Answer : (d)
7.
Answer : (d)
8.
Answer : (d)
9.
Answer : (c)
10.
Answer : (a)
11.
Answer : (c)
12.
Answer : (b)
13.
Answer : (b)
14.
Answer : (c)
15.
Answer : (b)
16.
Answer : (d)
17.
Answer : (d)
18.
Answer : (d)
19.
Answer : (d)
20.
Answer : (c)
21.
Answer : (b)
22.
Answer : (c)
23.
Answer : (d)
24.
Answer : (b)
25.
Answer : (b)
26.
Answer : (c)
27.
Answer : (b)
28.
Answer : (d)
29.
Answer : (b)
30.
Answer : (a)
31.
Answer : (c)
32.
Answer : (a)
33.
Answer : (a)
34.
Answer : (b)
35.
Answer : (a)
36.
Answer : (a)
37.
Answer : (b)
38.
Answer : (b)
39.
Answer : (e)
40.
Answer : (a)
41.
Answer : (c)
42.
Answer : (d)
43.
Answer : (b)
44.
Answer : (c)
45.
Answer : (e)
46.
Answer : (b)
47.
Answer : (a)
48.
Answer : (b)
49.
Answer : (b)
50.
Answer : (d)
51.
Answer : (a)
52.
Answer : (c)
53.
Answer : (b)
54.
Answer : (e)
55.
Answer : (b)
56.
Answer : (a)
57.
Answer : (d)
58.
Answer : (b)
59.
Answer : (c)
60.
Answer : (c)

Anda mungkin juga menyukai