Describe two segment-replacement algorithms, Operating System

Assignment Help:

Q. Segmentation is alike to paging but uses variable-sized "pages". Describe two segment-replacement algorithms based on FIFO and LRU page replacement schemes. Remember that since segments aren't the same size the segment that is chosen to be replaced mayn't be big enough to leave enough consecutive locations for the needed segment. Consider tactics for systems where segments cannot be relocated and those for systems where they can.

Answer:

a. FIFO. Find the first segment large sufficient to accommodate the incoming segment. If relocation isn't possible and no one segment is large enough select a combination of segments whose memories are contiguous which are closest to the first of the list and which are able to accommodate the new segment. If relocation is probable rearrange the memory so that the first N segments large sufficient for the incoming segment are contiguous in memory. Add any leftover space to the free-space list in both cases.

b. LRU. Select the segment that hasn't been used for the longest period of time and that is large enough adding any leftover space to the free space list. If no one segment is large sufficient select a combination of the oldest segments that are contiguous in memory (if relocation isn't available) as well as that are large enough.

If relocation is obtainable rearrange the oldest N segments to be contiguous in memory as well as replace those with the new segment.


Related Discussions:- Describe two segment-replacement algorithms

List ways to share directories in operating system, List ways to share file...

List ways to share files among directories in operating systems. a. Copy file from one account into another. b. Link directory entry of "copied" file to directory entry of o

What are the differences between process and thread, What are the differenc...

What are the differences between process and thread? The fundamental difference between a process and a thread is that a process has an entire copy of the program to itself and

Objectives and functions of an operating system, Question: a) What is ...

Question: a) What is an Input/Output module and what are the five categories their functions fall into? b) What is an Operating System? Briefly describe the two objectives

Write a note on threads, Question 1 Explain (a) tightly coupled systems   ...

Question 1 Explain (a) tightly coupled systems                               (b) Loosely coupled system Question 2 Describe the RPC model Question 3 Write a note o

Write a short note about process, Write a short note about process. Unc...

Write a short note about process. Unceremoniously, a process is a program in implementation. A process is too much than the program code, which is occasionally known as the tex

Describe the actions of sun ultra sparc processor, Q. The Sun Ultra SPARC p...

Q. The Sun Ultra SPARC processor has numerous register sets that describe the actions of a context switch if the new context is previously loaded into one of the register sets. Wha

Describe the possible rmi invocation semantics, Question: (a) Briefly d...

Question: (a) Briefly discuss and describe the possible RMI invocation semantics. (b) (i) What is data marshaling? (ii) Explain the role of a remote object reference dur

What is segmentation?, SEGMENTATION In a memory management system that ...

SEGMENTATION In a memory management system that is properly a programmer views a program to be collection of program components called as segments . Every segment is a logical

Programable clock modes in computer systems, Ask question #Minimuexplain th...

Ask question #Minimuexplain the programable clock modes in a computer system m 100 words accepted#

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd