GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 916 of 921    Print  
Garbage collections
What is marker sweeper algorithm in garbage collection?


  
Total Answers and Comments: 1 Last Update: June 30, 2008     Asked by: usguru 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 30, 2008 00:34:25   #1  
bh2008 Member Since: June 2008   Contribution: 2    

RE: Garbage collections
"Mark the unused object for garbage collection and collect it."
As per the algorithum there will be two thread.
One will mark all the unreferenced object for garbage collection and the other will reclaim the marked object memory.

 
Is this answer useful? Yes | No

 Related Questions

The Collections API is a set of classes and interfaces that support operations oncollections of objects. 
Latest Answer : Collection API's are a group of classes where we can store more then one objects in as a single unit. Collection give some useful API where we can directly implement the Data structures. ...

The List interface provides support for ordered collections of objects. 
Latest Answer : The list interface extends Collection and declares the behaviour of a collection that stores a sequence of elements. Elements can be inserted or accessed by their position in the list, using a Zero-based index. Alist may contain duplicate elements. ...

Garbage collection does not guarantee that a program will not run out of memory. It ispossible for programs to use up memory resources faster than they are garbage collected.It is also possible for programs 
Latest Answer : The object is eligible for garbage collection only if there is no strong reference to the object. An exception to this is island of references(where all objects point to each other).And you should never write your significant code in the object's finalise ...

An object's finalize() method cannot be invoked by the garbage collector while the objectis still reachable. However, an object's finalize() method may be invoked by otherobjects. 
Latest Answer : No, reachable obejcts can not be garbage collected ...

The purpose of finalization is to give an unreachable object the opportunity to performany cleanup processing before the object is garbage collected. 
Latest Answer : Java provides a method called finalize( ) that you can define for your class. Here’s how it’s supposed to work. When the garbage collector is ready to release the storage used for your object, it will first call finalize( ), and only on the next garbage-collection ...

An object's finalize() method may only be invoked once by the garbage collector. 
Latest Answer : What if in the finalize method I make the object reachable.class a{        b b1=null;        ..}class b{        a a1=null;        ...

A reachable object cannot be garbage collected. Only unreachable objects may begarbage collected.. 
Latest Answer : No. An object cannot be garbage collected when it is reachable. ...

The garbage collector invokes an object's finalize() method when it detects that the objecthas become unreachable. 

Once an object is garbage collected, it ceases to exist. It can no longer become reachableagain. 

The purpose of garbage collection is to identify and discard objects that are no longerneeded by a program so that their resources may be reclaimed and reused. 


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Java Technology Trends

Technology Trends Involving Java Java is an object oriented programming language OOP for Web browsers It is organized around data rather than actions and supports polymorphism which allows the same code to be written generically so it can function with different datatypes inheritance which allows on
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

HR Interview - How To Prepare For Your HR Interview

How To Prepare For Your HR Interview Before you begin thinking about how you are going to dress for the interview it is important to do your research first You should learn everything you can about the company you wish to work for When you have detailed information about your employer you will conve
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape