Reference counting, Operating System

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.

Posted Date: 3/13/2013 2:56:10 AM | Location : United States







Related Discussions:- Reference counting, Assignment Help, Ask Question on Reference counting, Get Answer, Expert's Help, Reference counting Discussions

Write discussion on Reference counting
Your posts are moderated
Related Questions
Q. Catalogue the design goals of Windows XP. Answer: Design goals comprise security and reliability and Windows and POSIX application compatibility with high performance and ex

What are the main differences between operating systems for mainframe computers and personal computers? The design goals of operating systems for those machines are quite diffe

Medium term scheduling is form of the swapping operation. This attaches to processes that are in a suspended or blocked state. They are swapped out of real-memory storage until t

In a multiprogramming and time sharing environment several users share the system simultaneously .what are two such problems?

Explain root partition The root partition,which have the operating-system kernel and potentially other system files, is mounted at boot time. In successful mount operation, ope

what is the meaning of co-operating process?

Multi-level page tables are tree-like structures to hold page tables. As an example, consider a two- level page table, again on a 32-bit architecture with 212 = 4 kbyte pages. Now,

Explain Formal Language Grammar A formal language grammar is a set of formation rules which explain which strings formed from the alphabet of a formal language are syntacticall

Long term scheduler calculates which processes are admitted to the machine for processing. It accepts the degree of multiprogramming. Once accepted, a job converts a process.

Basic File System Uses the specific device driver. Deals with blocks of data that are exchanged with the physical device. Concerned with the placement of blocks on