Reference counting, Operating System

Assignment Help:

The idea of reference counting is to maintain, for every object, the total number of references to that object, i.e. the number of "incoming" pointers. Whenever the number of references is zero we know that the object is not accessible through any pointers, and thus it is garbage. Also, whenever we choose to delete some useless object,we have to recursively check that object to see if it contains pointers to other objects; if so, we have decrement the reference counters for those objects as well. One problem of reference counting, though, is how to deal with cycles. Suppose object A points to B, and B points to A. If these objects can only be reached through each other, we have to free them too, even though their counters are not zero! Note that cycles can common inmany data structures; for example, consider a doubly-linked list. The commonly adopted solution to this problem is to run mark-sweep now and then, in order to remove cyclic references, and then run normal reference counting on the rest of the time.


Related Discussions:- Reference counting

Assignment, i need the job to be done within 3 days

i need the job to be done within 3 days

Starvation, what do you mean by starvation?explain in detail

what do you mean by starvation?explain in detail

Define input - output operations, Q. Define Input - Output operations? ...

Q. Define Input - Output operations? Serial lines, Disks, tapes and other devices should be communicated with at a very low level. The user require only specify the device and

Write a short note on pcb, Write a short note on PCB? Every process is ...

Write a short note on PCB? Every process is represented in the operating system by a process control block also called a task control block. It contains more information regard

What is time-stamping, time-stamping It is a method proposed by Lampor...

time-stamping It is a method proposed by Lamport, used to sequencing events in a distributed machine without the use of clocks. This process is intended to order events consis

Queing theory, how to solve queing theory step by step

how to solve queing theory step by step

Effects of multiprogramming on resource utilization, Effects of multiprogra...

Effects of multiprogramming on resource utilization With the utilize of multiprogramming, batch processing is able to be quite efficient .Just as multiprogramming permits the

Define drawback of distributed systems, Define drawback of Distributed syst...

Define drawback of Distributed systems Reliability is a drawback of Distributed systems

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