Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
other things can also lock the file

I think I may know the cause; though a half-hearted attempt to reproduce it failed.

I had the original file from which I cut the data which is 350MB; and I had 2.4 million numbers pasted into the program file in the same editor; I also have a simulation running that is using 3.2GB of my 8GB. And of course, windows had to store the paste buffer copy somewhere also.

I saved the file from the editor, switched to the command line and tried to run it. I didn't wait or check to see if the editor had finished saving it to disk. That could mean that the editor was still trying to write the file out whilst I was trying to run the script.

However, I also switched back into the editor and made some changes, before trying again with the same result. Now normally speaking the editor wouldn't allow me to edit the file if it was still in the process of saving it; so how could that be?

But maybe, it completed just as I switched back to it. And then when I saved the changes and tried again the problem repeats. But for that to happens again and again seems like extremely unfortunate (some might say incredible) timing; until I remembered that Windows gives the (newly) foreground process a priority boost when you switch to it.

It is just possible that with two of four cores currently fully utilised to running the background simulation; and system memory tight; the editor was being exceptionally slow writing the large file to disk, through a severely depleted system cache. With a busy system; depleted cache and me switching away to the command line thus giving it the priority boost; the editor was simply starved of cycles until I switched back to it each time when it got the boost and completed.

Anyhoo; that's what I'm going to put it down to; and promptly forget about it. I've got too much on to pursue it any further.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^2: The process cannot access the file because it is being used by another process?[Problem disappeared!] by BrowserUk
in thread The process cannot access the file because it is being used by another process?[Problem disappeared!] by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-04-19 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found