Why does closing applications cause your pc to hang more when it is freeing up space in ram?

167 views

Why does closing applications cause your pc to hang more when it is freeing up space in ram?

In: 98

6 Answers

Anonymous 0 Comments

The thing about ram is that more isn’t always better; since the system has to keep track of it. You see this in games (Minecraft has this) that allow you to allocate custom amounts of ram, which can cause performance issues as the system has to keep track of all of that ram.

So if you are closing an application that’s taking a ton of ram, the system is going to have to mark all of that ram as ‘unused’

Unless you mean it hangs up repeatedly, in which case i’m not sure why it would do that.

Anonymous 0 Comments

Closing an application *correctly* takes work. The application needs to save any work you’re doing (which can consume more RAM), save your current preferences (which can consume more RAM), find and close any handles to resources it has open (which can trigger processes that consume more RAM), and a bunch of other things that leave the computer in a nice state but take work to do. Worse, the “shutdown” parts of the program are infrequently used so they aren’t in RAM when you close it, which means the computer has to make room in RAM, then move those parts of the program to RAM before it can start!

Imagine a desk that’s completely covered with toys and supplies and paperwork. Cleaning it off is very slow at first, because you’ll have to move some things around just to find things that should go together. A desk that’s already almost clean is very easy to finish cleaning off. RAM’s the same way. The more crowded it gets, the more likely doing anything to deal with the problem is going to make things a little worse before they get better.

Anonymous 0 Comments

Two things.

First, correctly shutdown requires work to be done. Just removing things from memory is fast. If you tell a program to close, it will likely have to do some tidying up before closing

Second, there are mechanisms to offload some memory to disk (swap and pagination are the terms to lookup), this exists because memory is limited and usually you have way more disk space. When your pc memory is filling up, the OS will store some of that in the hard drive (wich is slower) and it need to access it later, when you close a program that hasn’t been used for some time, the OS first needs to load the memory from disk and then close the program

Anonymous 0 Comments

You’ve got a bunch of things on your desk. You can just wipe your arm across it, knocking everything to the floor. This clears the desk fast, but maybe something got broken, misplaced or damaged. This is force closing.

Or you take the time to properly put everything away, much less chance of damage. This is exiting normally.

Anonymous 0 Comments

It’s like if you eat a lot of food and then need to get rid of the food. You spend time in toilet pooping. You have to stop and do it. So you hang for a while. Same for pcs

Anonymous 0 Comments

RAM isn’t everything. Sometimes the program needs to do a bunch of stuff to shut down correctly, so the program has to wait until the CPU has finished performing those operations. The other thing is the hard drive (which is the slowest part of my computer). If your program wants to save info to the drive, then it has to keep the program open until that’s done. The other thing with the hard drive is that Windows can assign some of a programs’ memory to the hard drive, called virtual RAM, instead of being limited to the physical RAM in the computer. This is useful because you don’t run out of RAM and crash the computer, but it can cause delays when you need to access a program that is partly or completely in virtual RAM, because it needs to be read off the drive. This is less of an issue with SSD drives where the read and write times are much quicker.