From: ronenp AT netvision DOT net DOT il (Ronen Friedman) Newsgroups: comp.os.msdos.djgpp Subject: DOS write buffers & DJGPP? Date: Sun, 05 Jan 1997 15:43:19 GMT Organization: NetVision LTD. Lines: 27 Distribution: world Message-ID: <32cfc7cd.31390016@news.netvision.net.il> Reply-To: ronen AT friendly DOT co DOT il NNTP-Posting-Host: ts017p12.pop9a.netvision.net.il To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Greetings, I'm prototyping an embedded system on a PC with DJGPP, and encountering the following problem. I'll appreciate if somebody has a clue: I'm writing an history log into a file, using write(). I noticed (well - it wasn't very hard to notice...) that the system hungs from time to time during those write()s - sometimes for up to three seconds. Not the best way to control running engines.. We've concluded that some internal DOS buffer was filled, and DOS is dumping it onto our very slow FLASH disk. We tried using _flush_disk_cache() on convenient times. This reduces the frequency of the problem, but DOS still feels free to stop everything from time to time to perform the I/O. Can I control this behaviour? should I do things differently? Or is our explanation totally wrong? Thanks Ronen ---------------------------------- Ronen Friedman ronen AT friendly DOT co DOT il