Thursday, December 13, 2007

Assingment 3

Answer the Question:
1. What is the cause of thrashing?
Why does paging work?
*Locality model
-process migrates from one locality to another
-localities may overlap
Why does thrashing occur?
-locality > number of frames
-sum of localities > total memory size
How do we fix thrashing?
-Working Set Model
-Page Fault Frequency
2. How does the operating system detect thrashing?
-It doesn't. An operating system would have no idea that thrashing is happening. The OS would be responsible for making use of virtual memory to make up for the lack of physical RAM during a particular computing session, but would have no concept that this is causing issues with hardware.
3. Once thrashing is detected, what can the operating systems do to eliminate it?
-Thrashing is usually a symptom of low memory in your system. To minimize it, try adding more memory to your computer or try to cut down on use interface elements that use extra memory like complicated background images and detailed icons.
Explain the Following:
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 needed?
- In a data center, compaction is the reduction or consolidation of hardware to make better use of physical floor space. Although the goal of compaction is to be cost-effective and maximize real estate, increased hardware compaction puts more demands on power consumption and cooling requirements, two major cost elements in maintaining a large data center.-In storage area management (SAM), compaction is the automatic removal of expired data from a storage area network (SAN) to condense the existing archive and make room for new data.
E. Rellocation. How often should it be performed?
- Relocation is the process of replacing symbolic references or names of libraries with actual usable addresses in memory before running a program. It is typically done by the linker during compilation, although it can be done at run-time by a loader. Compilers or assemblers typically generate the executable with zero as the lower-most, starting address. Before the execution of object code, these addresses should be adjusted so that they denote the correct runtime addresses.
2. Describe the major disadvantages for each of the four memory allocation schemes presented in the chapter.
-The major disadvantage only 1 job per partition and waste of main storage.
3. Describe the major advantages for each of the memory allocation schemes presented in the chapter.
-The major advantage of this is operating system is easy to implement.

No comments: