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

Least-recently used, LRU evicts the page which was last accessed the farthe...

LRU evicts the page which was last accessed the farthest into the past of any page resident in physical memory, i.e. the least-recently used page. LRU approximates OPT when the rec

Linux os, Introduction of linux

Introduction of linux

Kernel to context switch between kernel level threads, Q. Explain the actio...

Q. Explain the actions taken by a kernel to context switch between kernel level threads. Answer: Context switching among kernel threads classically requires saving the value

Networking sockets with the use of shared memory, Q. Compare the utilizatio...

Q. Compare the utilization of networking sockets with the use of shared memory as a mechanism for communicating data between processes on a single computer. What are the merits of

What is the purpose of system calls, Q. What is the purpose of system calls...

Q. What is the purpose of system calls? Answer: System calls permit user-level processes to request services of the operating system.

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

Explain a boot control block, Explain a boot control block A boot contr...

Explain a boot control block A boot control block can have the information required by the system to boot an operating from that partition. If the disk does not have an operati

Why is it significant to balance file system I/O among disks, Q. Why is it ...

Q. Why is it significant to balance file system I/O among the disks as well as controllers on a system in a multitasking environment? Answer: A system can perform mere

DOS, Ask question #Minimum 500 words accepted#

Ask question #Minimum 500 words accepted#

What is the use of system calls, Q. What is the use of system calls? A...

Q. What is the use of system calls? Answer: System calls permit user-level processes to request services of the operating system.

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