Why are programs allowed to overtake processor and memory to the point of stalling the system?

Chat about Linux in general
Post Reply
Morgan Krieg
Level 1
Level 1
Posts: 48
Joined: Mon Nov 22, 2010 12:46 pm

Why are programs allowed to overtake processor and memory to the point of stalling the system?

Post by Morgan Krieg » Wed Sep 19, 2018 8:47 pm

I find it bewildering that stuff like that can actually happen. One would think that there would be some kind of a mechanism that would prevent programs from making the system unresponsive.

User avatar
AZgl1500
Level 9
Level 9
Posts: 2718
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Why are programs allowed to overtake processor and memory to the point of stalling the system?

Post by AZgl1500 » Wed Sep 19, 2018 8:57 pm

System Monitor sure shows that in a hurry.

I have more trouble with the browser trying to load a bad page, than anything else.

cpu#3 goes to 100% and game over.
I hit ^Q and wait, and eventually it exits.

Morgan Krieg
Level 1
Level 1
Posts: 48
Joined: Mon Nov 22, 2010 12:46 pm

Re: Why are programs allowed to overtake processor and memory to the point of stalling the system?

Post by Morgan Krieg » Wed Sep 19, 2018 9:29 pm

AZgl1500 wrote:
Wed Sep 19, 2018 8:57 pm
System Monitor sure shows that in a hurry.

I have more trouble with the browser trying to load a bad page, than anything else.

cpu#3 goes to 100% and game over.
I hit ^Q and wait, and eventually it exits.
Yeah, it's also mainly browser for me. Especially with YouTube lately.

Though I generally wonder why it's allowed to happen.

srq2625
Level 4
Level 4
Posts: 358
Joined: Tue Jan 08, 2013 11:35 am
Location: State: Constant Confusion, Country: D'oh

Re: Why are programs allowed to overtake processor and memory to the point of stalling the system?

Post by srq2625 » Thu Sep 20, 2018 6:36 am

Morgan Krieg wrote:
Wed Sep 19, 2018 9:29 pm
Though I generally wonder why it's allowed to happen.
This has been the situation with operating systems since ... well, since the beginning. What usually happens is programs (can be any program, not just browsers) request resources and the O/S delivers - that's it's job. If memory is requested and swappiness is set too high and unallocated memory runs low, then the O/S will make use of the swap file/partition - if there is one - rather quickly.

Setting swappiness to a lower value (see this page, left column, item 1.6 for details) will allow the computer to avoid using swap a bit longer and, maybe, completely - just depends on what the user is doing and how much memory is being requested relative to how much memory is available on his/her computer.

User avatar
snowflake
Level 2
Level 2
Posts: 60
Joined: Tue Jul 03, 2018 12:52 pm

Re: Why are programs allowed to overtake processor and memory to the point of stalling the system?

Post by snowflake » Thu Sep 20, 2018 7:23 am

Morgan Krieg wrote:
Wed Sep 19, 2018 9:29 pm

Though I generally wonder why it's allowed to happen.
I'm guessing to pressure you into upgrading so that hardware manufacturers make more money
to prevent you from running anything else so you have to stay in YouTube
but its most likely because occasional intense labor will help your system build muscles, & get healthier, sometimes your system tries to punch above its weight and gets KO'd by drug abusing athletes like YouTube :D :D

jokes aside, I think the only way to prevent that is by Not allowing the cpu (i really rarely worry about memory) to ever run 100%, & that will probably prevent a lot of programs from even launching, apart from known software that need cpu like games & web browsing, programs cpu use peaks when they get launched, anything they do after wont be as bad..

& i dont really worry about memory, i think its always predictable when you're running out of memory (unless bug), so it is easy to manage, & ofc not as bad as when the cpu gets pissed

Post Reply

Return to “Chat about Linux”