What Happens When Writing to a Completely Full Hard Drive?

AI Thread Summary
When a Fortran program attempts to write to a hard drive that is completely full, the operating system will prevent the write operation from succeeding. This is not a limitation of Fortran itself but rather a function of the operating system's handling of disk space. On systems like DOS and Windows, if a write request exceeds available disk space, the operation will fail, and the program will receive a return value indicating that fewer bytes were written than requested, or zero if the disk is entirely full. No existing files will be overwritten in this scenario.
JoAuSc
Messages
197
Reaction score
1
Let's say you're running a Fortran program that writes to the hard drive. What happens when the hard drive is completely full? Do other files get written over?
 
Technology news on Phys.org
This is an operating system issue, not a Fortran issue. A write request that would more than consume all available disk space will fail on any reasonable operating system.
 
For DOS and Windows, the returned count of bytes written will be less than requested, and will be zero if the disk is already full.
 
JoAuSc said:
Let's say you're running a Fortran program that writes to the hard drive. What happens when the hard drive is completely full? Do other files get written over?

Your command will fail.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top