What is the purpose of interrupts? What are the typical steps carried out when an
interrupt occurs, and after the interrupt is serviced? How does an interrupt differ from a trap?
What is the purpose of generating traps intentionally by user programs?
What is the purpose of address binding as used by an operating system? Which type of address binding scheme should be employed by an operating system which supports swapping of processes? Why?
What is the main difference between Dynamic Loading and Dynamic Linking in terms of the object code image produced by a compiler after a source program written in a highlevel language is compiled? In other words, what is exactly meant by the phrase "The difference between dynamic linking and dynamic loading is such that, in dynamic linking, linking rather than loading, is postponed until execution time."
Assume that Contiguous Memory Allocation scheme is followed, and in a particular case there are six empty holes of 250KB, 550KB, 300KB, 140KB, 700KB, and 100 KB scattered throughout the main memory of our system, in the given order, with none of the holes being adjacent to another hole.
a) How would the first-fit, best-fit, and worst-fit memory allocation strategies place processes of the following sizes in those holes: 95 KB, 450 KB, 458 KB, 140 KB, and 350 KB (in this given order)? Give the current state of the memory (i.e., which hole holds the assigned process, and the sizes of the remaining holes) after each process is assigned to a hole. You can assume that none of the placed processes are phased out from the memory until all of the processes are placed.
b) If you were asked to rank the performance of the three strategies according to their performance on the placement of the above given processes, how would you order them from the best performer to the least performer? Why? Explain and justify your answer.
a) Code me a C program which inputs three numbers from the user, and outputs the message "Sorted." if the entered numbers are in ascending order, or outputs the message "Not sorted" otherwise.
b) Code me a C program that swaps the contents of two pointer variables to integers. That is, suppose you have two integer variables, number1 and number2; and two pointers to integers, intPtr1 and intPtr2. If intPtr1 pointes to number1, and intPtr2 points to number2 before the swap takes place, then after the swap operation intPtr2 should point to number1, and intPtr1 should point to number2. Make sure that your program displays the numbers pointed to by the pointers before and after the swap operation.