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

Compression regarding the file system in windows 2000, Write short note on ...

Write short note on compression regarding the file system in Windows 2000. NTFS is able to perform data compression on individual files or on all data files in a directory. To

Cpu scheduling algorithm, Q. A CPU scheduling algorithm determined an orde...

Q. A CPU scheduling algorithm determined an order for the execution of its scheduled processes. Convinced n processes to be scheduled on one processor how numerous possible differ

Explain the procedure for handling the page fault, The procedure for handli...

The procedure for handling the page fault is as follows 1. We check the internal table to verify whether the reference was valid or invalid. 2. If the reference was invalid,

Introduction to paging, We will brie?y introduce paging to ?nish off this l...

We will brie?y introduce paging to ?nish off this lecture. When a process is loaded, not all of the pages are immediately loaded, since it's possible that they will not all be need

Define a layer that is not of an io management module, Define a layer that ...

Define a layer that is not of an IO management module  MCS that is Management Control System is not of an IO management module

History of operating systems, Operating Systems have evolved tremendously i...

Operating Systems have evolved tremendously in the last few decades. The first approach for building Operating Systems, taken during the 40s through early 60s, was to allow only on

Explain root partition, Explain root partition The root partition,which...

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

Explain demand paging in virtual memory system, Question 1 Explain with di...

Question 1 Explain with diagram all possible states a process visits during the course of its execution Question 2 Discuss Inter-process Communication. What is critical-secti

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