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

Subject: system analysis (2000 word), Overview: In this assignment, you are...

Overview: In this assignment, you are going to perform a system analysis and design of a membership and facility management system of a gymnasium of given case study Task: You are

Removing system dependencies, Removing System Dependencies Because port...

Removing System Dependencies Because portions of the client - server application program may execute on different machines, it is very important for the developer to remove the

What is the use of FIFOs in client-server applications, What is the use of ...

What is the use of FIFOs in client-server applications

#title.Kernal, Ask questiWhat is dispatcheron #Minimum 100 words accepted#

Ask questiWhat is dispatcheron #Minimum 100 words accepted#

Performance of job scheduling strategies, Performance of Job Scheduling  St...

Performance of Job Scheduling  Strategies In this project you will investigate the performance of Job Scheduling strategies, Memory Allocation strategies and a CPU Scheduling s

Linux, shell script that accepts two directory names as arguments and delet...

shell script that accepts two directory names as arguments and delete those file in the second directory that are identical to the file in the first

Process destruction, Most process abstractions support processes being dest...

Most process abstractions support processes being destroyed when the program terminates, or in response to a specific kill directive. There are two common implementations, one a "p

#title:cs604, Consider a scenario of post mailbox, there are two processes ...

Consider a scenario of post mailbox, there are two processes named sender S and receiver R. Both processes can communicate with each other by name along with message. You need to I

What is the kernel, What is the kernel? A more common explanation is th...

What is the kernel? A more common explanation is that the OS is the one program running at all times on the computer  usually known as the kernel, with all else being applicati

What are the objectives for a file management system, What are the objectiv...

What are the objectives for a file management system? To meet the data management wants and requirements of the user, which embrace storage of data and the ability to

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