On Sep 13, 2011, at 10:30 AM, Scott Ribe wrote:

> - Is that 1GB matrix static & unchanging, read-only? If so, you might be able 
>to use shared memory between the processes to avoid loading it more than once.

The shared memory approach might work (I assume you mean with shm_open(), 
mmap(), shmget(), shmat(), etc.?) But isn't there a problem with the shm 
mechanism on multiprocessor hardware, or was that from years past? Also, won't 
I need to increase shmmax in the kernel, especially if I have numerous 
"flavors" of the 1GB matrix to load?



________________________________
From: Scott Ribe <scott_r...@elevated-dev.com>
To: Jon Sigman <rf_...@yahoo.com>
Cc: Cocoa- Dev List <cocoa-dev@lists.apple.com>
Sent: Tuesday, September 13, 2011 10:30 AM
Subject: Re: Task dispatching

On Sep 13, 2011, at 11:11 AM, Jon Sigman wrote:

> Startup involves loading a >1GB data matrix from disk into memory. 
> Transformations are then done using this matrix on the 1MB data blocks that 
> are sent in via TCP/IP. That's why I can't simply start new tasks on-demand, 
> the startup time is prohibitive so that complicates things. The first option 
> (multiple processes) seems more robust but also harder to implement. Are 
> there any design guidelines for implementing a "server" in Cocoa?

- Is that 1GB matrix static & unchanging, read-only? If so, you might be able 
to use shared memory between the processes to avoid loading it more than once.

- A couple of minutes still seems like a long time to load it. Perhaps there is 
a more efficient way to store & load it?

You can probably find some basic sample code for a Cocoa server online, but 
much of what you need to do here is going to be at a lower level.

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to