0
$\begingroup$

So when I play a video, that means the video is moved from backing store to main memory. Then if I remove my laptop's battery all of sudden, that means the video should get lost as main memory is volatile. Why doesn't this happen though?

$\endgroup$
4
  • 4
    $\begingroup$ They never leave the backing store... $\endgroup$ Jun 5, 2017 at 17:55
  • 3
    $\begingroup$ By the way, a video is not a program. (Except in the trivial sense that if you interpret every program as an interpreter, then every data file is a program for its interpreter.) $\endgroup$ Jun 5, 2017 at 19:45
  • $\begingroup$ By the way 2: programs don't necessarily get moved from backing store to main memory. On some OSs the backing store could get mapped into the address space. This is sometimes done on systems with limited memory. $\endgroup$ Jun 5, 2017 at 19:46
  • $\begingroup$ @JörgWMittag wrt your first comment I don't see this as an unfair comparison $\endgroup$
    – cat
    Jun 5, 2017 at 19:57

2 Answers 2

12
$\begingroup$

Because it isn't moved: it's copied.

$\endgroup$
5
$\begingroup$

Main memory is volatile, secondary memory is not. The video is physically stored in the secondary memory(hard drive). The main memory just fetches this data and copies it in a location on command by the program making the fetch. (video player for this example) This data is lost from the main memory since it requires constant "refreshes"(power) to access temporally stored data in it. Therefore if you remove the battery the main memory loses it but the secondary memory doesn't since it doesn't require a constant "refreshes", its magnetically saved and doesn't depend on a power source to stay there.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.