Re: pipes
moi wrote:
AFAIK, writes of machine-words are atomic.
That depends on the silicon it is running on. While I don't know of any today
that aren't, don't depend on this for tomorrow.
Reads/writes to disks are atomic, too; (modulo pagesize). This can only be
violated by a hardware crash.
This isn't true. There exists hardware where each byte is read by spin loops.
Loops can get interrupted. Also there is hardware where each byte is read by
interrupt. Interrupts can be blocked or higher priority ones arrive. And it
may not be true even for DMA hardware as usually there is a reset command that
can be issued to the hardware that will abort a transfer in progress. Also I
believe you meant to say modulo device sector size. And you have totally
forgotten write with read back check where the read back fails, the driver may
do other things before it tries a rewrite and re check, or it may even spare a
sector.
.
Relevant Pages
- Re: Polling loop good here???
... The "vertical retrace interrupt" was IRQ 2... ... In today's hardware - as has been mentioned - they've almost certainly ... it...make use of the drivers... ... (alt.lang.asm) - RE: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
... >> polling is less ... It depends on the hardware. ... >has built-in hardware interrupt throttling (such ... (freebsd-questions) - Re: linux-next: Tree for June 13: IO APIC breakage on HP nx6325
... If your patch is applied in its present form, all of the boxes from HP ... The workaround makes the system use the mixed interrupt mode (well, ... but it does not make your piece of hardware less broken. ... If we stopped using parts of some spec, ... (Linux-Kernel) - Re: Polling for ath driver
... but we've found polling to be extremely valuable on low-end hardware as described here. ... We use it only on fxp drivers, but it moved throughput on 133Mhz hardware from something around 8Mbps to 20Mbps on regular layer-3 packet forwarding and also bumped VPN performance up significantly when used with hardware VPN accelerators. ... Unless you've significantly restructured the interrupt handling in the ... Adding polling to this driver does increase performance on embedded ... (freebsd-net) - Re: How to debug inside the BIOS and/or interrupt?
... I'm not sure I can help with your specific code problem but if the program works when you read only one chunk of data at a time from disk, but locks up after a while if you read multiple chunks, then probably one of two things is happening -- some memory is being corrupted or an interrupt is taking too long somewhere. ... one nice way to debug interrupt problems on such hardware is to modify your interrupt routine so that it toggles a pin that you can look at with a 'scope. ... That's usually not wise to attempt within an interrupt but you can simulate such a thing by doing something like writing to a fixed, preallocated error log in memory, or to a hardware register. ... Again you might find the printer port convenient for this, or if you have at least an EGA compatible display on your hardware, you can do things like change the background color of the screen by writing to the overcan register. ... (comp.lang.asm.x86) |
|