August
1997 QUESTION 4 Total Marks: 20 Marks |
Click here to access other
questions
SUGGESTED SOLUTIONS |
4. | (a) What are partitions? | [2] | ||
Partitions are separate areas of main memory | [1] | |||
that can be used to store different (or separate) programs. | [1] | |||
Similar answers should also be awarded marks. | ||||
(b) What is the purpose of partitioning? | [2] | |||
Partitioning enables multiprogramming | [1] | |||
and multitasking operations to be carried out. | [1] | |||
Similar answers should also be awarded marks. | ||||
(c) Paging and segmentation are widely used methods in many large general purpose time-sharing systems for memory management. | ||||
(i) What is segmentation? | [1] | |||
Segmentation involves breaking up a program into variable sized chunks. | [1] | |||
One mark for any answer with a similar content, although the fact that segments are of variable size (for segmentation of programs) must be mentioned. | ||||
(ii) What is paging? | [1] | |||
Paging involves breaking up a program into equal sized chunks. | [1] | |||
One mark for any answer with a similar content, although the fact that pages are of fixed size (for segmentation of programs) must be mentioned. | ||||
(iii) How does fragmentation for segmentation differ from that in paging? | [2] | |||
It is the same, | [1] | |||
except for the fact that segments are of variable length. | [1] | |||
(iv) What two advantages does segmentation have over paging? | [4] | |||
One mark should be awarded for each valid point and one mark should be awarded for each acceptable elaboration. Examples of valid points include the following: | ||||
It provides protection over critical sections. | ||||
It enables sharing of code and data with other users. | ||||
(d) One of the major problems of paging and segmentation is the presence of fragments in memory which is wasted. | ||||
(i) Distinguish between external and internal fragmentation. | [2] | |||
Internal fragmentation is wasted space within a partition, | [1] | |||
whereas external fragmentation is wasted space due to empty partitions being too small for current processes. | [1] | |||
Similar answers should also be awarded marks. | ||||
(ii) List two ways by which fragmentation can be managed. | [2] | |||
One mark should be awarded for each valid point. Examples include compaction and coalescing. | ||||
(iii) Briefly describe each of the methods mentioned in part (d) (ii). | [4] | |||
Compaction involves moving all of the used partitions to one side and keeping the unused ones together. | [2] | |||
Coalsecing involves merging two adjacent free partitions. | [2] | |||
Similar answers should also be awarded marks. |