Describe a presentday computing environment that might use e

Describe a present-day computing environment that might use each of the memory allocation schemes (single user, fixed, dynamic, and relocatable dynamic) described in the chapter. Defend your answer by describing the advantages and disadvantages of the scheme in each ease. How often should memory compaction/relocation be performed? Describe the advantages and disadvantages of performing it even more often than recommended. Using your own words, explain the role of the bounds register. Describe in your own words the role of the relocation register. Give an example of computing circumstances that would favor first-fit allocation over best-fit. Explain your answer. Given the following information: Use the first-fit algorithm to indicate which memory blocks are allocated to each of the three arriving jobs. Use the best-fit algorithm to indicate which memory blocks are allocated to each of the three arriving jobs. Given the following information: Use the best-fit algorithm to indicate which memory blocks are allocated to each of the three arriving jobs. Use the first-fit algorithm to indicate which memory blocks are allocated to each of the three arriving jobs.

Solution

1.Memory allocation schemes

Single user - Simplest allocation method used by MS-DOS.All memory (except some reserved for OS) is available to a process.

advantages- simple,easy to understand and use

disadvantage- poor utilization of processor and memory

fixed allocation - Main memory is partitioned; one partition/job.Allows multiprogramming.Partition sizes remain static unless and until computer system id shut down,reconfigured, and restarted.Requires protection of the job’s memory space.Requires matching job size with partition size

disadvantage - Jobs are allocated space on the basis of first available partition of required size

Dynamic allocation - Jobs are given only as much memory as they request when theyare loaded.Available memory is kept in contiguous blocks.Memory waste is comparatively small.This method was used by IBM\'s mainframe operating system

Disadvantages - Fully utilizes memory only when the first jobs are loaded.Subsequent allocation leads to memory waste or external fragmentation

Relocatable dynamic - Memory Manager relocates programs togather together all of the empty blocks.Compact the empty blocks to make oneblock of memory large enough to accommodate some or all of the jobs waiting to get in.

Disadvantage - Time consumption is very high.Due to compaction Every program in memory must be relocated so they are contiguous.Operating system must distinguish between addresses and data values which consumes a lot of time

2.A relocation should be performed at least once a month. A more individualized approach is to relocate when 70 percent of memory become busy. This should be done at seventy percent to ensure that memory is still readily available, but not frequently enough to consistently intercede with current operations.

3.A bounds register is loaded with the physical address of the last physical memory location that the program can access.whenever an instruction attempts to access a logical memory location, the hardware automatically

4.when the program is loaded, a relocation register is set to contain the physical address of where the first logical address of the program will be located in memory.whenever an instruction attempts to access a logical memory location, the hardware automatically

5. Best fit minimizes the wastage space, it consumes a lot of processor time for searching the block which is close to required size. Also, Best-fit may perform poorer than other algorithms in some cases.

Consider the requests from processes in given order 300K, 25K, 125K and 50K. Let there be two blocks of memory available of size 150K followed by a block size 350K.

Best Fit:
300K is allocated from block of size 350K. 50 is left in the block.
25K is allocated from the remaining 50K block. 25K is left in the block.
125K is allocated from 150 K block. 25K is left in this block also.
50K can’t be allocated even if there is 25K + 25K space available.

First Fit:
300K request is allocated from 350K block, 50K is left out.
25K is be allocated from 150K block, 125K is left out.
Then 125K and 50K are allocated to remaining left out partitions.
So, first fit can handle requests.

 Describe a present-day computing environment that might use each of the memory allocation schemes (single user, fixed, dynamic, and relocatable dynamic) descri
 Describe a present-day computing environment that might use each of the memory allocation schemes (single user, fixed, dynamic, and relocatable dynamic) descri

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site