What causes a program to lag?

2.19K views

Imagine you finished browsing on chrome and want to end your session… You click on that red X to close everything… And then your computer just hangs there. What causes this lag? Theoretically shouldn’t the computer be erasing stuff from memory, not lagging?

In: Technology

4 Answers

Anonymous 0 Comments

The os could close the program fast by simply not giving it more cpu time and releasing all the resources associated (memory, files, windows, sockets, whatever). It doesn’t do that because programs like to do their own cleanup as well, so when you press the X it just signals to the program to please close yourself. If for example it has a ton of data it wants to write down to disk or just too many open files, or reports back to some network address about something, it’ll take some time.

You are viewing 1 out of 4 answers, click here to view all answers.