why computers need to be restarted periodically to function correctly

942 views

I work at a major tech company and most times I go to IT, they tell us to restart our computer. Why is this a necessary process to maintain a normal operating experience?

In: 38

37 Answers

Anonymous 0 Comments

Two reasons. Computers do a lot of math. Billions of calculations every second. And because of how binary math works, none of that math involves decimals or fractions or negative values. Everything is a positive whole integer. But we need all the other stuff in math, so we’ve figured out clever ways to represent those values. Where the decimal goes or whether a number requires a +- sign, etc. But that leads to a lot of rounding. Over time, rounding can lead to errors. If you round from 4 down to 0 once per second, and from 6 up to 10 once per second, you come out even over time. But if you only round from 6 to 10 every second, you artificially add 4 every single time, introducing error. This error may or may not cause issues, and sometimes it takes a long time to see it. When you restart the computer, the math blocks restart from 0, flushing the accumulated error.

The second reason is memory leak. When a program opens, the computer finds a block of free memory it can use and tells the program where it is. The program may use all of it, or part of it, and can even request more. When the program ends, or even just a small temporary process within the program, it is supposed to release that borrowed memory block back to the processor. The processor does not track the blocks loaned out, that’s done by the program, it just sees a flag that a certain block has already been assigned and so it can’t be assigned right now. But tracking all of the memory blocks used by the program can be challenging, even with very good programming. So it’s not guaranteed that all of it will be released. With a huge amount of memory and simple programs only needing small amounts, this can be a non-issue for many months. But with large programs like photoshop or graphics heavy games, a lot of memory is needed at once. If a ton of small chunks of memory have been claimed over time but not released, the computer has to sort through many, many small areas of free space instead of one large chunk to give to the program. This takes additional time for the processor to sort and leads to lag. If enough memory has been leaked, the program won’t even start. A power reset forces all programs and processes to end, thereby force flushing all of the memory chunks back to unclaimed.

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