Commit 2437626
Changed files (1)
doc
doc/assignment3.md
@@ -2,9 +2,32 @@
You should submit this assignment after you have finished Unit 3. It is worth 10% of your final grade.
-Instructions: Please answer the following questions in complete sentences. Your answer for each question should be about 150 words. (100 marks total)
+Instructions:
+Please answer the following questions in complete sentences.
+Your answer for each question should be about 150 words. (100 marks total)
1. What are the advantages of using dynamic loading? (6 marks)
+
+> With dynamic loading, a routine is not loaded until it is called.
+> All routines are kept on disk in a relocatable load format.
+> The main program is loaded into memory and is executed.
+> When a routine needs to call another routine, the calling routine first
+> checks to see whether the other routine has been loaded.
+> If it has not, the relocatable linking loader is called to load the desired
+> routine into memory and to update the program's address tables to reflect this change.
+> Then control is passed to the newly loaded routine.
+
+> The advantage of dynamic loading is that an unused routine is never loaded.
+> This method is particularly useful when large amounts of code are needed
+> to handle infrequently occurring cases, such as error routines. In this case,
+> although the total program size may be large, the portion that is used (and
+> hence loaded) may be much smaller.
+
+> Dynamic loading does not require special support from the operating system.
+> It is the responsibility of the users to design their programs to take
+> advantage of such a method. Operating ssytems may help the programmer,
+> however, by providing library routines to implement dynamic loading.
+
1. Explain the basic method for implementing paging. (8 marks)
1. Briefly describe the segmentation memory management scheme. How does it differ from the paging memory management scheme in terms of the user’s view of memory? (8 marks)
1. Explain the distinction between a demand-paging system and a paging system with swapping. (8 marks)