Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8413

Re: NIO multiplexing + thread pooling

From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: NIO multiplexing + thread pooling
Date 2011-09-30 08:22 -0700
Organization A noiseless patient Spider
Message-ID <j64mre$mj4$1@dont-email.me> (permalink)
References (4 earlier) <9efsnrFoviU1@mid.individual.net> <j5vdvo$kon$1@dont-email.me> <FL2dndua_qLJIx7TnZ2dnUVZ_vSdnZ2d@posted.palinacquisition> <j62666$m5s$1@dont-email.me> <2026012.1217.1317394005581.JavaMail.geo-discussion-forums@prfc6>

Show all headers | View raw


On 9/30/2011 7:46 AM, Lew wrote:
> Context switching is a different issue from synchronization.  Context
> switches happen even in non-critical sections, where synchronization
> does not apply.


Thanks for pointed that out, since it is indeed true.  Not all 
synchronization requires a context switch, or even an OS call.  Not all 
multi-threading requires context switching either.


> This does not invalidate the rest of Pete's points since they emanate
> from the cost of context switching, which is actually more frequent
> and a more impactful phenomenon than synchronization.


What I thought most interesting about that stackoverflow page was the 
assertion that different methods work optimally on different systems.

That is, IOCP works well on Windows because the underlying system has 
been optimized for IOCP.  Whereas Linux "notification" (selectors, I 
think) work well on *nix because that path has been optimized for *nix 
systems.

I guess my point was "test what you have, not what the other guys says 
works."  Just because Java doesn't use IOCP, or does use selectors, 
doesn't mean it will/won't run well on your target system.  There's lots 
of ways of doing things "optimaly," but you always gotta test to verify 
it's working the way you think it is.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-24 20:32 +0200
  Re: NIO multiplexing + thread pooling Tom Anderson <twic@urchin.earth.li> - 2011-09-24 20:46 +0100
    Re: NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-24 23:09 +0200
    Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-25 11:33 +0200
      Re: NIO multiplexing + thread pooling Tom Anderson <twic@urchin.earth.li> - 2011-09-27 20:52 +0100
        Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-28 08:21 +0200
          Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-28 08:20 -0700
            Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-28 18:56 +0200
              Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-28 11:07 -0700
            Re: NIO multiplexing + thread pooling Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-09-28 17:39 -0700
              Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-29 09:25 -0700
                Re: NIO multiplexing + thread pooling Lew <lewbloch@gmail.com> - 2011-09-30 07:46 -0700
                Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-30 08:22 -0700
                Re: NIO multiplexing + thread pooling Lew <lewbloch@gmail.com> - 2011-09-30 08:30 -0700
                Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-30 08:49 -0700
                Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-30 20:57 +0200
  Re: NIO multiplexing + thread pooling "John B. Matthews" <nospam@nospam.invalid> - 2011-09-25 00:26 -0400
    Re: NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-25 11:13 +0200

csiph-web