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

Mark-sweep, The objects that a program can access directly are those object...

The objects that a program can access directly are those objects which are referenced by local vari-ables on the processor stack, or by any global/static variables that refer to ob

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

Explain multitasking operating system, Multitasking - An Operating systems...

Multitasking - An Operating systems that is proficient of allowing multiple software processes to be run at the same time. Below are some instances of multitasking Operating Syste

Explain segmentation hardware?, Explain segmentation hardware? We defin...

Explain segmentation hardware? We define an completion to map two-dimensional user-defined addresses into one-dimensional physical addresses. This mapping is affected by means

Define process swapping , Swapping : Whole process is moved from the swap...

Swapping : Whole process is moved from the swap machine to the main memory for execution. Process size must be equal or less than to the used main memory. It is easier to exe

Producer – consumer process, Step by step displays the content, and the fin...

Step by step displays the content, and the final result of the list ("buffer") of 6 elements as the initial values ??and the following elements which are produced (NEXTP) or consum

Roles of operating systems, Describe Three major roles of operating systems...

Describe Three major roles of operating systems in business computer systems

Explain how a domain user account is authenticated, Question: a) The fo...

Question: a) The following questions pertain to User and Group accounts in Windows XP: i) Give four differences between a Power User and a Guest User account. ii) Explain h

Define dynamic linking, Define dynamic linking. Dynamic linking is same...

Define dynamic linking. Dynamic linking is same to dynamic loading, rather that loading being postponed unless execution time, linking is postponed. This feature is usually use

Read - write cycles of microprocessors, Examining the write/cycles as shown...

Examining the write/cycles as shown below We can see that the bus is designed for asynchronous read/write cycles. The operation of the write cycle is simple in that the add

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