Thread View: comp.unix.internals
6 messages
6 total messages
Started by Jeff Michel
Mon, 25 Jan 1993 03:28
lwp (threads) in SunOS kernel
Author: Jeff Michel
Date: Mon, 25 Jan 1993 03:28
Date: Mon, 25 Jan 1993 03:28
24 lines
1683 bytes
1683 bytes
To all those familiar with the lightweight processes library for SunOS: We are running SunOS 4.1.1 and believe that this version of the OS may provide support for lightweight processes (threads) in the kernel and not just for user processes. (Our SunOS manual, dated 1990, gives no impression of kernel support, however we have reason to suspect it.) That is, in addition to the lightweight processes library (-llwp) provided for users, there *appears* to be support for *kernel* threads. Perhaps this is in order to support multiple asynchronous I/O operations and the like. We seem to have object code in /usr/sys/sun4/OBJ which provides some lwp primitives. In fact, we have even been so shocked as to have a "hello world" thread run successfully in kernel mode. A slew of questions come to mind: Is this all a fluke? Is there support (eg. a manual or commented header file) for using threads in the kernel? What differences exist between the threads at the kernel level and at the user level? Is it safe to use kernel threads in a device driver? Any help would be greatly appreciated. Thanks. -- Jeff Michel (jrm2k@Virginia.EDU)
Re: lwp (threads) in SunOS kernel
Author: andrew.d.hay
Date: Mon, 25 Jan 1993 15:56
Date: Mon, 25 Jan 1993 15:56
15 lines
1220 bytes
1220 bytes
jrm2k@uvacs.cs.Virginia.EDU (Jeff Michel) writes: "Is this all a fluke? Is there support (eg. a manual or commented header "file) for using threads in the kernel? What differences exist between the "threads at the kernel level and at the user level? Is it safe to use kernel "threads in a device driver? i was told [apropos my q. is lwp in the sunos5 compat lib] that *no* special kernel resources were added to support lwp; it's all in the standard c lib. -- +--------------------------------------------------------------+ Andrew Hay | one step beyond the outer limits of the twilight | a_d_hay@att.com | zone in the darkened room at the night gallery | +--------------------------------------------------------------+
Re: lwp (threads) in SunOS kernel
Author: Frank Mueller
Date: Mon, 25 Jan 1993 17:54
Date: Mon, 25 Jan 1993 17:54
27 lines
1998 bytes
1998 bytes
In article <1993Jan25.155627.15411@cbnews.cb.att.com>, adh@cbnews.cb.att.com (andrew.d.hay) writes: > jrm2k@uvacs.cs.Virginia.EDU (Jeff Michel) writes: > "Is this all a fluke? Is there support (eg. a manual or commented header > "file) for using threads in the kernel? What differences exist between the > "threads at the kernel level and at the user level? Is it safe to use kernel > "threads in a device driver? > > i was told [apropos my q. is lwp in the sunos5 compat lib] that *no* > special kernel resources were added to support lwp; it's all in the > standard c lib. But there is a compile flag to configure a SunOS kernel which supports lwp's. In fact, when you look at some of the OS sources, you will notice that the kernel differs in some places if lwp's are supported. There might even be threads at the kernel level. Consider this: Asynchronous I/O via aread() and awrite() is only supported when lwp's are supported by the kernel as well. This leads me to believe that lwp's are used to implement asynchr. I/O. This doesn't surprise, in fact, that's what threads are for besides other things. Now, maybe one could write kernel threads under SunOS 4.1 similar to asynchr. I/O... Of course, you can try to migrate to SunOS 5.x where threads are in the kernel. If you can get the OS installed, that is. Frank mueller@cs.fsu.edu
Re: lwp (threads) in SunOS kernel
Author: Rob Quinn
Date: Mon, 25 Jan 1993 17:59
Date: Mon, 25 Jan 1993 17:59
18 lines
1334 bytes
1334 bytes
jrm2k@uvacs.cs.Virginia.EDU (Jeff Michel) writes: >"Is this all a fluke? Is there support (eg. a manual or commented header >"file) for using threads in the kernel? From my SunOS 4.1.2 kernel config file: # # The following two options are needed for asynchronous I/O. # options LWP # kernel threads options ASYNCHIO # asynch I/O (requires LWP) I've never found documentation on what those options are really good for. I would appreciate any info others might have. -- | Rob Quinn | | rjq@phys.ksu.edu | | QuinnBob@KSUVM.BITNET |
Re: lwp (threads) in SunOS kernel
Author: Guy Harris
Date: Mon, 25 Jan 1993 19:00
Date: Mon, 25 Jan 1993 19:00
17 lines
1107 bytes
1107 bytes
>That is, in addition to the lightweight processes library (-llwp) provided for >users, there *appears* to be support for *kernel* threads. Perhaps this is in >order to support multiple asynchronous I/O operations and the like. That's precisely why it's there. They basically stuck code derived from "-llwp" into the kernel. >Is this all a fluke? No. >Is there support (eg. a manual or commented header file) for using >threads in the kernel? No. It was stuck in (4.1 was the first release with it) only to support the async I/O calls; proceed at your own risk.
Re: lwp (threads) in SunOS kernel
Author: Guy Harris
Date: Mon, 25 Jan 1993 21:40
Date: Mon, 25 Jan 1993 21:40
11 lines
1091 bytes
1091 bytes
>options LWP # kernel threads >options ASYNCHIO # asynch I/O (requires LWP) > > I've never found documentation on what those options are really good for. The first option is good for enabling the second option; SunOS 4.x only uses kernel LWPs to support asynch I/O. The second option is good for Sybase, which uses async I/O on raw partitions, and may be useful for other applications such as databases or tape dump/restore that use async I/O on raw disks or tapes.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads