Professional Documents
Culture Documents
Beatingo SW1
Beatingo SW1
PART I
1. Discuss the difference between the best-fit and first-fit allocation methods.
The difference between the best-fit and first-fit allocation methods is that best-fit
allocation method the partition is allocated which is the first sufficient block from the
top of main memory while first-fit allocation method allocates the process to the
partition which is the first smallest sufficient partition among the free available
partition.
2. Discuss the first-fit algorithm, which assumes that the Memory Manager keeps two lists, one for
free memory blocks and one for busy memory blocks. Use Table 2.2 to aid the discussion.
First Fit Algorithm is the simplest technique of allocating the memory block to the
processes amongst all. In the algorithm, the pointer keeps track of all the free blocks in
the memory and accepts the request of allocating a memory block to the coming
process.
o Assumes Memory Manager keeps two lists, one for free memory and one for
busy memory blocks
o Loop compares the size of each job to the size of each memory block until a
block is found that’s large enough to fit the job
o Job is stored into that block of memory
o Memory Manager moves out of the loop to fetch the next job from the entry
queue
o If the entire list is searched in vain, then the job is placed into a waiting queue
o The Memory Manager then fetches the next job and repeats the process
4. Discuss the limitations of memory management schemes in early systems. What were the most
problematic aspects of these schemes? Why were they sufficient for the first three generations
of computers?
o The most problematic aspects of memory management schemes in early system are
Single-User Contiguous Scheme, Fixed Partitions, Dynamic Partitions, Deallocation
and Relocatable Dynamic Partitions because each program loaded in its entirety into
memory and allocated as much contiguous memory space as needed, they were the
most problematic aspects of these schemes. The program could not be executed if it
was too large. Memory Manager did so little work in the first three generations of
computers, they were sufficient.
PART II
1. The ____ is used to store the highest location in memory accessible by each program.
Answer: Bounds Register
2. The ____ contains the value that must be added to each address referenced in the program so
that the system will be able to access the correct memory addresses after relocation.
Answer: Relocation Register
4. (True or False) The operating system must distinguish between addresses and data values, and
these distinctions are not obvious after the program has been loaded into memory.
Answer: False
5. To 10. How often should compaction process occur and what are its advantages and
disadvantages?
o Compaction process should occur when a certain percent of memory becomes busy, for
instance at 75 percent. Or when there are jobs waiting to get in. Or After a prescribed
amount of time.
The advantages of compaction of memory is that there will be more memory available
as the blocks are relocated together to make use of the memory. The disadvantages of
more compaction is that compaction/relocation is an overhead process which takes
place while all other activities wait on its completion. The more compaction there is, the
more overhead processing is occurring and if it holds too much priority, you could end
up with the processor spending too much time compacting and less time processing the
jobs.
MIT 201-ADVANCED OPERATING SYSTEM AND NETWORKING SEATWORK