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

What is graceful degradation, What is graceful degradation? In multipro...

What is graceful degradation? In multiprocessor systems, failure of single processor will not halt the system, but only slow it down by sharing the work of failure system by ot

Explain the concept of mutual exclusion, Question 1: (a) Discuss about...

Question 1: (a) Discuss about the evolution of operating systems from mainframe batch systems to mainframe time sharing systems. (b) Explain your understanding of the "sus

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

what do you mean by starvation?explain in detail

Server thread, Extend task 1 so that the requests are issued by the clients...

Extend task 1 so that the requests are issued by the clients instead of the server. The server now do not use the "all_requests.dat" file. Instead every client thread reads from

Explain the beginthread function used in the netware, Explain the BeginThre...

Explain the BeginThread Function used in the NetWare example code BeginThread(MyThread Function, stack,size, arg) BeginThread creates a thread and places it on the NetWar

How many disks can be used effectively by one fast wide bus, Q. More than ...

Q. More than one disk drive is able to be attached to a SCSI bus. Especially a fast wide SCSI-II bus can be connected to at most 15 disk drives. Remember that this bus has a bandw

Explain the resource ownership by platform, Explain the Resource Ownership ...

Explain the Resource Ownership by Platform Ownership of data items may further be complicated by concepts defined in certain operating systems. Each operating system defines "p

Index node (inode), A file system depends on data structures about the file...

A file system depends on data structures about the files, beside the file structure. The former is named metadata-data that defines data. Each file is accumulated with an inode, wh

List the four steps that are essential to run a program, List the four step...

List the four steps that are essential to run a program on a completely dedicated machine. a. Reserve machine time. b. Manually load program into memory. c. Load starting

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