Classical

Operating System - Memory Management

11:  

Consider the following heap :
JOB1-50 FREE-150 JOB2-300 FREE-350 JOB3-600
The sequence of requests for blocks of sizes 300, 25, 125, 50 can be satisfied if we use

A.

either first fit or best fit policy

B.

first fit, but not best fit

C.

best fit, but not first fit

D.

none of these

 
 

Option: B

Explanation :


12:  

Cached and interleaved memories are ways of speeding up memory access between CPUs and slower RAM. Which memory models are best suited (i.e. improves performance the most) for which programs ?

(i) Cached memory is best suited for small loops.
(ii) Interleaved memory is best suited for small loops.
(iii) Interleaved memory is best suited for large sequential code.
(iv) Cached memory is best suited for large sequential code.

A.

(i) and (ii) are true

B.

(i) and (iii) are true

C.

(iv) and (ii) are true

D.

(iu) and (iii) are true

 
 

Option: B

Explanation :


13:  

Consider following page trace :

4,3,2, 1,4,3,5,4,3,2, 1,5

 Number  of page faults that would occur if FIFO page replacement algorithm is used with Number of frames for the Job M=3, will be

A.

8

B.

9

C.

10

D.

12

 
 

Option: B

Explanation :

When M-3

T

1

2

3

4

5

6

7

8

9

10

11

12

Page Sequence

4

3

2

1

4

3

5

4

3

2

1

5

Memory

Frame

1st

4

4

4

1

1

1

5

5

5

5

5

5

2nd

 

3

3

3

4

4

4

4

4

4

1

1

3rd

 

 

2

2

2

3

3

3

3

2

2

2

Page fault

y

y

y

y

y

y

y

n

n

y

y

n

Total Page Fault = 9


14:  

Consider following page trace :
4,3,2, 1,4,3,5,4,3,2, 1,5
Percentage of page faults that would occur if FIFO page replacement algorithm is used with

Number offrames for the Job M = 4, will be

A.

8

B.

9

C.

10

D.

12

 
 

Option: C

Explanation :

When m=4

T

1

2

3

4

5

6

7

8

9

10

11

12

Page Sequence

4

3

2

1

4

3

5

4

3

2

1

5

Memory

Frame

1st

4

4

4

4

4

4

5

5

5

5

1

1

2nd

 

3

3

3

3

3

3

4

4

4

4

5

3rd

 

 

2

2

2

2

2

2

3

3

3

3

4th

 

 

 

1

1

1

1

1

1

2

2

2

Page fault

y

y

y

y

n

n

y

y

y

y

y

y

Total no of page fault = 10


15:  

Consider a logical address space of 8 pages of 1024 words mapped into memory of 32 frames.

How many bits are there in the logical address?

A.

9 bits

B.

11 bits

C.

13 bits

D.

15 bits

 
 

Option: C

Explanation :

Logical address will have 3 bits to specify the page number (for 8 pages). 10 bits to specify the offset into each page (210 = 1024 words) = 13 bits.




Suggest an improvement