-2

Does it go first in ram then to software? Or does some programs like Windows explorer have "VIP" permission cause they are child of OS, for direct access?

EDIT

Does it possible to make kernel, to have sofisticated instruction to give access directly to USB drive, to OSystem, and OSystem, that feature to provide for himself's programs like Windows Explorer?

9
  • Short answer: yes. Long answer: The data from the disk has to be read and interpreted before it can be displayed on the screen. It has to be stored in RAM as part of this process.
    – DavidPostill
    Jan 22, 2016 at 18:50
  • What exactly is "child of OS" in this context? If you are asking if Windows Explorer, is special, it is just a normal process just like every other process. that runs.
    – Ramhound
    Jan 22, 2016 at 18:54
  • From same manufacturer Jan 22, 2016 at 18:55
  • In this context, do you happen to mean, a system or kernel process?
    – Ramhound
    Jan 22, 2016 at 18:56
  • 1
    What? Your last comment is confusing. You can edit your question to clarify what your question is exactly.
    – Ramhound
    Jan 22, 2016 at 19:05

2 Answers 2

-1

It doesn't matter what manufacturer the program is vs the manufacturer of the hardware. When files are read they are read through RAM and accessed from there.

The reason for this behavior is because RAM is so much faster than a direct read from the device. If data is only read once, reading it directly from the device would be faster, but as soon as one small fraction of all the data is being read twice, RAM already outperforms. For that reason, it is a calculated action to always read through RAM.

However, drivers can access a device directly, and for certain actions, this is how it is being done, such as format etc. But then we are no longer talking about reading from the drive.

So long answer short, it has been designed to be read through RAM so caching cane speed up tremendously.

EDIT: But... is it possible for a programmer to program it so that the file is directly read from the device, skipping RAM all together? Yes, if they program the driver part too and access the device on a hardware level. This, however, is a very difficult task to do, and in order to make it actually faster than what the system already offers is so hard (prone to bugs, crashes, etc) that its just not worth the trouble, and for that reason, its not being done.

7
  • @Ramhound true. For the question I didn't think going into this specific detail would be required, but it is indeed what caching is about, and if a program needs a file twice, or several small sections of a file twice etc, accessing it through RAM outperforms. For example, reading a graphics bitmap to show an icon on a toolbar in the interface, which can be one bitmap in a collection file.
    – LPChip
    Jan 22, 2016 at 19:11
  • Nice answer, but what if it is large file? Jan 22, 2016 at 19:14
  • @StefanEftan I've edited my post adding a section that adresses your question. Basically it would be so low-end programming, a programmer will not do it because the costs outweight the gains.
    – LPChip
    Jan 22, 2016 at 19:17
  • 1
    While I know this is meant to be a more high-level discussion, it is important to understand that nothing happens in a computer without it being in memory. (CPU) processor registers are memory.
    – Yorik
    Jan 22, 2016 at 19:51
  • Your edit is inaccurate.
    – sawdust
    Jan 22, 2016 at 21:53
-1

Is data from a usb device stored in ram while getting same ( etc explorer listing items )?

Yes, data read from peripherals are placed in the computer's main memory, aka RAM. That is simply the way that computers work. The data has to be buffered in memory for programs to use that data.

Does it go first in ram then to software?

Data does not "go" to software.
Once the data has been read from a peripheral device into the computer's memory, then the software can process that data (in memory).

Or does some programs like Windows explorer have "VIP" permission cause they are child of OS, for direct access?

Windows Explorer, even though it is a program that is bundled with the OS, has no special privileges than any other program.
Certainly no application program could circumvent how the computer has to read data from a peripheral device.

Does it possible to make kernel, to have sofisticated instruction to give access directly to USB drive...

Computers are designed to process data in memory.
There simply is no mechanism for "access directly" the data stored in a peripheral device.
The computer "reads" the peripheral device by sending a "read command" to the device. The device is expected to respond to the command by providing the (block of) data. That data then has to be read into the computer's memory.
That is how digital computers are designed to work.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .