Thursday, December 13, 2007

Assignment No.3

Page 104
Question #4
a.)
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 system detect thrashing?
- The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming.

c.) Once it detects thrashing, what can the system do to eliminate this problem?
-It can be eliminated by reducing the level of multiprogramming.

Page 56
Question 1-3

a.) Multiprogrammng. Why is it to use?
-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.

b.) 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

c.) External Fragmentation. How does it occur?
-External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous.

d.)Compaction. Why is it nedded?
e.)Relocation. How often should it perform?

2.) The advantages of the memory allocation are as follows:
- It avoids wastage of CPU idle time
-Operating system is easy to implement

3.) The disadvantages of the memory allocation are as follows:
- degree of multiprogramming is fixed- only 1 job per partition
- waste of main storage- some partitions not used