• recategorized
5,649 views
2 2 votes

The Operating System of a computer may periodically collect all the free memory space to form contiguous block of free space. This is called:

  1. Concatenation
  2. Garbage Collection
  3. Collision
  4. Dynamic Memory Allocation

7 Answers

0 0 votes

ANSWER: B     Garbage Collection

Explanation: 

      

In order to use memory, programs conduct an action called "allocation" where part of the memory is set aside for a particular use. The C malloc() function and its counterpart calloc() are used to allocate memory. When this memory is no longer needed, it is freed with the free() function. The prototypes for both functions are available in stdlib.h. However, as memory is allocated and freed in various locations, the memory can become fragmented. Sometimes requests to allocate memory will fail as a result. The areas that are causing the allocation  problems are referred to as "garbage" for historic reasons. "Garbage collection" is the process of moving allocated memory around to make larger contiguous blocks available (like defragmenting your hard disk). However, due to very low priority for C and C++.
Answer:
Position:
Show:

Related questions

6 6 votes
3 answers 3 answers
5.3k
5.3k views
Arjun asked Apr 22, 2018
5,282 views
A computer has $1000K$ of main memory. The jobs arrive and finish in the following sequence. Job $1$ requiring $200$ $K$ arrives Job $2$ requiring $350$ $...
6 6 votes
3 answers 3 answers
14.1k
14.1k views
Arjun asked Apr 22, 2018
14,084 views
The following $C$ program:{ fork(); fork(); printf("yes"); }If we execute this core segment, how many times the string yes will be printed?Only once2 times4 times8 times
4 4 votes
3 3 answers
5.2k
5.2k views
Arjun asked Apr 22, 2018
5,222 views
The difference between a named pipe and a regular file in Unix is thatUnlike a regular file, named pipe is a special fileThe data in a pipe is transient, unlike the conte...
2 2 votes
2 answers 2 answers
1.7k
1.7k views
Arjun asked Apr 22, 2018
1,714 views
Determine the number of page faults when references to pages occur in the order - $1, 2, 4, 5, 2, 1, 2, 4$. Assume that the main memory can accommodate $3$ pages and the ...