Comparing gc to malloc, Operating System

Assignment Help:

Garbage collectors trade space for time. If we collect all the time (which requires a lot of processing time), the GC allocator will use the least memory possible. On the other hand, if we have a lot of space to use, we can collect very infrequently and thus be very fast. In general, with enough extra memory, GC can take almost no extra time extra, when compared to explicit memory management. For example, if we are willing to spend 4x more space than usual, garbage collection can run as fast as explicit memory management; if, on the other hand, we don't give it too much space, it will have to run very frequently and thus will demand much more processing time than
explicit memory management.

Faced with this tradeoff, when should we use a garbage collector instead of manual memory management? Generally, use a garbage collector 1) if you have lots of memory; and 2) if we really want to avoid bugs or extra programming effort related to memory management. If, however, hardware resources are the limiting factor and programmer resources are less of a limiting factor, then manual memory management is probably a better idea.


Related Discussions:- Comparing gc to malloc

Most wans utilize only a partially connected topology, Q. Most WANs utilize...

Q. Most WANs utilize only a partially connected topology. Why is this subsequently Answer: Cost. A completely connected network requires a link between every node in the netw

Why do systems store the operating system in firm ware, Q. Why do several s...

Q. Why do several systems store the operating system in firm ware and others on disk? Answer: For certain devices such like handheld PDAs and cellular telephones a disk with

Define shell in unix system, A Unix shell is a shell or command-line inte...

A Unix shell is a shell or command-line interpreter that gives a traditional user interface for the Unix-likesystems and for Unix operating system. Users operates the operation of

Define the non monolithic coding, Define the Non Monolithic Coding Fir...

Define the Non Monolithic Coding First off, client - server developers must adopt a new programming mindset. Much as with the shift to object - oriented design, developers sho

Changing the runlevel of system from 5 to 3 on startup, Front page We n...

Front page We need to continue or customization and documentation of our system. Currently our system boots into runlevel 5 and we need it to boot into runlevel 3. For future r

How is it different from the unbounded buffer algori, How is it different f...

How is it different from the unbounded buffer algorithm ? Explain.

Invalid page fault, Invalid page fault :If a page fault happens for a ref...

Invalid page fault :If a page fault happens for a reference to an address that's not part of the virtual address space, so that there could not be a page in memory corresponding

Explain file control list and user control list, Q. Researchers have recom...

Q. Researchers have recommended that instead of having an access list associated with each file (specifying which users can access the file and how) we should have a user control

Linux, how to find ncr value in shell script

how to find ncr value in shell script

Memory management, example of first fit best fit and worst fit

example of first fit best fit and worst fit

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