Download as pdf
Download as pdf
You are on page 1of 13
DoE) Operating Systems Questions India's #1 Learning Platform Start Complete Exam Preparation Rea oe Gikees fies ac Ce cienry Corea Download App exer Operating Systems MCQ Question 1 View this Question Online > isa/an____. 1. Application software 2. Word processon, 3. Database management system 4, Operating software Answer (Detailed Solution Below) Option 4: Operating software Operating Systems MCQ Question 1 Detailed Solution An operating system (0S) is system software that manages computer hardware and software resources and provides common services for computer programs. Linux is an operating system or a kernel. itis distributed under an open source license. 2 2 eee aR el Borla PS Ela Orel eM ee TLE) Rea cst Peo fed easy CC caer Corre eu & Quizzes Download App Operating Systems MGR Question 2 View this Question Online > the 3 processes, P1, P2 and P3 shown in the table. [Process/rrival time|Time unit Required PI oO 5 P2 1 7 P3 3 4 completion order of the 3 processes under the policies FCFS and RR2 (round robin with CPU quantum of 2 time units) are 1. FCFS: P1, P2, P3 RR2: P1, P2, P3 2. FCFS:P1, P3, P2 RR2: P1, P3, P2 3. FOFS:P1, P2, P3 RR2: Pi, P3, P2 4. FCFS: P1, P3, P2 RR2: P1, P2, P3 Answer (Detailed Solution Below) Option 3: FCFS: P1, P2, P3 RR2:P1,P3, P2 Operating Systems MCQ Question 2 Detailed Solution The correct answer is “option 3". CONCEPT: FCFS is a scheduling algorithm in which the process that scheduled first will execute first completely. FCFS stands for First Come First Serve. Round Robin is a scheduling algorithm in which the process executes fora fixed CPU quantum time then the next process gets executed then the next process and goes on. CALCULATION: The GANTT chart for the FCFS scheduling algorithm is: Pi | p2 P3 0 5 12 16 The completion order for the FCFS scheduling algorithm is: P1 P2 P3. The GANTT chart for the RR scheduling algorithm is: Pi | P2| P1| P3| p2| Pi | ps] p2| P2 0 2 4 6) e840 7 13 15 76 The completion order for the RR scheduling algorithm is: P1 P3P2 Hence, the correct answer is “option 3°. ea & eee Pec ar ictia) Start Complete Exam Preparation aR Reet raves arated maa acid Vso) (ores Etta Download App Operating Systems MCQ Question 3 View this Question online > are 200 tracks on a disk platter and the pending requests have come in the order - 69, 167, 76, 42, 51, 126, 12, and 199, Assume the arm is located at the 100"" track and towards track 200. If the sequence of disc access is 126, 167, 199, 12, 36, 42, 51, and 76 then which disc access scheduling policy is used? 1. Elevator 2. Shorter Seek time First 3. C-SCAN 4. First Come First Served Answer (Detailed Solution Below) Option 3: C-SCAN Operating Systems MCQ Question 3 Detailed Solution The correct answer is “option 3". EXPLANATION: Option 1: The elevator algorithm is also known as the SCAN algorithm. In this algorithm, the disk moves in a particular direction servicing the requests coming in the way till the end & reverse the direction & service all the requests. Option 2: In Shortest Seek Time First(SSTF), the algorithm selects disk I/O which requires the least disk arm movement from the current position Option 3: In G-scan \.¢, Circular Elevator, the disk moves in a particular direction servicing the requests coming in ‘the way till the end & reverse the direction & again goes to the start point & starts servicing the Tequests once reach the start point. 0_12_36_42_51_69_76_100__126_167_199 Option 4: In First Come First Serve(FCFS), the disk service the request that comes first. Hence, the correct answer is “option 3". a ieee eat areal Start Complete Exam Preparation Re Dao eee Fahad bes coer Creare na peor Download App Operating Systems MCQ Question 4 ‘View this Question Online > disk queue with requests for I/O to blocks on cylinders. The Request are in the manner: 183 37 122 14 124 65 67 SSTF (shortest seek time first) scheduling, the total number of head is, if the disk head of initially at 53 is: Answer (Detailed Solution Below) Option 1: 236 Operating Systems MCQ Question 4 Detailed Solution Concept: In Shortest Seek Time First (SSTF) scheduling, after servicing every I/O request, the disk head finds the nearest block to be serviced and moves to that particular block. Explanation For Example, after servicing block 53, the nearest block request is at 65 and moves to block 65 Similarly all the above requests are serviced as shown inthe figure below 200 183 Total number of head movements = (67-53) + (67-14) + (183-14) = 236 Rod ieee an eu barely Start Complete Exam Preparation Ree DR cones Question Bank Poona call G Foie (] Pray Download App Operating Systems MCQ Question 5 View this Question Online > Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8 kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss? 1. 16x 201° 2. 256% 210 3. 4x 220 4, 8x 220 Answer (Detailed Solution Below) Option 2: 256 x 21° Operating Systems MCQ Question 5 Detailed Solution Memory is word addressable 1 word = 4 bytes Virtual Address (VA) = 64 bits -. Virtual Address Space (VAS)= 2°* words Physical Address (PA) = 48 bits :. Physical Address Space (PAS) = 248 words Page size (PS) = 8 KB = 2"! words + page offset = 11 bit 4 VAS — 26 _ 953 +- number of pages possible = —Ps- ~ 2s i, PAS = 28 _ 987 “Number of fremes possible = Ps — 2 VA = Page number + page offset Translation Lookaside Buffer (TLB) Page Number |Frame Number| Entries in TLB = 128 = 27 If a page number is found in TLB then there will be a hit for all the words (Word addresses) of that Page. 1 - page hit implies 2"' distinct virtual address hits. So 2’page hit implies 27 x 2"'=28 x 210= 256 x 2° virtual address hits. Therefore, at most 256 = 2'° distinct virtual addresses can be translated without any TLB miss. Tips and Tricks: distinct virtual addresses can be translated without any TLB miss is the number of entries in TLB x page size cg *” India’s #1 Learning Platform Start Complete Exam Preparation ea B bes Roles Download App Operating Systems MGR Question 6 View this Question Online > The problem of indefinite blockage of low-priority jobs in general priority scheduling “me, ES LIENS 1. Dirty bit 2, Compaction 3. Aging 4, Swapping Answer (Detailed Solution Below) Option 3: Aging Operating Systems MCQ Question 6 Detailed Solution Concept: In the priority scheduling algorithm, a priority is associated with each process, and CPUis allocated to the process with the highest priority. Explanation: Priority scheduling can be either preemptive or non-preemptive. A major problem with the priority scheduling algorithm is indefinite blocking or starvation. This algorithm can leave some low priority processes waiting indefinitely. The solution to the problem of starvation is aging. Aging is a technique of gradually increasing the priority of processes that wait in the system for along time. Example: if priorities range from 100 to O(high), we could increase the priority of a waiting process by 1 every 15 minutes. Due to this, even a process with 100 priority would have the highest priority. o India's #1 Learning Platform Start Complete Exam Preparation ier fara erase Mi A ree Ber Download App Operating Systems MCQ Question 7 View this Question Online > Time taken to switch between user and kernel models is between two processes. the time taken to switch 1. More than 2. Independent of 3. Less than 4. Equal to Answer (Detailed Solution Below) Option 3: Less than Operating Systems MCQ Question 7 Detailed Solution Concept: + Switching from Kernel to user mode is a very fast operation, OS has to just change single bit at hardware level + Switching from one process to another process is time consuming process, first we have to move to kernel mode then we have to save PCB and some registers Time taken to switch between user and kemel models is less than the time taken to switch between two processes, so option 3 is the correct answer. Rod ieee an eu barely Start Complete Exam Preparation ORR etc cay r Practice Nea) Question Bank Poona Download App Operating Systems MCQ Question 8 View this Question Online > The working set model is used in memory management to implement the concept of: 1. Thrashing 2. Segmentation 3. Principle of locality 4. Paging Answer (Detailed Solution Below) Option 3: Principle of locality Operating Systems MCQ Question 8 Detailed Solution Concept: The working set model; The memory that is being accessed frequently by an application. Same thing is done by principle of locality. Explanation: There are two types of principle of locality 1. Spatial locality: whenever we are looking for an element the chances are that, the particular SE ene nde ee Re een ane eee nee Tse Be sete a a a a a a a a a aa 2. Temporal locality: Least recently used element is going ta be used again Principle of locality is the correct answer, hence option 3 is the correct answer. rd ieee an eu barely Start Complete Exam Preparation DE Cierny Question Bank Download App Pars Practice Nea) Poona Operating Systems MCQ Question 9 View this Question Online > The real-time operating system, which of the following is the most suitable scheduling scheme? 1. Round robin 2. First come first serve 3. Preemptive 4. Random scheduling Answer (Detailed Solution Below) Option 3 : Pre-emptive! ‘Operating Systems MCQ Question 9 Detailed Solution Pre-emptive is the most suitable scheduling scheme for the real-time operating system © Key Points * Preemptive Scheduling is suitable for Real-Time Programming, as it will allow a real-time process to preempt a process currently running in the Kemel. + A preemptive Kernel may be more responsive since there is less risk that a Keinel-mode process will run for arbitrarily long periods before relinquishing the processor to the waiting process. + Real-time systems require that results be produced within a specified deadline. One of the key itech cn cack Sracaailarn, halal aaa maaan process requires CPU. + Asa result, the scheduler for the real-time system must support a priority-based algorithm with preemption. ©; Additional Information + The round-robin (RR) scheduling algorithm is designed especially for timesharing systems. PE ype aT a ee ee See + Itis similar to FCFS scheduling, but preemption is added to enable the system to switch between processes. + Assmall unit of time, called a time quantum or time slice, is defined. + The ready queue is treated as a circular queue, The CPU scheduler goes around the ready queue, allocating the CPU to each process for a time interval of up to 1-time quantum. ee a er Rae ttn cee tyr as Start Complete Exam Preparation i paar macs Cea) eae Eerie an Ga Download App Operating Systems MCQ Question 10 View this Question Online > If main memory access time is 400 uss, TLB access time is 50 us, considering TLB hit as 90%, what will be the overall access time? 1. 800ps 2. 490us 3. 485us 4. 450s Answer (Detailed Solution Below) Option 2: 490 ps Operating Systems MCQ Question 10 Detailed Solution Data: TLB hit ratio = p = 90%= 0.9 TLB access time =1 = 50 us Memory access time = m= 400 ys Effective memory acess time = EMAT Formula: EMAT = px (t+m)+(1—p)x(t+m+m) Calculation: EMAT = 0.9 = (50 + 400) + (1 — 0.9) « (50 + 400 + 400) EMAT = 490 us .. the overall access time is 490 ps » \mportant Points During TLB hit Frame number is fetched from the TLB (50 us) and page is fetched from physical memory (400 us) During TLB miss TLB no entry matches (50 ss) Frame number is fetched from the physical memory (400 ts) and pages are fetched from physical memory (400 is)

You might also like