Investigation and comparative studies of algorithms for collection of unrefered memory in real time and distributed system