Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > O.T. optimising file placement

Reply
Thread Tools

O.T. optimising file placement

 
 
Martin Gregorie
Guest
Posts: n/a
 
      02-25-2012
On Fri, 24 Feb 2012 20:31:25 -0500, Arne Vajhøj wrote:

> On 2/23/2012 6:16 PM, Martin Gregorie wrote:
>> On Wed, 22 Feb 2012 21:40:19 -0500, Arne Vajhøj wrote:
>>> Most OS'es support async IO.
>>>

>> Yes, I know, but its not relevant to a single-threaded process since
>> its logic generally requires it to wait for a read or write to complete
>> before it continues[1]. Hence my comment that this prevents head
>> movement being optimized unless a lot of processes are active because
>> there's only one outstanding IOP per process.
>>
>> [1] unless you're deliberately doing async i/o using poll() or
>> select() (in C) or nio (in Java), in which case the process is
>> often best regarded as a half-way house between single and
>> multi-threaded logic.

>
> I am talking about deliberate not accidental async IO.
>
> And you maybe consider it half singlethreaded half multithreaded,
> but when there is only one thread it is usually just called single
> threaded.
>

Yes, I agree that it is technically single threaded programming and
therefore dodges a lot of problems associated with threading (especially
in C).

Nonetheless most of the async i/o I've seen in C ends up treating
transfers to and from a channel as a connected set of transfers, i.e.
some context is associated with the channel and is kept distinct from
context associated with other channels. The use of context implies having
dedicated data storage for that channel, so from some viewpoints the
logic of the program is indistinguishable from that used in a threaded
approach. I can't comment about nio in Java since I haven't yet needed to
use it.

Anyway, that's what I meant by the mongrel 'half-threaded' term.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimising pages for 640x480 or 800x600 =?Utf-8?B?Q2hyaXMgUG9kbW9yZQ==?= ASP .Net 7 12-10-2004 04:27 PM
Optimising a web app MS ASP .Net 4 06-26-2004 11:37 PM
Optimising Connections & DataAdapters Jon Maz ASP .Net 4 05-27-2004 05:02 PM
Optimising the downloading of a large csv file into a string Pike Java 9 12-19-2003 05:07 PM



Advertisments