Multiprogramming.Why is it used?Multiprogramming is the technique of running several programs at a time using timesharing. It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism. The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating system selects a job from the job pool and starts executing a job, when that job needs to wait for any i/o operations the CPU is switched to another job. So the main idea here is that the CPU is never idle.
Internal Fragmentation.How does it occur? Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used
Compaction: Why is it need?
Compaction is very needed because it is the process of collecting fragments of available memory space into contiguous in block by moving programs and data in a computer's memory disks, or known as garbage collection.
Relocation: How often should it performed? It depend on the process of address refferences in program.
#2. Describe the Major Disadvantages for each of the four memory allocation schemes presented in the chapter. The disadvantage of this memory allocation its an overhead process, so that while compaction is being done everything else must wait.
#3.Describe the Major Advantages for each of the memory alloatiuon schemes presented in the chapter. They could be divided into segments of variable sizes of equal size. Each page, or segment, could be stored wherever there was an empty block best enough to hold it
What is the cause of thrashing?
Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault.
B:How does the operating system detect thrashing?
The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming.
C:Once thrashing is detcted, what can the operating system do to iliminate it?
It can be eliminated by reducing the level of multiprogramming.
What purpose does the referenced bit serve in a demand paging system?
The main idea here was to have the operation system maintain its own array of reference bits (that's the easy part) the tricky part is that the OS must somehow learn about the accesses made to pages. The best way to do this was to mark pages as invalid so that an access to the page causes a trap to the OS, which can do the bookkeeping (of course, the OS must keep extra information around to be able to tell which page table entries are truly invalid). The clock algorithm could reset the invalid bit when it checked an accessed page. The extra costs are additional traps to the OS just for normal references (depend on how fast your clock moves) and extra complexity in the OS.