Our website would like to use cookies to store information on your computer. You may delete and block all cookies from this site, but parts of the site will not work as a result. Find out more about how we use cookies.

Login or Register

Powered by
Powered by Novacaster
 
OSX's concurrent tasking
by Bruce Ure at 11:18 17/01/07 (Blogs::Bruce)
I don't think much of the way OSX cops out of some multiple operations.
E.g. start a large file moving from the desktop to a folder in a finder window. Then drag another file to another location. Instead of the Windows behaviour of starting another, independent, Copy/Move operation, you get a box saying that the operation can't be done at this time because something or other is busy and please try later when the current operation is finished.

Grrr.

I've also just had what I can only presume is the OSX equivalent of the Windows BSOD (twice in a row)... namely a graphically-gorgeous, polite multi-lingual box saying 'You need to restart your computer.'

It's prettier than the BSOD but that doesn't alter the fact that it sucks.

--

<< Ways to while away an hour. Burger King smashed up - video... >>
View Comments (Threaded Mode) Printer Version
OSX's concurrent tasking Bruce Ure - 11:18 17/01/07
Re: OSX's concurrent tasking David Crowson - 11:36 17/01/07
i can get mine to do multiple copies ?
I _do_ get another box appearing saying itīs copying , in fact Iīve done 10+ move/copies from multiple locations all at once, no problem. (but then this is in Leopard)

I do , however, get those fuggin annoying , reboot your machine messages, on several occasions....for no apparent reason.

Oh and the import function in Iphoto doesnīt work at all in Leopard rendering Iphoto as useful as a chocolate teapot.....

--
bombholio

Re: OSX's concurrent tasking Bruce Ure - 11:46 17/01/07
On further inspection, it seems to be under only certain specific circumstances.

If I try and move a subfolder from a folder on an internal IDE drive (not sure if that's relevant) to the desktop, then try and move ANOTHER subfolder from the same folder to the desktop, I get the message.

If I try and move a FILE from a subfolder and then a file from a different subfolder in the same parent folder, to the desktop, I don't.

But if I try to move the files back, I get the message for the second one.

Fucking weird, and fucking annoying.

--

Re: OSX's concurrent tasking Simon - 12:26 17/01/07
I would point out:

a) Leopard isn't released yet, and I suspect your 'reboot your machine' messages are a result of bugs that are still to be ironed out.

b) I'm happily doing multiple copy/moves here in Tiger.


--
simon

Attachments...
JPG image (29 K) Multiple copies
Re: OSX's concurrent tasking Bruce Ure - 12:41 17/01/07
Try this if you're curious enough:

/Some volume/Films/ABadFilm/poofilm.avi
/Some volume/Films/AWorseFilm/crapfilm.avi

Start a MOVE of poofilm.avi to your desktop, then start a move of crapfilm.avi to your desktop.

Does it complain? (doesn't on mine).

Once there, try moving them back, independently, to the same directories they came from, and see if you get the message. I do.

That would I think definitively tell me if something weird is going on in my system, and if there is, I bet it's down to some utility or other I've installed... I can't see any other explanation at present.

--

Re: OSX's concurrent tasking Simon - 13:10 17/01/07
OK, I've an external 160GB disk with some sunrise timelapse movies in various folders on it. The disk is mounted as /Volumes/160GB

When I drag these files to my Desktop, this triggers two copies, not two moves.

When I drag each of them back to where they started, this is also a pair of copy operations and so the Finder prompts me with:

... and when I click 'Replace', each one completes just fine.

--
simon

Attachments...
JPG image (38 K) Copy
Re: OSX's concurrent tasking Bruce Ure - 15:35 17/01/07
Hmm.

I also get Copies by default but (I failed to mention) I'm pressing Apple or whatever the key next to space is called, to change it to a move.

When I do as you have just done, I get exactly the same.

The plot thickens. After copying the two files to the desktop in the same manner as you did, if I then go to MOVE one back, then because the file still exists at source I get the Replace/Stop dialog. If before answering this I initiate another MOVE of the other file back to its source, I immediately get the message that the source file is busy.

If I initiate the MOVE *after* answering the question, I also get the busy message.

Interestingly, if I don't answer the question and meanwhile try and copy ANOTHER file to the desktop, I get a dialog telling me it's preparing to copy, which doesn't actually START to copy until I answer the question in the other dialog (regardless of how I answer it).

All of which leads me to understand that if there's a MOVE going on, the source folder is locked until it's complete, which kind of sucks. I mean, surely a Move is just a Copy with a Delete at the end. Why lock the source folder? In case someone deletes the file in the meantime? Well then why not just lock the file? (even though actually it wouldn't matter if it's deleted; it was going to be deleted anyway).

It's certainly no big deal but this is one area in which I'm forced, begrudgingly, to admit that XP is superior.

--

Attachments...
JPG image (40 K) Move Prozac Nation then move An Inconvenient Truth
JPG image (37 K) Move Prozac Nation then [move An Inconvenient Truth *the other way*]
Re: OSX's concurrent tasking Bruce Ure - 15:44 17/01/07
This is backed up further by the fact that I can't do ANYTHING to files or folders on the Desktop once there's a Move operation in progress with Desktop as the source.

I just tried to delete those two attachment files from the desktop while moving one of those films back to where it lives... got the '...in use right now' message.

--

Re: OSX's concurrent tasking Simon - 16:20 17/01/07
Move can either be:

1) Copy + delete (when moving a file from one filesystem to another) or

2) Update the relevant metadata when moving a file from one place on a filesystem to another place on the same filesystem

In simple terms, moving a file around on the same filesystem can be an atomic operation whereas moving a file from one filesystem to another is not (because it involves copying + deleting).

I can only think that you're running into an issue where the OS is protecting you from what would happen if, halfway through the copy+delete, someone else on the same system (it's multi-user, remember) tried to do something that might conflict with your actions that are in progress.

XP probably doesn't care if your data gets trashed en route if someone nips in and deletes the file that you are in the middle of moving to another filesystem, so that the next time your process goes to the disk for the next few MB to buffer up, there's nothing there with that filename any more that it can read from.

Pure speculation on my part, of course.
--
simon

Re: OSX's concurrent tasking David Crowson - 16:58 17/01/07
windows will copy 'it's copy of the file in that timeframe' If someone edits or deletes the file you think your copying then it's actually doing it to another version. Its sneaky like that.

--
bombholio

Re: OSX's concurrent tasking Bruce Ure - 18:04 17/01/07
Pardon my French, Dave, but that's what's known as 'bollocks'.

If you try and delete a file which is mid-move from one disc/filesystem to another, XP will think for a few seconds (it tries a few times with a pause between) and then tell you it can't be deleted.

And whilst you could open the file that is being moved (up until it is deleted as the coup de grace of the move, obviously), you could not save any changes you made to it.

XP allows reads but not writes to files being moved (and copied).

Which to my mind makes perfect sense -- more sense than preventing reads as well, although I'll grant I don't know why OSX seems to do that.

I'd like to believe it's for some sound technical reason, as Simon postulates, but personally I feel it's more likely to be because it's not been thought through properly, or not considered important enough to make right. There's stacks of stuff like that in both OSX and Windows.

--

Re: OSX's concurrent tasking David Crowson - 18:08 17/01/07
:)

Touche. I know it was bollocks wasn't it, but then I blame that little shop up the road that i visitied not 30 mins before resuming posting. My mishtake. (at least my Dutch accent is coming along nishly :)

--
bombholio

Re: OSX's concurrent tasking Bruce Ure - 17:53 17/01/07
I realise about the 2 Move types, but we were clearly dealing with (1), because if we were dealing with (2) the default action would have been move not copy; also it would have been instantaneous and therefore the issues wouldn't have arisen.

So continuing to assume (2), with XP you might get some weirdness like the file being moved might not get deleted after the copy part of the move if someone started using it during that time, and you might get an error dialog telling you this, or something vaguely approximating it, but it wouldn't corrupt it.

Maybe XP just uses (and I don't see why this shouldn't apply to files systems as well as DBMSs) optimistic locking when it comes to moving files around, and OSX pessimistic.

--

Re: OSX's concurrent tasking Simon - 18:12 17/01/07
That would certainly tie in with XP's "fingers crossed" approach in general }-)

Does it happen if you rule the Desktop itself out of the equation? eg choose a different folder than Desktop for the destination.

--
simon

Re: OSX's concurrent tasking Steve - 13:24 19/01/07
I wonder if there's some other process such as Spotlight that is doing some peeping into the file and holding a lock onto it?

(Bear in mind that I haven't looked into any of this on my machine yet.)

--
stevepa

Re: OSX's concurrent tasking Simon - 13:46 19/01/07
Hmm - that's a point.
--
simon
Re: OSX's concurrent tasking Bruce Ure - 14:06 19/01/07
It's a thought. XP sometimes prevents deletion of a file because it's currently open by some Explorer/Indexer process or other. (Thank the lord for 'Unlocker').

I reckon it would still be better for it to lock the file at such time as it actually needs to (at the Delete part of the Move) rather than waaaaaay beforehand (at the start of the Copy part). It just seems overly, well, pessimistic, since Spotlight doesn't need to write to the file.

--

Re: OSX's concurrent tasking Steve - 14:28 19/01/07
True, but a read lock is still a lock and will generally (I say 'generally' because I'm not entirely sure what OSX does here) inhibit a delete request on the same file.

(Amit Singh, who works for Google, wrote a very good book on Mac OSX Internals which may explain some of this although I've not read it.)

--
stevepa

Re: OSX's concurrent tasking David Crowson - 14:50 19/01/07
> Unlocker

Nice one Bruce.....

--
bombholio

Re: OSX's concurrent tasking Bruce Ure - 16:08 19/01/07
Isn't it!

--

Re: OSX's concurrent tasking David Crowson - 20:20 24/01/07
iphoto import now working with 9a343 :)

--
bombholio