Mark-sweep, Operating System

Assignment Help:

The objects that a program can access directly are those objects which are referenced by local vari-ables on the processor stack, or by any global/static variables that refer to objects, or by variables in CPU registers. In the context of garbage collection, these variables are called the roots. An object is indirectly accessible if it is referenced by a ?eld in some other (directly or indirectly) accessible object. An accessible object is said to be live. Conversely, an object which is not live is garbage.

Note that heap objects which are live are indirectly accessible from the roots or other heap objects. The idea of mark-sweep is relatively straightforward. We start at the roots, and recursively visit every object accessible through pointers, marking them as live. At the end of the process, every thing not marked is considered garbage and will be deleted. Notice that mark-sweep can perform lazy garbage collection, in the sense that it does not necessarily need to remove the garbage immediately.

Note thatmark-sweep does not clean upmemory which is allocated, but simply never used. Also, periodically we have to visit all objects recursively, starting from the roots. For a large program, this will be slow. This is a problem with the traditional mark-sweep algorithm.


Related Discussions:- Mark-sweep

Multilevel queue scheduling algorithm suffer from starvation, 1. Suggest so...

1. Suggest some mechanism(s) to lower the dispatch latency while scheduling for a real-time system. Also, discuss any trade-off or consequent constraint associated with it, if a

What is the use of system programs, Q. What is the use of system programs? ...

Q. What is the use of system programs? Answer: System programs are able to be thought of as bundles of useful system calls. They provide fundamental functionality to users so

Define spooling, Define spooling. A spool is a buffer that holds output...

Define spooling. A spool is a buffer that holds output for a device, like printer, that cannot accept interleaved data streams. When a request finishes printing, the spooling s

Explain benefits of time-sharing system, Under what circumstances would a ...

Under what circumstances would a user be better off using a time-sharing system, rather than a personal computer or single-user workstation? When there are some other users, th

Explain fixed partitioning, Explain fixed partitioning. Partitioning ar...

Explain fixed partitioning. Partitioning are the simpler techniques that don't involve virtual memory. Partitioning has been used in numerous variations in operating systems.

Determine utilization of cpu and the paging disk, Q. Consider the demand-p...

Q. Consider the demand-paged computer system where the level of multiprogramming is currently fixed at four. The system was recently deliberate to determine utilization of CPU and

Explain file control list and user control list, Q. Researchers have recom...

Q. Researchers have recommended that instead of having an access list associated with each file (specifying which users can access the file and how) we should have a user control

Estimate the continued transfer rate of drive, Q. The term "fast wide SCSI...

Q. The term "fast wide SCSI-II" signifies a SCSI bus that operates at a data rate of 20 megabytes per second when it moves a packet of bytes among the host and a device. Presume t

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