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

-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?

Stefan Eftan

Posted 2016-01-22T18:47:30.527

Reputation: 1

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 – 2016-01-22T18:50:30.240

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 – 2016-01-22T18:54:56.903

From same manufacturer – Stefan Eftan – 2016-01-22T18:55:41.003

In this context, do you happen to mean, a system or kernel process? – Ramhound – 2016-01-22T18:56:26.663

i mean system, but now i notice that i missed kernel in process... But if wehave Software premission to ask System to ask kernel to give direct access to usb, that doesn't possible or for securty reasons not suitably? – Stefan Eftan – 2016-01-22T19:01:47.217

1What? Your last comment is confusing. You can edit your question to clarify what your question is exactly. – Ramhound – 2016-01-22T19:05:26.540

It is a non-trivial task to write an Windows explorer replacement, you can indeed replace the shell, with a third-party application. There are many third-party Windows shell applications that exist. You will just lose all Windows Explorer features by doing so. – Ramhound – 2016-01-22T19:19:55.937

@Ramhound you can also program a windows explorer replacement and just use the explorer API's to make it behave the same as explorer, just using your own appearance and add features you want, such as a tabbed interface, etc. – LPChip – 2016-01-22T19:21:04.960

I think the technical term for direct access to the hardware layer is/was real mode. More likely, the OP is looking for direct drive access or raw disk access – Yorik – 2016-01-22T19:46:14.183

Answers

-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.

LPChip

Posted 2016-01-22T18:47:30.527

Reputation: 42 190

@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 – 2016-01-22T19:11:42.767

Nice answer, but what if it is large file? – Stefan Eftan – 2016-01-22T19:14:41.727

@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 – 2016-01-22T19:17:05.060

1While 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 – 2016-01-22T19:51:20.677

Your edit is inaccurate. – sawdust – 2016-01-22T21:53:40.377

@sawdust no, you're mistaken. if I'd program a program that interfaces with hardware as a driver does, and control the hardware directly to perform certain tasks, I could skip the copy to RAM part. Of course, the program itself would not actually know what data its accessing, but it could in theory perform a direct stream copy simply mimicking the raw data from one location to another. RAM does not have to be involved for that. I agree it is one of those rare circumstances where this is actually applicable. – LPChip – 2016-01-22T22:30:22.900

" I could skip the copy to RAM part" -- And do what with the incoming data? I described a no-RAM device-to-device copy in this answer, but the the OP is asking about an application/utility program accessing a device. That is not the same as a copy operation. Hence your claim of a no-RAM read for an application or utility program is bogus. – sawdust – 2016-01-23T07:09:10.727

-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.

sawdust

Posted 2016-01-22T18:47:30.527

Reputation: 14 697