Professional Web Applications Themes

Native POSIX threads + Java under FreeBSD 5.3 release i386 - FreeBSD

Hi all, As is typical, I have once again been given very limited time to get something running, and there are some interesting things to figure about about it. :) In brief, the application is a distributed one, loosely based on some CORBA concepts, though differently (fortunately!). The supported programming languages are C/C++/Java/Ada, of which Java will probably be the one we would like to use. Now, the issue is (or may be), that the recommended (and only tested) platforms are Solaris and Linux (particularly Red Hat and SuSe - kernel versions 9). The apparent reason for this, is that ...

  1. #1

    Default Native POSIX threads + Java under FreeBSD 5.3 release i386

    Hi all,

    As is typical, I have once again been given very limited time to get
    something running, and there are some interesting things to figure about
    about it. :)

    In brief, the application is a distributed one, loosely based on some
    CORBA concepts, though differently (fortunately!). The supported
    programming languages are C/C++/Java/Ada, of which Java will probably be
    the one we would like to use.

    Now, the issue is (or may be), that the recommended (and only tested)
    platforms are Solaris and Linux (particularly Red Hat and SuSe - kernel
    versions 9). The apparent reason for this, is that the platform requires
    the NPTL (Native Posix Threads Library).

    I'm looking somewhat into the support for NPTL under FreeBSD 5.3 release
    i386, and I have come across the following URL:
    http://www.unobvious.com/bsd/freebsd-threads.html
    From this, it sounds like the LinuxThreads (i.e.
    /usr/ports/devel/linuxthreads) should do the trick.

    However, I have no experience with these threads and I wonder whether it
    is a good idea to try to get the platform working under FreeBSD (my
    favourite Unix), or whether it may be better to install Red Hat or SuSe
    this once. :)

    Can anyone tell me something about the following:
    1) Does the linuxthreads library provide 100% NPTL support, as under Linux?
    2) Does usage of the library incur a kernel recompilation, or will all
    scripts of the platform have to be changed such that the linuxthreads
    library is linked in?
    3) A different question: what is the best JDK 1.4.x port to install, and
    does one of those perhaps have support for NPTL?

    I hope anyone can help me out a bit with this, even if it only is about
    whether to make the best choice between figuring out how to get this
    platform going under FreeBSD (being the Unix with which most experience
    I have), or whether to try to go Linux and have a -perhaps- more
    straightforward installation of the platform (at the expense of not
    knowing the particular intricacies of those Linuxes).

    Help/opinions are very much appreciated. :)

    Cheers!
    Olafo

    Olaf Guest

  2. #2

    Default Re: Native POSIX threads + Java under FreeBSD 5.3 release i386

    In the last episode (Mar 10), Olaf Greve said: 

    Why would they require an OS-specific threads library, instead of
    simply requiring Posix threads? I can tell you right now that Solaris
    doesn't support NPTL, just the same way Linux doesn't support Solaris's
    thread library :)

    If you have limited time, I'd say just use either Solaris 10 or Linux.
    If you have problems on FreeBSD, they won't help you. If it was a
    longer-term project where you had time to resolve problems yourself,
    I'd say spend the time to get it working on FreeBSD.
     

    That page is 2 years old, and even says right in the middle, before
    comparing libc_r and linuxthreads:

    WARNING: The rest of this doent does not describe thread support
    in FreeBSD 5.x . You have been warned.
     

    Linuxthreads is the Linux 2.4 and below threads package. NPTL is the
    name for the threads implementation in Linux 2.6 kernels. As far as I
    know, linuxthreads and NPTL are relatively ABI-compatible.
     

    The kernel don't come into the equation. If you want to use
    Linuxthreads with an existing threaded application, you will need to
    recompile (take a look at one of the mysql ports to see how to
    configure a program for linuxthreads). All the native FreeBSD threads
    libraries (libpthread, libthr, libc_r) are ABI-compatible with each
    other (so you can switch between them via libmap.conf) but not with
    Linuxthreads.
     

    The native one (ports/java/jdk14), and no.
     

    --
    Dan Nelson
    com
    Dan Guest

  3. #3

    Default Re: Native POSIX threads + Java under FreeBSD 5.3 release i386

    Dear Dan,

    Thanks for your answer!

    A follow-up:
     

    Interesting. The people who wrote the software told me that they used to
    have a version that worked well with the Linux 2.4 kernel threads
    version. Then, they said they had improved their software, and that it's
    based around the threading system as it is present in the Linux 2.6
    kernel. They did indeed mention that we require Posix threads, so I
    guess they mean to say that we require Posix threads (rather than
    relying on a Linux 2.6 kernel perse).
     

    Yes, I just called the client, and he strongly recommended simply
    looking for a Debian-9 or SuSe-9 system. I think I'll simply try that...
     
    >
    >
    > That page is 2 years old, and even says right in the middle, before
    > comparing libc_r and linuxthreads:
    >
    > WARNING: The rest of this doent does not describe thread support
    > in FreeBSD 5.x . You have been warned.[/ref]

    :)
    I think I didn't express myself the way I meant to (sorry for that).
    Basically what I meant to write was that from the doent I gathered
    that the /usr/ports/devel/linuxthreads port is what should be used. But
    indeed upon re-reading my own text, it suggests that I had gathered from
    the doent that that would work under versions 5.x as well (which was
    not what I meant to imply). Anyway, your following answer basically
    answers what I wanted to know:
     
    >
    > Linuxthreads is the Linux 2.4 and below threads package. NPTL is the
    > name for the threads implementation in Linux 2.6 kernels. As far as I
    > know, linuxthreads and NPTL are relatively ABI-compatible.[/ref]

    From this, I gather the linuxthreads port will not give me the
    threading system as used in the Linux 2.6 kernel then...

    O.k., I think I know enough for now: I'll first try having a go at Red
    Hat or SuSe then....

    Thanks again, and cheers!
    Olafo
    Olaf Guest

Similar Threads

  1. Replies: 2
    Last Post: February 8th, 03:22 PM
  2. Problem with native threads
    By Add_89 in forum Coldfusion Server Administration
    Replies: 3
    Last Post: March 14th, 08:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139