Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
257 views3 pages

OS Memory Management Tutorial

This document provides tutorial questions on memory management techniques including multiprogramming, fragmentation, memory allocation schemes, compaction, and relocation. It asks the reader to use best-fit and first-fit algorithms to allocate memory blocks to jobs with different size requests. It also asks the reader to determine memory allocation and relocation register contents after compaction is used to accommodate a new job requesting memory.

Uploaded by

Elena William
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
257 views3 pages

OS Memory Management Tutorial

This document provides tutorial questions on memory management techniques including multiprogramming, fragmentation, memory allocation schemes, compaction, and relocation. It asks the reader to use best-fit and first-fit algorithms to allocate memory blocks to jobs with different size requests. It also asks the reader to determine memory allocation and relocation register contents after compaction is used to accommodate a new job requesting memory.

Uploaded by

Elena William
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

TMC1234 Operating System

Semester 2 2014/2015
Tutorial 2: Memory Management (Part 1)

1. Explain the following:


a) What is multiprogramming? Why is it used?
b) Explain the fundamental differences between internal fragmentation and external
fragmentation.
c) Describe the disadvantages of each FOUR (4) memory allocation scheme.
d) What is compaction? Why is it needed?
e) Which type of fragmentation is reduced by compaction? Explain your answer.
f) Describe what happen during relocation of memory? How often should it be
performed?

2. Given the following information:


Job list:
Job number
J1
J2
J3
J4

Memory requested
212K
417K
112K
350K

Memory list:
Memory Block
Block 1
Block 2
Block 3
Block 4
Block 5

Size
110K (low-order memory)
500K
200K
300K
600K (high-order memory)

a) Use the best-fit algorithm to allocate the memory blocks to the arriving jobs
b) Use the first-fit algorithm to allocate the memory blocks to the arriving jobs.
3. Given the following information:

Job list:
Job number

Memory requested

Memory Block

J1

275K

Block 1

J2

920K

Block 2

J3

690K

Block 3

Memory Block
Size
900K (low-order
memory)
910K
300K(high-order
memory)

a) Use the best-fit algorithm to indicate which memory blocks are allocated to each
of the three arriving jobs.
b) Use the first-fit algorithm to indicate which memory blocks are allocated to each
of the three arriving jobs.

4. Given the following memory configuration:


Operating System
20K
Job 1 (10K)
30K

Job 2(15K)

50K
65K
75K

Job 3 (45K)
120K

200K
At this point Job 4 arrives requesting block of 100K. Answer the following questions:
a) Can Job 4 be accommodated? Explain your answer.

b) If relocation is used, what are the contents of the relocation registers for Job 1,
Job 2 and Job 3 after recompaction?
c) What are the contents of the relocation register for Job 4 after it has been loaded
into memory?
d) The instruction ADDI 4, 10 is part of Job 1 and was originally loaded into memory
location 22K. What is its new location after compaction?
e) The instruction MUL 4, NUMBER is part of Job 2 and was originally loaded into
memory location 55K. What is its new location after compaction?
f) An instruction that is part of Job 3 was originally loaded into memory location
80K. What is its new location after compaction?

You might also like