Whats the difference between Worker Threads and System threads?


EJB design: Whats the difference between Worker Threads and System threads?

  1. Whats the difference between Worker Threads and System threads or any other types of threads? I Understand what a thread is etc...?
    I am just not sure about the different names for threads.
  2. A system thread would be defined as a thread working for the system you are on. For example, if the system has a background thread writing log data to a file that would be a system thread.

    A worker thread is usually defined as a thread that gets activated on a clients requests.
    For example

    Your app server listens to port 8080.
    A request comes in on port 8080.
    A listener thread takes that request and dispatches it to a worker thread that completes the request.
    So if two client requests come in at the same time, two worker threads are assigned and the task is executed simultanously.

  3. Can you tell me the Difference between Green Threads and Native Threads.

    Ajay Amrite
  4. I don't know what a green thread means. Is it means no pollution?

    In a java VM, a thread is not always have an equivalent in the underlaid system. For example, in JDK 1.1, all java threads are riding on one system thread on Solaris OS, but one system is only corresponding to one java thread in JDK 1.2. So JDK 1.2 have native thread supporting.
  5. Native threats can be distributed over several CPUs by the OS on a multiprocessor maschine.
    Green threats do not really exist for the OS but only for
    the application.

    If you work with threats because you want to speed-up things, you should use native threats.

    More information here:

    -- Frank
  6. oops, i meant "threads", not threats!