summaryrefslogtreecommitdiff
path: root/doc/assignment3.md
blob: d042d070f93f4f1f0cb6c68110bf48155d934d03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Assignment 3 - Computer Science 314: Operating Systems

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)

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)
1. How does the second-chance algorithm for page replacement differ from the FIFO page replacement algorithm? (8 marks)
1. Explain how copy-on-write operates. (8 marks)
1. If you were creating an operating system to handle files, what are the six basic file operations that you should implement? (8 marks)
1. To create a new file, an application program calls on the logical file system. Describe the steps the logical file system takes to create a file. (8 marks)
1. How is a hash table superior to a simple linear list structure? What issue must be handled by hash table implementation? (8 marks)
1. What are the factors influencing the selection of a disk-scheduling algorithm? (8 marks)
1. Explain the disadvantage(s) of the SSTF scheduling algorithm. (8 marks)
1. Explain the concepts of a bus and a daisy chain. Indicate how these concepts are related. (8 marks)
1. What are the three reasons that buffering is performed? (6 marks)

## Sources

* [Operating System Concepts][os-book]

[os-book]: https://www.os-book.com/OS10/index.html