0% found this document useful (0 votes)
142 views7 pages

Operating System Concepts and Questions

Uploaded by

dhana lalitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views7 pages

Operating System Concepts and Questions

Uploaded by

dhana lalitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Dijkstra's banking algorithm in an operating system, solves the problem of


a) Deadlock avoidance b) Deadlock recovery
c) mutual exclusion d) context switching
2. In Round Robin CPU scheduling, as the time quantum is increased the
average turn around time a) Increases b) Decreases
c) remains constant d) varies irregularly
3. Pre-emptive scheduling is the strategy of temporarily suspending a running
process
a) Before the CPU time slice expires b) to allow starving processes to run
c) When it requests I/O d) None of these
4. If there are multiple recycle bin for a hard disk
a) You can set different size for each recycle bin
b) You can choose which recycle bin to use to store your deleted files
c) You can make any of them default recycle bin d. None of the
above
5. Identify false statement?
a) You can find deleted files in recycle bin
b) You can restore any files in recycle bin if you ever need
c) You can increases free space of disk by sending files in recycle
bin
d) You can right click and choose empty recycle bin to clean it at once.
6. Slow processing and less storage in single users system are its
a) advantages b) disadvantages
c. characteristics d) network functioning
7. __________ is an approach to restricting system access to authorized
users.
a) Role based access control b) Process based access control
c) Job-based access control d) None of the mentioned
8. If the displayed system date and time is wrong, you can reset it using”
a) write b) calendar c) write file d) control panel
9. You should save your computer from?
a) viruses b) Time bombs c) worms d) all of the above
10. World Wide Web is being standard by a) World wide corporation
b) W3C c) World Wide Consortium d) World Wide Web Standard
11. A co-processor
a) is relatively easy to support software
b) Causes all processor to function equality
c) works with any application d) is quite common in modern computer
12. A microsoft windows is a(n) a) Operating system
b) Graphic program c) word processing d) Database programs
13. The __________ program compresses large files into a smaller file.
a) WinZip b) WinShrink c) WinStyle d) None of these
14. The part of machine level instruction, which tells the central processor
what has to be done is
a. Operation code b. Address c. Locator d. Flip flop
15. 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
16. To access the services of operating system, the interface is provided by the:
A. system calls B. API C. library D. assembly instructions
17. . 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
18. 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
19. 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
20. 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
21. 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
22. Which facility dynamically adds probes to a running system, both in user processes and in the
kernel?
A. Trace B. DLocate C. DMAP D. DAdd
23. Which one of the following is not a real time operating system?
A. VxWorks B. Windows CE C. RTLinux D. Palm OS
24. The OS X has:
A. monolithic kernel B. hybrid kernel C. microkernel D. monolithic kernel with modules
25. The systems which allows only one process execution at a time, are called:
A. uniprogramming systems B. uniprocessing systems
C. unitasking systems D. none of the mentioned
Explanation:
Those systems which allows more than one process execution at a time, are called multiprogramming
systems. Uniprocessing means only one processor.
26. In operating system, each process has its own:
A. address space and global variables B. open files
C. pending alarms, signals and signal handlers D. all of the mentioned
27. In Unix, Which system call creates the new process?
A. fork B. create C. new D. none of the mentioned
28. A process can be terminated due to:
A. normal exit B. fatal error C. killed by another process D. all of the mentioned
29. What is the ready state of a process?
A. when process is scheduled to run after some execution
B. when process is unable to run until some task has been completed
C. when process is using the CPU D. none of the mentioned
Explanation:
When process is unable to run until some task has been completed, the process is in blocked state and if
process is using the CPU, it is in running state.
30. What is interprocess communication?
A. communication within the process B. communication between two process
C. communication between two threads of same process D. none of the mentioned
31. A set of processes is deadlock if:
A. each process is blocked and will remain so forever B. each process is terminated
C. all processes are trying to kill each other D. none of the mentioned
32. A process stack does not contain:
A. function parameters B. local variables C. return addresses D. PID of child process
33. Which system call returns the process identifier of a terminated child?
A. wait B. exit C. fork D. get
34. The address of the next instruction to be executed by the current process is provided by the:
A. CPU registers B. program counter C. process stack D. pipe
35. A Process Control Block(PCB) does not contain which of the following :
A. code B. stack C. Process State D. I/O status information
E. bootstrap program
36. The number of processes completed per unit time is known as __________.
A. output B. Throughput C. Efficiency D. Capacity
37. The state of a process is defined by :
A. the final activity of the process B. the activity just executed by the process
C. the activity to next be executed by the process D. the current activity of the process
38. Which of the following is not the state of a process ?
A. new B. old C. Waiting D. Running E. Terminated
39. The Process Control Block is : A. Process type variable
B. Data Structure C. a secondary storage section D. a Block in memory
40. Which of the following is NOT a valid deadlock prevention scheme? (GATE CS 2000)
(a) Release all resources before requesting a new resource
(b) Number the resources uniquely and never request a lower numbered resource than the last one
requested.
(c) Never request a resource after releasing any resource
(d) Request and all required resources be allocated before execution.
41. Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processes.
Suppose each process P[i] executes the following:
wait (m[i]); wait(m[(i+1) mode 4]);

------

release (m[i]); release (m[(i+1)mod 4]);


This could cause (GATE CS 2000)
(a) Thrashing (b) Deadlock (c) Starvation, but not deadlock (d) None of the above
Answer: (b)
Explanation:
You can easily see a deadlock in a situation where..
P[0] has acquired m[0] and waiting for m[1]
P[1] has acquired m[1] and waiting for m[2]
P[2] has acquired m[2] and waiting for m[3]
P[3] has acquired m[3] and waiting for m[0]
42. Which of the following requires a device driver? (GATE CS 2001)
a) Register b) Cache c) Main memory d) Disk
43. 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 (GATE CS 2001)
a) Always decrease the number of page faults b) Always increase the number of page faults
c) Some times increase the number of page faults d) Never affect the number of page faults
Explanation:
Incrementing the number of page frames doesn’t always decrease the page faults (Belady’s
Anomaly).
44. A graphics card has on board memory of 1 MB. Which of the following modes can the
card not support? (GATE CS 2000)
(a) 1600 x 400 resolution with 256 colours on a 17 inch monitor
(b) 1600 x 400 resolution with 16 million colours on a 14 inch monitor
(c) 800 x 400 resolution with 16 million colours on a 17 inch monitor
(d) 800 x 800 resolution with 256 colours on a 14 inch monitor
Explanation:
Monitor size doesn’t matter here. So, we can easily deduct that answer should be (b) as this has the
highest memory requirements. Let us verify it.
Number of bits required to store a 16M colors pixel = ceil(log2(16*1000000)) = 24
Number of bytes required for 1600 x 400 resolution with 16M colors = (1600 * 400 * 24)/8 which is
192000000 (greater than 1MB).
45. In which one of the following page replacement policies, Belady’s anomaly may occur?
(A) FIFO (B) Optimal (C) LRU (D) MRU
Explanation:
Belady’s anomaly proves that it is possible to have more page faults when increasing the number
of page frames while using the First in First Out (FIFO) page replacement algorithm.
See the wiki page for an example of increasing page faults with number of page frames.
46. The essential content(s) in each entry of a page table is / are
(A) Virtual page number (B) Page frame number
(C) Both virtual page number and page frame number (D) Access right information
Explanation :
A page table entry must contain Page frame number. Virtual page number is typically used as
index in page table to get the corresponding page frame number.
47. Group 1 contains some CPU scheduling algorithms and Group 2 contains some applications.
Match entries in Group 1 to entries in Group 2.
Group I Group II
(P) Gang Scheduling (1) Guaranteed Scheduling
(Q) Rate Monotonic Scheduling (2) Real-time Scheduling
(R) Fair Share Scheduling (3) Thread Scheduling
(A) P – 3 Q – 2 R – 1 (B) P – 1 Q – 2 R – 3 (C) P – 2 Q – 3 R – 1
(D) P – 1 Q – 3 R – 2
Gang scheduling for parallel systems that schedules related threads or processes to run
simultaneously on different processors.
Rate monotonic scheduling is used in real-time operating systems with a static-priority scheduling
class. The static priorities are assigned on the basis of the cycle duration of the job: the shorter the
cycle duration is, the higher is the job’s priority.
Fair Share Scheduling is a scheduling strategy in which the CPU usage is equally distributed
among system users or groups, as opposed to equal distribution among processes. It is also
known as Guaranteed scheduling.
48. An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm.
Consider the arrival times and execution times for the following processes:
Process Execution time Arrival time
P1 20 0
P2 25 15
P3 10 30
P4 15 45
What is the total waiting time for process P2?
(A) 5 (B) 15 (C) 40 (D) 55
At time 0, P1 is the only process, P1 runs for 15 time units.
At time 15, P2 arrives, but P1 has the shortest remaining time. So P1 continues for 5 more time
units.
At time 20, P2 is the only process. So it runs for 10 time units
At time 30, P3 is the shortest remaining time process. So it runs for 10 time units
At time 40, P2 runs as it is the only process. P2 runs for 5 time units.
At time 45, P3 arrives, but P2 has the shortest remaining time. So P2 continues for 10 more time
units.
P2 completes its ececution at time 55
Total waiting time for P2 = Complition time - (Arrival time + Execution
time)
= 55 - (15 + 25)
= 15
49. Suppose the time to service a page fault is on the average 10 milliseconds, while a memory
access takes 1 microsecond. Then a 99.99% hit ratio results in average memory access time of
(GATE CS 2000)
(a) 1.9999 milliseconds
(b) 1 millisecond
(c) 9.999 microseconds
(d) 1.9999 microseconds
Answer: (d)
Explanation:
Average memory access time =
[(% of page miss)*(time to service a page fault) +
(% of page hit)*(memory access time)]/100
So, average memory access time in microseconds is.
(99.99*1 + 0.01*10*1000)/100 = (99.99+100)/1000 = 199.99/1000 =1.9999 µs
50. Where does the swap space reside ? (GATE 2001)
(a) RAM (b) Disk (c) ROM (d) On-chip cache
Explanation:
Swap space is an area on disk that temporarily holds a process memory image. When physical
memory demand is sufficiently low, process memory images are brought back into physical memory
from the swap area. Having sufficient swap space enables the system to keep some physical memory
free at all times.
51. Which of the following does not interrupt a running process? (GATE CS 2001)
(a) A device (b) Timer (c) Scheduler process (d) Power failure
Explanation:
Scheduler process doesn’t interrupt any process, it’s Job is to select the processes for following
three purposes.
Long-term scheduler(or job scheduler) –selects which processes should be brought into the ready
queue
Short-term scheduler(or CPU scheduler) –selects which process should be executed next and
allocates CPU.
Mid-term Scheduler (Swapper)- present in all systems with virtual memory, temporarily removes
processes from main memory and places them on secondary memory (such as a disk drive) or
vice versa. The mid-term scheduler may decide to swap out a process which has not been active
for some time, or a process which has a low priority, or a process which is page faulting frequently,
or a process which is taking up a large amount of memory in order to free up main memory for
other processes, swapping the process back in later when more memory is available, or when the
process has been unblocked and is no longer waiting for a resource.
52. D Which of the following does not interrupt a running process? (GATE CS 2001)
(a) A device (b) Timer (c) Scheduler process (d) Power failure
Explanation:
Scheduler process doesn’t interrupt any process, it’s Job is to select the processes for following
three purposes.
Long-term scheduler(or job scheduler) –selects which processes should be brought into the ready
queue
Short-term scheduler(or CPU scheduler) –selects which process should be executed next and
allocates CPU.
Mid-term Scheduler (Swapper)- present in all systems with virtual memory, temporarily removes
processes from main memory and places them on secondary memory (such as a disk drive) or
vice versa. The mid-term scheduler may decide to swap out a process which has not been active
for some time, or a process which has a low priority, or a process which is page faulting frequently,
or a process which is taking up a large amount of memory in order to free up main memory for
other processes, swapping the process back in later when more memory is available, or when the
process has been unblocked and is no longer waiting for a resource.
53. A process executes the following code
for (i = 0; i < n; i++) fork();
The total number of child processes created is
(A) n (B) 2^n – 1 (C) 2^n (D) 2^(n+1) - 1;
F0 // There will be 1 child process created by first fork
/ \
F1 F1 // There will be 2 child processes created by second fork
/ \ / \
F2 F2 F2 F2 // There will be 4 child processes created by third fork
/ \ / \ / \ / \
............... // and so on
If we sum all levels of above tree for i = 0 to n-1, we get 2^n - 1. So there will be 2^n – 1 child
processes. Also see this post for more details.
54. Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
(A) In deadlock prevention, the request for resources is always granted if the resulting state is
safe
(B) In deadlock avoidance, the request for resources is always granted if the result state is safe
(C) Deadlock avoidance is less restrictive than deadlock prevention
(D) Deadlock avoidance requires knowledge of resource requirements a priori
Explanation :
Deadlock prevention scheme handles deadlock by making sure that one of the four necessary
conditions don't occur. In deadlock prevention, the request for a resource may not be granted
even if the resulting state is safe.
55. Using a larger block size in a fixed block size file system leads to (GATE CS 2003)
a) better disk throughput but poorer disk space utilization
b) better disk throughput and better disk space utilization
c) poorer disk throughput but better disk space utilization
d) poorer disk throughput and poorer disk space utilization
Explanation :
If block size is large then seek time is less (fewer blocks to seek) and disk performance is
improved, but remember larger block size also causes waste of disk space.
56. Consider the following statements with respect to user-level threads and kernel supported
threads
i. context switch is faster with kernel-supported threads
ii. for user-level threads, a system call can block the entire process
iii. Kernel supported threads can be scheduled independently
iv. User level threads are transparent to the kernel
Which of the above statements are true? (GATE CS 2004)
a) (ii), (iii) and (iv) only b) (ii) and (iii) only c) (i) and (iii) only d) (i) and (ii) only
57. A process executes the code
fork ();
fork ();
fork ();
The total number of child processes created is
(A) 3 (B) 4 (C) 7 (D) 8
Explanation :

58. S
59. S
60. D
61. D
62. D
63. D
64. D
65. D
66. D
67. D
68. D
69. D
70. D
71. D
72. D
73. D
74. D
75. D
76.

[Link]
system/?page=3
[Link]
[Link]

77. D
78. D
79. D
80.
81. D
82.
83. D
84. D
85. D
D

86.

[Link]

You might also like