Consider a program that consists of 8 pages (from 0 to 7) and we have 4 page frames in the physical memory for the pages. The page reference string is : 

1 2 3 2 5 6 3 4 6 3 7 3 1 5 3 6 3 4 2 4 3 4 5 1 

The number of page faults in LRU and optimal page replacement algorithms are respectively (without including initial page faults to fill available page frames with pages): (A) 9 and 6 (B) 10 and 7 (C) 9 and 7 (D) 10 and 6

1 Answer

Answer :

(B) 10 and 7

Related questions

Description : Suppose that the virtual Address space has eight pages and physical memory with four page frames. If LRU page replacement algorithm is used, .............. number of page faults occur with the reference string. 0 2 1 3 5 4 6 3 7 4 7 3 3 5 5 3 1 1 1 7 2 3 4 1 (A) 11 (B) 12 (C) 10 (D) 9

Last Answer : (A) 11

Description : A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103 if the four frames are initially empty? (A) 6 (B) 7 (C) 5 (D) 8

Last Answer : (B) 7

Description : A job has four pages A, B, C, D and the main memory has two page frames only. The job needs to process its pages in following order: ABACABDBACD Assuming that a page interrupt occurs when a new page is brought in the main ... replacement algorithms are (A) 9 and 7 (B) 7 and 6 (C) 9 and 8 (D) 8 and 6

Last Answer : (C) 9 and 8

Description : Consider the reference string 0 1 2 3 0 1 4 0 1 2 3 4 If FIFO page replacement algorithm is used, then the number of page faults with three page frames and four page frames are .......... and ........... respectively. (A) 10, 9 (B) 9, 9 (C) 10, 10 (D) 9, 10

Last Answer : (D) 9, 10

Description : Suppose that the number of instructions executed between page faults is directly proportional to the number of page frames allocated to a program. If the available memory is doubled, the mean interval between page faults is also ... memory were available? (A) 60 sec (B) 30 sec (C) 45 sec (D) 10 sec

Last Answer : Answer: C Explanation: T = Ninstr x 1µs + 15,000 x 2,000 µs = 60s Ninstr x 1µs = 60,000,000 µs - 30,000,000 µs = 30,000,000 µs Ninstr = 30,000,000 The number of instruction ... doesn't mean that the program runs twice as fast as on the first system. Here, the performance increase is of 25%.

Description : A memory management system has 64 pages with 512 bytes page size. Physical memory consists of 32 page frames. Number of bits required in logical and physical address are respectively: (1) 14 and 15 (2) 14 and 29 (3) 15 and 14 (4) 16 and 32

Last Answer : (3) 15 and 14

Description : Explain LRU page replacement algorithm for following reference string. 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 Calculate the page fault.

Last Answer : LRU: The Least Recently Used (LRU) page replacement policy replaces the page that has not been used for the longest period of time. LRU replacement associates with each page the time of that page's last use. ... in question so assume frame size as 3 or 4) LRU: Assume frame size=3

Description : Consider a disk queue with request for input/output to block on cylinders  98, 183, 37, 122, 14, 124, 65, 67  in that order. Assume that disk head is initially positioned at cylinder 53 and moving ... and 252 cylinders (B) 640 and 236 cylinders (C) 235 and 640 cylinders (D) 235 and 252 cylinders

Last Answer : Answer: 236 and 208 cylinders Explanation: SSTF Initial head position =53 The closest queue to initial head position=65 head moves from 53 to 65=12 head moves from 65 to 67=2 head moves from 67 ... 122=24 head moves from 122 to 124=2 head moves from 124 to 183=59 Total head movement=208 

Description : A specific editor has 200 K of program text, 15 K of initial stack, 50 K of initialized data, and 70 K of bootstrap code. If five editors are started simultaneously, how much physical memory is needed if shared text is used ? (A) 1135 K (B) 335 K (C) 1065 K (D) 320 K

Last Answer : (B) 335 K

Description : hat is the output of the following? i = 5 while True: if i%0O11 == 0: Page No 12 break print(i) i += 1 a) 5 6 7 8 9 10 b) 5 6 7 8 c) 5 6 d) error

Last Answer : b) 5 6 7 8

Description : Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100) x = CBSE (x +10); return (x - 1); } public static void main (String[] args){ System.out.print(First.CBSE(60)); } } What does this program print? (1) 59 (2) 95 (3) 69 (4) 99

Last Answer : (2) 95 

Description : A virtual memory has a page size of 1K words. There are eight pages and four blocks. The associative memory page table contains the following entries:  Which of the following list of virtual addresses (in ... 1234, 4012, 5000, 6200 (C) 1020, 3012, 6120, 8100 (D) 2021, 4050, 5112, 7100

Last Answer : Answer: C Explanation: The pages which are not in main memory are: 1020 will not cause page fault (1024-2047) 3012 will not cause page fault (3072-4095) 6120 will not cause page fault (4096-5119) 8100 will not cause page fault (6144-7167)

Description : In a demand paging memory system, page table is held in registers. The time taken to service a page fault is 8 m.sec. if an empty frame is available or if the replaced page is not modified, and it takes 20 m.secs., if the replaced ... ? (A) 11.6 m.sec. (B) 16.4 m.sec. (C) 28 m.sec. (D) 14 m.sec.

Last Answer : (B) 16.4 m.sec. 

Description : Assume that we need to download text documents at the rate of 100 pages per minute. A page is an average of 24 lines with 80 characters in each line and each character requires 8 bits. Then the required bit rate of the channel is ... ...... (A) 1.636 Kbps (B) 1.636 Mbps (C) 2.272 Mbps (D) 3.272 Kbps

Last Answer : Answer: Marks given to all

Description : Which of the following statements is not true about disk-arm scheduling algorithms ? (A) SSTF (shortest seek time first) algorithm increases performance of FCFS. (B) The number of requests for disk ... arm movements. (D) SCAN and C-SCAN algorithms are less likely to have a starvation problem.

Last Answer : (B) The number of requests for disk service are not influenced by file allocation method.

Description : With …………………. A page is written out to secondary memory only when it has been selected for replacement. A) pre-cleaning B) demand cleaning C) required cleaning D) fast cleaning

Last Answer : B) demand cleaning

Description : The ……………. Determines when a page should be brought into main memory. A) Fetch policy B) Placement policy C) Replacement policy D) Resident set management

Last Answer : A) Fetch policy

Description : Suppose ORACLE relation R(A, B) currently has tuples {(1, 2), (1, 3), (3, 4)} and relation S(B, C) currently has {(2, 5), (4, 6), (7, 8)}. Consider the following two SQL queries SQ1 and SQ2 ... (A) 2 and 6 respectively (B) 6 and 2 respectively (C) 2 and 4 respectively (D) 4 and 2 respectively

Last Answer : (D) 4 and 2 respectively

Description : Consider the fractional knapsack instance n = 4, (p1, p2, p3, p4) = (10, 10, 12, 18), (w1, w2, w3, w4) = (2, 4, 6, 9) and M = 15. The maximum profit is given by (Assume p and w denotes profit and weight of objects respectively) (A) 40 (B) 38 (C) 32 (D) 30

Last Answer : (B) 38

Description : Consider f(N) = g(N) + h(N) Where function g is a measure of the cost of getting from the start node to the current node N and h is an estimate of additional cost of getting from the current ... ? (A) A* algorithm (B) AO* algorithm (C) Greedy best first search algorithm (D) Iterative A* algorithm

Last Answer : (C) Greedy best first search algorithm

Description : In a relational database model, NULL values can be used for all but which one of the following? (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL. (B) To ... D) To fill a column in a tuple when that column does not really exist for that particular tuple.

Last Answer : (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Description : With ................ a page is brought into main memory only when the reference is made to a location on that page. A) demand paging B) main paging C) prepaging D) postpaging

Last Answer : A) demand paging

Description : Breaking physical memory into fixed-sized bloclcs called as: (1) Packets (2) Page (3) Frames (4) Segments

Last Answer : Frames

Description : Page stealing 1) Is a sign of an efficient system 2) Is taking page frames from other working sets 3) Should be the tuning goal 4) Is taking larger disk spaces for pages paged out

Last Answer : 2) Is taking page frames from other working sets

Description : Page stealing 1 Is a sign of an efficient system 2 Is taking page frames from other working sets 3 Should be the tuning goal 4 Is taking larger disk spaces for pages paged out

Last Answer : 2 Is taking page frames from other working sets

Description : Consider the following statements : (a) Boolean expressions and logic networks correspond to labelled acyclic digraphs. (b) Optimal Boolean expressions may not correspond to simplest networks. (c) Choosing essential blocks first in a Karnaugh map ... (b) only (C) (a) and (b) (D) (a), (b) and (c)

Last Answer : (D) (a), (b) and (c) 

Description : Consider the following statements: (a) Depth - first search is used to traverse a rooted tree. (b) Pre - order, Post-order and Inorder are used to list the vertices of an ordered rooted tree. (c) Huffman's algorithm is used to find an optimal ... (d) (C) (a) , (b) and (c) (D) (a), (b) , (c) and (d)

Last Answer : (D) (a), (b) , (c) and (d)

Description : Consider the following three SQL queries (Assume the data in the people table) : (a) Select Name from people where Age>21; (b) Select Name from people where Height>180; (c) Select Name from people where (Age>21) or (Height ... number of rows returned by the SQL query (c) ? (A) 3 (B) 7 (C) 10 (D) 21

Last Answer : (C) 10

Description : What is the output of the following? i = 1 while True: if i%2 == 0: break print(i) i += 2 a) 1 Page No 13 b) 1 2 c) 1 2 3 4 5 6 … d) 1 3 5 7 9 11 …

Last Answer : d) 1 3 5 7 9 11 …

Description : The control string in C++ consists of three important classifications of characters (A) Escape sequence characters, Format specifiers and Whitespace characters (B) Special characters, White-space ... and Non-white space characters (D) Special characters, White-space characters and Format specifiers

Last Answer : (C) Format specifiers, White-space characters and Non-white space characters

Description : Consider three CPU intensive processes P1, P2, P3 which require 20, 10 and 30 units of time, arrive at times 1, 3 and 7 respectively. Suppose operating system is implementing Shortest Remaining Time first (preemptive scheduling) ... end of Ready queue are not counted). (A) 3 (B) 2 (C) 4 (D) 5

Last Answer : (A) 3

Description : .......... displays the information about the active document such as page number, section number, number of pages, insertion point, position, etc. A) View Bar B) Menu Bar C) Status Bar D) Ruler Lin

Last Answer : C) Status Bar

Description : A computer program consists of: a) System Flowchart b) Program Flowchart c) Algorithm's written in any computer language d) None of The Above

Last Answer : c) Algorithm's written in any computer language

Description : In a queue, the initial values of front pointer f rare pointer r should be ….. and …….. respectively. A) 0 and 1 B) 0 and -1 C) -1 and 0 D) 1 and 0

Last Answer : B) 0 and -1

Description : What is the bit rate for transmitting uncompressed 800x600 pixel colour frames with 8 bits/pixel at 40 frames/second ? (A) 2.4 Mbps (B) 15.36 Mbps (C) 153.6 Mbps (D) 1536 Mbps 

Last Answer : (C) 153.6 Mbps Explanation: The number of bits/sec is just 800x600x40x8 or 153.6 Mbps.

Description : Consider a 3-puzzle where, like in the usual 8-puzzle game, a tile can only move to an adjacent empty space. Given the initial state  which of the following state cannot be reached? 

Last Answer : Answer: C

Description : Four pipes can fill a reservoir in 15, 20, 30 and 60 hours respectively. The first one was opened at 6 AM, second at 7 AM, thir da t 8 AM and the fourth at 9 AM. When will the reservoir be filled ? (A) 11 AM (B) 12 Noon (C) 1 PM (D) 1:30 PM

Last Answer : Answer: C

Description : A network with bandwidth of 10 Mbps can pass only an average of 15,000 frames per minute with each frame carrying an average of 8,000 bits. What is the throughput of this network ? (A) 2 Mbps (B) 60 Mbps (C) 120 Mbps (D) 10 Mbps

Last Answer : (A) 2 Mbps Explanation: In data transmission, throughput is the amount of data moved successfully from one place to another in a given period of time, and typically measured in bits per second (bps), ... second (Mbps) or gigabits per second (Gbps). Here, Throughput = 15000 x 8000/60 = 2 Mbps 

Description : Given a Non-deterministic Finite Automation (NFA) with states p and r as initial and final states respectively transition table as given below  The minimum number of states required in Deterministic Finite Automation (DFA) equivalent to NFA is (A) 5 (B) 4 (C) 3 (D) 2

Last Answer : (C) 3 

Description : Which of the following algorithms sort n integers, having the range 0 to (n2 -1), in ascending order in O(n) time ? (A) Selection sort (B) Bubble sort (C) Radix sort (D) Insertion sort

Last Answer : (C) Radix sort

Description : Ajay reads at an average rate of 30 pages per hour, while Vikram reads at an average rate of 40 pages per hour. If Ajay starts reading a novel at 4:30 PM and Vikram begins reading an identical copy of the same book at 5:20 PM, at ... same page? a) 7:50 PM b) 8:15 PM c) 8:40 PM d) 9:00 PM e) 9:25 PM

Last Answer : Ajay reads at average rate of 30 pages per hour ie. 1 page in every two minutes. Therefore, by 5:20 PM, he would have covered 25 pages By 6:20 PM, Ajay would have read 25+30 pages and Vikram would have ... and he will also finish 100 pages Hence, both of them will be on same page at 7:50 Answer: a)

Description : The advantage of ............... is that it can reference memory without paying the price of having a full memory address in the instruction. (A) Direct addressing (B) Indexed addressing (C) Register addressing (D) Register Indirect addressing

Last Answer : (D) Register Indirect addressing

Description : Consider a source with symbols A, B, C, D with probabilities 1/2, 1/4, 1/8, 1/8 respectively. What is the average number of bits per symbol for the Huffman code generated from above information? (A) 2 bits per symbol (B) 1.75 bits per symbol (C) 1.50 bits per symbol (D) 1.25 bits per symbol

Last Answer : (B) 1.75 bits per symbol

Description : Consider the two class classification task that consists of the following points: Class C1: [1 1.5] [1 -1.5] Class C2: [-2 2.5] [-2 -2.5] The decision boundary between the two classes using single perceptron is given by: (A) x1+x2+1.5=0 (B) x1+x2-1.5=0 (C) x1+1.5=0 (D) x1-1.5=0

Last Answer : (C) x1+1.5=0 

Description : Consider a system having ‘m’ resources of the same type. These resources are shared by three processes P1, P2 and P3 which have peak demands of 2, 5 and 7 resources respectively. For what value of ‘m’ deadlock will not occur? (A) 70 (B) 14 (C) 13 (D) 7

Last Answer : (B) 14

Description : Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters? A. cat emp[!0-9] B. more [emp][!0-9] C. cat emp[x-z]

Last Answer : A. cat emp[!0-9]

Description : What is the output of the following? i = 5 while True: if i%0O9 == 0: break print(i) i += 1 a) 5 6 7 8 b) 5 6 7 8 9 c) 5 6 7 8 9 10 11 12 13 14 15 …. d) error

Last Answer : d) error

Description : Assume that a program will experience 200 failures in infinite time. It has now experienced 100 failures. The initial failure intensity was 20 failures/CPU hr. Then the current failure intensity will be (A) 5 failures/CPU hr (B) 10 failures/CPU hr. (C) 20 failures/CPU hr. (D) 40 failures/CPU hr.

Last Answer : (B) 10 failures/CPU hr.