Is it a real time operation when reading files from the disk on FreeRTOS?

Is it a real time operation when reading files from the disk?

If not, is it possible to implement a real-time API for reading files?

I doubt it, but it will very much depend on the disk and file system. If there are variable seek times, or disk caches, etc. then read times will be very variable.

What about ssd, or flash disk?

Generally, a ‘Real Time’ operation is one that you apply a somewhat strict deadline for when it needs to get done. (It doesn’t just mean do it fast) Most operating system don’t try to make disk I/O Real Time, in that they don’t try to schedule the I/O to give priority to tasks that have tighter real time constraints.

You could make an Disk Operating System that kept track of task priorities for disk I/O and would be able to make some promises about availability to time critical tasks, making it mostly real time.

As was mentioned, there are variable timings involved, so unless you are doing VERY careful scheduling if you need very tight timing.

“You could make an Disk Operating System that kept track of task priorities for disk I/O and would be able to make some promises about availability to time critical tasks, making it mostly real time.”

Is there any OS that could meet this requirement?

You could make an Disk Operating System that kept track of task priorities for
disk I/O and would be able to make some promises about availability to time
critical tasks, making it mostly real time.

Is there any OS that could meet this requirement?

I don’t think so especially when using somewhat smart disks like SSD or CF having their own controller inside responsible for complex flash management. This includes finding already erased blocks or doing (long lasting) erase of meanwhile unused blocks, wear leveling etc. internally on write to disk. That’s the reason why real-time behavior can’t be achieved because no one can guarantee deadlines for disk I/O ops.
It’s not really RTOS dependent, it’s the media.
You might only get real-time guarantees when using your own, raw media like EEPROM or flash chips directly connected to your MCU running a RTOS and under control of your or an appropriate 3rd party software/driver where you can exactly determine, how long e.g. a worst case erase/write operation of a data block takes.
The pragmatic solution is: get a drive where the data sheet tells you that it’s average speed is fast enough or better much faster than needed, choose an appropriate file system and MEASURE.

I know of no DOS that does designed for that purpose. It is perhaps possible to write your own disk I/O system that might be able to meet some level of Real Time requirements using things like the FAT file system driver. The requirements will tend to be a bit looser than what you might expect from other Real Time components, and may require some constraints on the code using it as disk I/O, and especially File System operations, are inherently slow and can be variable in timing.

The big question comes, what are your expectations for a "Real Time’ disk operation?

I know of no DOS that does designed for that purpose.
Is there some clerical error?
DOS? Do you mean OS?

The big question comes, what are your expectations for a "Real Time’ disk operation?
Our real-time application needs to read some files now and then. We hope the application could guarantee a deadline.

Reading files is much simpler (and faster) than writing. As long as the media is not simultaneously written you’ll get pretty good RT behavior.

Reading files is much simpler (and faster) than writing. As long as the media is not simultaneously written you’ll get pretty good RT behavior.
Writing files are not needed.