OS Sheet (4)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

First Term, Academic Year 2019/2020

Helwan University M 317 - Operating System


Faculty of since Sheet 3
Math. Department
Memory Management
St. Name:
Serial ID :

Major :

First: Choose the correct answer (1 mark)


1) Because of virtual memory, the memory can be shared among
a) processes b) threads
c) instructions d) none of the mentioned

2) _____ is the concept in which a process is copied into main memory from the secondary memory
according to the requirement.
a) Paging b) Demand paging
c) Segmentation d) Swapping

3) Swap space exists in


a) primary memory b) secondary memory
c) CPU d) none of the mentioned

4) When a program tries to access a page that is mapped in address space but not loaded in physical memory,
then
a) segmentation fault occurs b) fatal error occurs
c) page fault occurs d) no error occurs

5) In FIFO page replacement algorithm, when a page must be replaced


a) oldest page is chosen b) newest page is chosen
c) random page is chosen d) none of the mentioned

6) Which algorithm chooses the page that has not been used for the longest period of time whenever the
page required to be replaced?
a) first in first out algorithm b) additional reference bit algorithm
c) least recently used algorithm d) counting based page replacement algorithm

7) Virtual memory allows :


a) execution of a process that may not be completely in memory
b) a program to be larger than the physical memory

1
c) a program to be larger than the secondary storage
d) execution of a process without being in physical memory

8) The instruction being executed, must be in :


a) physical memory b) logical memory
c) None of these d) both of them

9) In virtual memory. the programmer __________ of overlays.


a) has to take care b) does not have to take care
c) None of these d) both of them

10) Virtual memory is normally implemented by ________.


a) demand paging b) buses
c) virtualization d) All of these

11) A page fault occurs when :


a) a page gives inconsistent data
b) a page cannot be accesses due to its absence from memory
c) a page is invisible d) All of these

12) When a page fault occurs, the state of the interrupted process is :
a) disrupted b) invalid
c) saved d) None of these

13) When a process begins execution with no pages in memory :


a) process execution becomes impossible
b) a page fault occurs for every page brought into memory
c) process causes system crash d) None of these

14) Program always deals with


a) logical address b) absolute address
c) physical address d) relative address

15) The page table contains


a) base address of each page in physical memory b) page offset
c) page size d) none of the mentioned

16) Operating System maintains the page table for


a) each process b) each thread
c) each instruction d) each address

2
17) What is compaction?
a) a technique for overcoming internal fragmentation
b) a paging technique
c) a technique for overcoming external fragmentation
d) a technique for overcoming fatal error

18) In segmentation, each address is specified by :


a) a segment number b) an offset
c) a value d) a key

19) Each entry in a segment table has a :


a) segment base b) segment peak
c) segment limit d) segment value

20) The segment base contains the :


a) starting logical address of the process b) starting physical address of the segment in memory
c) segment length d) None of these

21) The segment limit contains the :


a) starting logical address of the process b) starting physical address of the segment in memory
c) segment length d) None of these

22) External fragmentation exists when :


a) enough total memory exists to satisfy a request but it is not contiguous
b) the total memory is insufficient to satisfy a request
c) a request cannot be satisfied even when the total memory is free
d) None of these

23) When the memory allocated to a process is slightly larger than the process, then :
a) internal fragmentation occurs b) external fragmentation occurs
c) both a and b d) neither a nor b

24) A solution to the problem of external fragmentation is :


a) compaction b) larger memory space
c) smaller memory space d) None of these

25) In contiguous memory allocation :


a) each process is contained in a single contiguous section of memory
b) all processes are contained in a single contiguous section of memory
c) the memory space is contiguous
d) None of these

3
26) The relocation register helps in :
a) providing more address space to processes
b) a different address space to processes
c) to protect the address spaces of processes
d) None of these

27) With relocation and limit registers, each logical address must be _______ the limit register.
a) less than b) equal to
c) greater than d) None of these

Second: Answer the following (2 mark)


1. What is the responsibility of the memory manager?

2. Why is this responsibility so important?

3. Explain the Best fit allocation strategy.

4. Explain the Worst fit allocation strategy.

5. Explain the First fit allocation strategy.

6. What is fragmentation?
7. How can systems run processes which are larger than available primary memory?

8. What is the purpose of the page table?

9. What is a page fault?

10. What are five different policies for page replacement?

11. What heuristic does the LRU policy use?

You might also like