mnordber
mnordber

Reputation: 1183

Is it possible to purposely make a program thrash?

I know what thrashing is but after taking my operating systems course at university, I was wondering if it is possible to purposely get a program thrashing or are the operating systems of today "too smart" to fall for any tricks?

Can I make my program spend more time loading pages than executing code in any way?

Upvotes: 0

Views: 652

Answers (1)

user3344003
user3344003

Reputation: 21637

If you deliberately wanted a process to thrash, you could allocate as many pages as possible to the process, then randomly write to different pages.

This only works if you can allocate enough memory that is greater than the physical memory available on the system.

Upvotes: 1

Related Questions