What happens to RAM if a key is pressed on the computer for a long time?

4

What happens to RAM if a key is pressed on the computer for too long? Example: computer has been turned on and a key is pressed these bytes are being read by the processor and written in memory, right?

    
asked by anonymous 29.11.2018 / 09:04

1 answer

14

Depends on what's running:

  • Nothing could happen
  • It may be that the minimum occurs and do this without taking up memory because the drive causes something momentary only
  • It may take up to 1 byte each time it has a trigger, which would take years to burst the typical memory of a computer, considering virtual memory may take centuries, hypothetically
  • It may be that a single key pops up the memory because it triggers actions that do a lot of things. That is, the "computer" does not do anything specific, it depends on the program that is running decide what to do with this drive

If the computer has just been powered on and does not have an operating system, nothing will happen. If you have a Windows and nothing else should also happen nothing important, Windows will process each drive and discard then in a text editor may burst the memory, but may have protections against this. The code that is running is what will determine what to do.

The activation of the key will create what is called interruption in the processor and this will cause a code execution to be diverted to a routine previously determined by some code, almost certainly the operating system that determined what code is a form of callback ), at least this will be the case for normal PCs under appropriate conditions .

The operating system will determine what to do with this key. It can do something simple or complex because of this, it can for example delegate the drive to the applications that are running or to the application that is in the foreground only, and there is problem of the application what to do.

It may be that the application ignores this, or it may not even be ready to receive this notification that a key was pressed, and little will happen. Usually there is a limit to what can be pending and may refuse new triggers or throw away the older ones, or have another action, it is not something that works the same forever. It accepting to receive this signal everything is possible to be done, the code can be well written or poorly written and do something good or bad, occupy memory or not.

In short, pressing the key has nothing to do with memory consumption.

    
29.11.2018 / 11:21