Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Hard disk LEDs and noisy machines (by Julio Merino) (Developers)

posted by samwdpckr, 18.02.2024, 19:02

> Since an SSD is up to 10 times the speed of an HDD... even with a disk
> activity LED
> it would blink once for a split-second for the same operation that would
> take a few seconds on an HDD.
>
> Even an operation that would take a minute on an HDD would be done in only
> 6 seconds on an SSD
That does not change anything. Having the indicator led still makes sense.

> And what users EVER sit there watching for a minute or more for the HDD
> LED
> to go out before starting another operation ? ;)
If some operation is very heavy in disk I/O and takes a minute to complete, it makes very much sense to wait for that operation to complete before starting anything new.

> > ...
> > Hard disk reads cannot be buffered like writes can ...
>
> Not true. In fact, the default for most disk caching programs is to ONLY
> cache/buffer reads. Writes are not buffered at all -- they are simply
> "passed through" in real time and not delayed. Read caching of the FAT
> area of the disk can make a HUGE difference in speed on large disks and
> floppies.
You are confusing buffering and caching. If a program makes a read() syscall, the syscall always blocks _until the data has been read from the disk_. If there is a disk cache and the requested data can be found from the cache (in which case the data has already been read from the disk before the syscall), then the kernel just copies the data from the cache and no disk I/O operation is needed. But that is caching, not buffering.

On multitasking operating systems the kernel can usually give CPU time to other processes while one process is waiting a disk I/O operation to complete, but usually only one disk I/O operation is possible at a time, so things become very slow if the user asks the computer to do two simultaneous tasks which both require disk reads.

Writes are usually almost always buffered on modern operating systems, and the kernel does not immediately flush the buffers to the disk, so a write() syscall usually returns immediately, unless the program is writing very large amounts of data and the buffers cannot fit into the memory.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 52 users online (0 registered, 52 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum