The problem of thrashing is affected significantly by: A. program structure B. program size C. primary-storage size D. all of the above E. None of the above

[amp_mcq option1=”program structure” option2=”program size” option3=”primary-storage size” option4=”all of the above E. None of the above” correct=”option4″]

The correct answer is D. all of the above.

Thrashing is a condition that occurs when a computer system spends more time paging data in and out of memory than it does executing instructions. This can happen when the system is overloaded with programs or when the programs are too large to fit in memory.

The problem of thrashing is affected significantly by the following factors:

  • Program structure: The way that a program is written can affect how much memory it uses. For example, a program that uses a lot of dynamic memory allocation is more likely to cause thrashing than a program that uses static memory allocation.
  • Program size: The size of a program also affects how much memory it uses. A larger program is more likely to cause thrashing than a smaller program.
  • Primary-storage size: The amount of primary storage available to a system also affects the likelihood of thrashing. A system with a small amount of primary storage is more likely to experience thrashing than a system with a large amount of primary storage.

In order to prevent thrashing, it is important to design programs that use memory efficiently and to allocate enough primary storage to the system.