eli5 Why does turning an Electronic device Off and on work

11.32K viewsEngineeringOther

I’ve been wondering that how does unplugging a device and plugging it back in work?
(Sorry for bad english)

In: Engineering

4 Answers

Anonymous 0 Comments

electronics arent perfect; programs glitch out and get stuck; electrical charges get stuck in a 0 when they need to be 1 (this is where unplugging can help)

turning a device off and on is basically “somethings gone wrong; so lets just start everything over” which fixes a lot of non-hardware related issues

Anonymous 0 Comments

Restarting a device will clears out the RAM, which puts it in its default state and runs everything from scratch.

Anonymous 0 Comments

It mostly has to do with resetting all of the software back to their initial, default state.

The exact reason why they lose performance/ don’t work after prolonged use is complicated, and there could be a lot of reasons why. But they basically all boil down to the creators not being able to test *everything*, especially prolonged use.

Most standard uses of applications are well tested, but if there’s a small memory leak *anywhere* in some application, the more you use that application (and perhaps your computer, dependent on the OS) the worse your computer performs.

This is because a memory leak occurred; what really happened is the program used some memory somewhere, finished using it, but never told the OS that it’s done with the memory. So to the OS, and to *all other applications*, that memory isn’t usable, since it’s technically still in use by the original application!

The OS could wipe all memory associated with an application when it’s finished, or it could not. I’m not sure exactly, as this is OS dependent and I haven’t done any work directly with OS, so I don’t know standards. But I know enough about CS that if the OS doesn’t free all memory when an application is done, and that application had a memory leak, for the rest of the OS lifetime (I.e while your computer runs) you’ll have that piece of memory unavailable.

I think that some version of Windows back in the early 2000s had a memory leak. However it was pretty rare to occur, and they didn’t recognize the issue during any of their tests. So they ship out the new version of windows.

Weeks later people start complaining that the new version of Windows is slower than the previous. The OS had a memory leak, and these people never turned their computers off, they left them running for weeks at a time. So the leaks would slowly build up and eventually almost all RAM / memory is used, and you don’t have any left for any other applications. So the computer comes to a crawl or might not even run some applications.

So yeah, you’re basically just wiping the memory. This is why it was so important to be good with memory cleanup as a programmer before garbage collection languages come about like Java, Python, etc. Applications written in those programs fundamentally can’t have a memory leak since the language/compiler is doing all the memory stuff for you, and that’s pretty robustly tested. However things in C, C++ and other languages can run into these problems if they’re not programmed well.

The OS is entirely written in C and some assembly, so if the OS isn’t a robust, formally defined system there’s a good chance a memory leak will pop up (moreover the complexity and length is absurd) just as the case with Windows.

Many professional grade applications are written in C++. Things like Excel, Word, Spotify — the things you interact with daily — are all written in C++ and could have memory leaks. So if you play League of Legends all day, streaming Netflix on another monitor with Spotify playing in the background — your computer could come to a crawl from nothing but memory leaks over the course of a few days. I would honestly think these things are well tested for weeks runtime at this point (ever since the windows fiasco) and so the chance is low, but it’s definitely still there. My computer almost always runs faster after a reboot, and this is partially (but not entirely) why. There could be hardware problems that cause other issues that I have no idea about, I’m not educated in hardware at all.

Anonymous 0 Comments

It’s like cleaning up your desk. As you work, you put some notes here, maybe you eat lunch or a snack and have dishes to a side, pens and other stuff strewn about. Eventually it becomes hard to move your mouse because there’s no more space. So you pick up everything, throw away your notes, put your pens away. Now you have a pristine desk with plenty of space to work. That’s what turning a computer off and on again does. All of the bits of data in its temporary memory all of the commands in its instruction queue, they all get thrown out and it gets to start doing work with a clean desk.