kernel/java behaviour when using threaded udp

T

Tom Forsmo

I am experimenting with a high performance UDP server for both stateless
and stateful UDP operations and a problem occurs to me when dealing with
threads. Does DatagramSocket for sending a packet require me to
explicitly use a synchronised wrapper method, or will the java/kernel
socket implementation perform that task for me automatically?

(When it comes to the kernel I know it depends on the kernel, but as far
as I know, in Linux for example, kernel operations are single threaded.
This does not stop the newer versions of having very finegrained
interruptible kernel code (low latency patch), but this is a different
matter.)

I am worried that if I were to synchronise operations myself, it might
affect performance more than necessary. Perhaps because kernel
synchronisation is faster than java synchronisation, if that is the
case. Or that there are two levels of synchronisation, when only one is
needed, which then leads to wasted time.

Any thoughts?

tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top