Hi, Garbage collection runs as a LOW priority thread. well whenever a object ceases to exist or an explicit declaration 'obj=null',this object is ONLY marked for GC, but u really never have control as to when it would release the memory in the pool.
Time slicing:In a multithreaded program,n number of threads may b running concurrently.To enable execution of these threads ,the processor divides its time into slices and assigns these time-slices to the processes. It runs a process(a thread) for few milliseconds, saves its state and switches to the next process, runs it for few milliseconds, saves it state and switches to next and so on. This can also be termed as "context switching".
Hi senthil sen, Garbage collector is a low(min) priority thread that runs behind the screen. About time slicing , its same as round robin implementation.The OS thread schedular allocates some defined time for each thread to consume CPU cycles and it keeps rotating between threads. Basically there two implementations for thread schedular , 1)Preemptive Scheduling 2)Time Slicing. In First case , heigher priority threads gets full access over processor.In second case, each thread gets chance to get executed. hope i answered ur question.
---------------------- Sharing is better way of learing.. Prashant
--------------<br />Prashant<br />SCJP-91%
subject: Garbage collection thread belongs to which priority..min?normal?max?