HDTenEightyP/NetNews huggingface dataset:
From: adh@cbnews.cb.att.com (andrew.d.hay)
Subject: Re: lwp (threads) in SunOS kernel
Organization: guess
Date: Mon, 25 Jan 1993 15:56:27 GMT
Keywords: lwp, threads, SunOS, kernel

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	       |
		+--------------------------------------------------------------+
Xref: sparky comp.unix.internals:2163 comp.unix.wizards:5645 comp.sys.sun.misc:6486
From: rjq@phys.ksu.edu (Rob Quinn)
Newsgroups: comp.unix.internals,comp.unix.wizards,comp.sys.sun.misc
Subject: Re: lwp (threads) in SunOS kernel
Keywords: lwp, threads, SunOS, kernel
Date: 25 Jan 93 17:59:00 GMT
Organization: Kansas State University
NNTP-Posting-Host: bohr.phys.ksu.edu

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 |
Newsgroups: comp.unix.internals,comp.unix.wizards
From: chare@unilabs.uucp (Chris Hare)
Subject: reading a processes u-area
Organization: UniLabs Research Group, Ottawa Ontario, Canada
Date: Sat, 23 Jan 1993 16:10:39 GMT

In an attempt to understand more about how the kernel operates, I am trying
to write a version of crash.  As a result, I will in several different
instances need access to a processes u-block.  I would prefer to try and do
this without having to make use of system-specific system calls, although
if this is going to be the only method, then I guess I will have to resort
to it.

Anyone who could provide some insights would be appreciated immensly.

Chris
-- 
????                --- It Always works for me! ---                           
Chris Hare, UNIX Scientist                  Preferred : chare@unilabs.org
Just a mild-mannered consultant by day ....
Newsgroups: comp.unix.internals
From: eric@gecko.uucp (Eric Peterson)
Subject: High speed disk i/o
Organization: Tekelec, Inc.
Date: Fri, 22 Jan 1993 20:53:43 GMT


	I need to do fast i/o (especially writes) to disk from/to a network
	peripheral.  What is the best way to do this?  (System=ISC/Sunsoft
	System V.3).  For performance reasons I think I want to do this in a
	driver, but I don't know how to get to the disk "legally".  The access
	to the network devices is (depending on device) via DMA or shared (low)
	memory.

	It doesn't really matter if the data on disk isn't accessible via the
	filesystem, but it wouldn't hurt.  I assume I don't really want to go
	through the buffer cache (again for performance reasons) but I could be
	wrong.

	Killing performance for the system users is not a big problem, but I
	don't want to lose interrupts, etc.

Thanks for any hints,
Eric

-- 
Eric Peterson    WB6PYK [44.6.0.133]	N2429K @ SMO
Tekelec - (818) 880-7710 eric@tekelec.com, uunet!gecko!eric
Newsgroups: comp.unix.internals,comp.unix.sys5.r4
From: bwong@dsiinc.com (Bruce F. Wong)
Subject: Re: kernel memory allocation with alignment
Organization: Distributed Systems International, Inc.
Date: Wed, 20 Jan 1993 22:22:52 GMT

Greetings,

A few weeks ago I posted the following:

>I'm writing a streams device driver for 386 UNIX SVR4 and I need 512
>bytes of DMAable memory that is aligned to a 512 byte boundary (i.e.
>the starting address is a multiple of 512).  How is this done ?  None
>of the kernel memory allocators take an alignment argument.  Please
>send all responses via e-mail and I will post a summary if I get
>enough useful information.  Thanks.

This article contains the summary of replys and also what I plan to
do.

Most of the suggestions were like the following:

>From: uunet!westford.ccur.com!zimmermk (Karl Zimmerman)
>	allocate 1024 bytes.  Somewhere in there are 512 bytes aligned to
>a 512-byte boundary.   To find it, take the returned pointer, add 511, and
>mask off the least-significant 9 bits.

The suggestion that sent me in the direction of the solution I plan to
use is:

>From: uunet!gcx1.ssd.csd.harris.com!donh (Don Holzworth)
>If you are  going to get data from a device, you are probably going
>to want to use allocb. If allocb doesn't give you the proberly aligned
>memory, specify 512 bytes more than you need and set the message block
>pointer to the aligned address. I think that you actually do get
>the data aligned on a 1K boundary, though. You could run a few
>tests to see.

I ran some tests on ESIX 4.0.3 and confirmed that allocb will return
space that is aligned according to its size (I tried 256, 512, 1K, 2K,
and 4K).  The allocb(D3DK) manual entry doesn't mention this.  It also
doesn't mention if the buffer is DMAable (i.e. my bus master network
controller card can access the buffer if I pass it the physical
address of the buffer).  I'm assuming that they are DMAable based on
the last paragraph in Intro(D2DK):

   "Drivers do no have to worry about making kernel buffers
    addressable to their DMA controllers.  The kernel will make sure
    that any kernel buffer addresses passed to a driver entry point
    will be addressable by the driver's hardware."

Thank you for the suggestions.
-- 
Bruce F. Wong			   Distributed Systems International, Inc.
bwong@dsiinc.com		   531 West Roosevelt Road, Suite 2
Tel:708-665-4639 Fax:708-665-4706  Wheaton, IL 60187-5057
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.unix.internals,comp.unix.wizards
Subject: Re: reading a processes u-area
Date: 24 Jan 93 20:21:56 GMT
Followup-To: comp.unix.internals
Organization: Auspex Systems, Santa Clara

>(Unfortunately, even if you *do* port this code to another system
>I hope you realise that there is a good chance that the u-block you
>get back won't look much like the one on the first system ....)

And not all UNIX implementations (or "UNIX-compatible implementations")
necessarily even *have* U areas (SunOS 5.x might not, and some future
BSD might not, either).
Xref: sparky comp.unix.internals:2168 comp.unix.wizards:5649 comp.sys.sun.misc:6500
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.unix.internals,comp.unix.wizards,comp.sys.sun.misc
Subject: Re: lwp (threads) in SunOS kernel
Keywords: lwp, threads, SunOS, kernel
Date: 25 Jan 93 21:40:40 GMT
Followup-To: comp.unix.internals
Organization: Auspex Systems, Santa Clara

>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.
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.internals
Subject: Re: Question about controlling processes
Date: 25 Jan 1993 05:11:31 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <C1BLso.220H@austin.ibm.com> subra@bynar.austin.ibm.com (Sivarama Subramanian) writes:
>1). What is a controlling process?
>2) How to make a set of processes belong to foregound and background
>    processes?

I haven't heard the term "controlling process".  There's a "controlling
terminal", and a process can be a "session leader" or "process group
leader", and these are related.

This stuff is described in great detail in the book "Advanced Programming
in the Unix Environment" by W. Richard Stevens.

-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: jmd6@unix.brighton.ac.uk (Morgoth.)
Newsgroups: comp.unix.internals
Subject: HELP! Book on sunos kenals
Date: 22 Jan 93 08:32:33 GMT
Organization: University of Brighton, UK

I looking for a book dealing with sunos accessing sunos kernal data tables.
Know this info may be in a sunos manual but if so does any one no which.
Is there a book that cover this?


Thanks in advance.
Jon
Newsgroups: comp.unix.internals
From: subra@bynar.austin.ibm.com (Sivarama Subramanian)
Subject: Question about controlling processes 
Date: Sat, 23 Jan 1993 18:51:23 GMT
Reply-To: subra@bynar.austin.ibm.com (Sivarama Subramanian)
Organization: IBM Austin, TX

i folks,

Here is what is I am trying to do:
                                          forks
               forks                   |-------->Process3
   Process1 --------------> Process2-----
                                       |-------->Procees4
                                          forks
I want to make Process2 controlling process and let Process4
      belong to a backgroung process group. When Process2 exits
      Process3 should get SIGHUP signal. I want to test this
      scenerio.

Can anyone give me some insights?

In a related note:

1). What is a controlling process?
         My understanding is that the controlling process is the one
         which establishes the connection to the controlling terminal.
         Is it correct and if so how to make a connection to
         controlling terminal?
2) How to make a set of processes belong to foregound and background
    processes?
I would appreciate your help.

Thank you



subra
subra@testserver.austin.ibm.com

~
Newsgroups: comp.unix.internals
From: Sm@cerberus.bhpese.oz.au (Scott Merrilees)
Subject: Re: HELP! Book on sunos kenals
Organization: BHP, Newcastle, Australia
Date: Mon, 25 Jan 1993 05:17:17 GMT

jmd6@unix.brighton.ac.uk (Morgoth.) writes:
>I looking for a book dealing with sunos accessing sunos kernal data tables.
>Know this info may be in a sunos manual but if so does any one no which.
>Is there a book that cover this?

What is a kernal ?

Sm
-- 
Scott Merrilees, BHP Information Technology, Newcastle, Australia
Internet: Sm@bhpese.oz.au   Phone: +61 49 40 2132   Fax: ... 2165
From: brian@lpl.arizona.edu (Brian Ceccarelli 602/621-9615)
Newsgroups: comp.unix.internals
Subject: System Call which Returns Executing Program Name?
Date: 21 Jan 93 22:06:41 GMT
Organization: Lunar & Planetary Laboratory, Tucson AZ.

This should be an easy one for your UNIX gurus out there. 8-)

Is there a system function I can call which returns the
name of the executing program?   


I need to place such a function in some lower object library.
Information in the argv of main(argc, argv) is not available
at this level.

Thanks!

Brian Ceccarelli
----------------
brian@gamma1.lpl.arizona.edu
  
Newsgroups: comp.unix.internals,comp.unix.wizards,comp.sys.sun.misc
From: jrm2k@uvacs.cs.Virginia.EDU (Jeff Michel)
Subject: lwp (threads) in SunOS kernel
Keywords: lwp, threads, SunOS, kernel
Organization: University of Virginia Computer Science Department
Date: Mon, 25 Jan 1993 03:28:13 GMT

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)
Newsgroups: comp.unix.internals
From: raj@grok101.ColumbiaSC.NCR.COM ()
Subject: Re: System Call which Returns Executing Program Name?
Organization: Your Organization Here
Date: Fri, 22 Jan 93 16:48:37 GMT

In article <1993Jan21.220641.5858@organpipe.uug.arizona.edu>, brian@lpl.arizona.edu (Brian Ceccarelli 602/621-9615) writes:
|> This should be an easy one for your UNIX gurus out there. 8-)
|> 
|> Is there a system function I can call which returns the
|> name of the executing program?   
|> 
|> 
|> I need to place such a function in some lower object library.
|> Information in the argv of main(argc, argv) is not available
|> at this level.
|> 
|> Thanks!
|> 
|> Brian Ceccarelli
|> ----------------
|> brian@gamma1.lpl.arizona.edu
|>   

One way of getting the name of the current (or any) executing program 
is to use the proc filesystem on SVR4. The following C program 
will do the needful.

/*
 * Gets the name of the current command/process  - raj
 */
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/procfs.h>


main()
{
        int     procfd;                 /* fd for /proc/xxxxx */
        char    pname[20];
        int     pid = getpid();
        struct  prpsinfo info;          /* process ps info */


        printf ("my pid = %d\n",pid);   /* use the pid of process */
        sprintf(pname, "/proc/0%d",pid);
        if ((procfd = open(pname, O_RDONLY)) == -1) {
                printf("could not open /proc/%s\n",pname);
                exit(1);
        }                                    
			  	        /* read the info from /proc */
        if (ioctl(procfd, PIOCPSINFO, (char*)&info) == -1) {
                printf("ioctl on open /proc/%s failed\n",pname);
                close (procfd);
                exit(2);
        }
        close(procfd);
        printf("my command name = %s\n",info.pr_fname);
}
From: pkammer@liege.ICS.UCI.EDU (Peter Kammer)
Subject: Re: Is it possible to E-mail through Telnet?
Newsgroups: comp.unix.wizards
Reply-To: pkammer@ics.uci.edu
Organization: UC, Irvine,  Dept. of Information and Computer Science
Date: 24 Jan 93 01:53:42 GMT

In comp.unix.wizards you write:

>And what does "smtp" do?

If after all this discussion, you're still interested in SMTP, check out
rfc821 (at least I think that's the most recent.)  You can ftp it from
nic.ddn.mil.

-Peter K.

------------
Peter Kammer               We are the music makers,
pkammer@ics.uci.edu           And we are the dreamers of dreams,
203peter@vax.stmarytx.edu  Yet we are the movers and shakers     --Arthur
BITNET: 203PETER@STMARYTX     Of the world for ever, it seems.    O'Shaugnessy

Newsgroups: comp.unix.wizards
From: cm305b@uc780.umd.edu (CMIS 305 SECTION 5011)
Subject: Domain Change
News-Software: VAX/VMS VNEWS 1.41    
Organization: University of Maryland, University College
Distribution: usa
Date: Fri, 22 Jan 1993 02:08:00 GMT

I have a need to change the domainname on Sun Sparc2 from one domain to
another on the fly.  Typing domainname "newdomain" seems to work in that 
all of the NIS maps are there, however, I am having problems getting the system
to automount my home directory from the new domain (of course attempting a new
login).  Any thoughts on what might cause this to happen?
Thanks!
lma

Newsgroups: comp.unix.wizards
From: raj@grok101.ColumbiaSC.NCR.COM ()
Subject: Re: named pipe
Organization: Your Organization Here
Date: Fri, 22 Jan 93 20:29:31 GMT

In article <1993Jan22.185326.679@cine88.cineca.it>, marcello@deis20.cineca.it (Marcello Dalpasso) writes:
|> Is there any wizard on the net being so kind to summarize to me the usage of
|> named pipes?!
	The basic advantage is having a filesystem node to use and
hence two unrelated processes can be communicating much like any
other IPC. It is not like "unamed" pipes which can exist only between
related processes (like parent-child).

|> 
|> In particular, I would make something like this:
|> 
|> cp file named-pipe
|> 
|> and get "file" passed to lpr, i.e. named-pipe == | lpr
|> 
   Sure it can be done.

|> Thanks in advance for any help, preferably via e-mail
|> 
|> -- 
|> 	Marcello Dalpasso (e-mail: marcello@deis20.cineca.it)
|> 	D.E.I.S. - Department of Electronics, Computer Science and Systems
|> 	Viale Risorgimento 2, I-40136 Bologna, Italy			
|> 	Phone: +39-51-644-3015 (fax: +39-51-644-3073)

I am not sure what exactly you trying to achieve but anyway one
way to use "named pipes" & lpr together is as follows:

1) assume you have created a named pipe "/tmp/Fifo" using "mknod -p"

2) Lets say your printer name is lp then we can do the following to
read from the fifo:
	cat /tmp/Fifo | /usr/ucb/lpr -P lp

	Now you will notice that it is waiting for data
(remember it is a pipe)

3) now you can copy the data to be printed into the named pipe as
you wanted to do (i.e using cp) as shown below:

	cp /etc/passwd /tmp/Fifo


hope this info helps.
	Yes, you have used named pipes & lpr together.
raj
1/22/93
From: jason@george.lbl.gov.itg (Jason Lee (SFSU student))
Newsgroups: comp.unix.wizards
Subject: asynchronous I/O to disk??
Date: 27 Jan 1993 19:30:31 GMT
Organization: Lawrence Berkeley Laboratory
Distribution: world
Reply-To: jason@george.lbl.gov
NNTP-Posting-Host: portnoy.lbl.gov
Keywords: asynchronous

I hope that some of you out there can help me!!

I'm on a sun sparc (4.1.2) and I have three disks 
attached to it.  Now I want to read off the disks
simultaneously from the same process. I know that
it is possible to do this with sockets and a SIGIO
signal handler, but with a fd to disks, it doesn`t seem
to work. Is there a different method for disks?
So my question is, does someone out there
have a function that starts an asynchronous read to
disk on the sun?  Or can at the least show me some 
code to do this??

jason
---------------------------------------------------------------
jason@sfsu.edu            |      "2B||!2B"?
jason@futon.sfsu.edu      |
JRLee@lbl.gov             |  This space for rent.
From: robert@kommu.UUCP (3730)
Newsgroups: comp.unix.wizards
Subject: Description for the CRASH-Utility
Date: 21 Jan 93 09:58:59 GMT
Organization: SNC
X-Newsreader: Tin 1.1 PL5

I am looking for a detailed description of the
CRASH Uitlity running on a SINIX 5.24 system.
I would need it very urgently.
==================================================
NAME   Robert Kellermann
EMAIL  robert@kommu.erls01.siemens.de  {uunet|...}!unido!kommu!robert
SNAIL  Siemens AG, AUT 621, Postfach 4848, D-8500 Nuernberg, Germany
PHONE  +49-911-895-3730, +49-9187-7296
FAX    +49-911-895-4802
Newsgroups: comp.unix.wizards
From: nancyp@techbook.com (Nancy Parsons)
Subject: Boot and Install disks for ISC Unix
Summary: Looking for info on creating custom install disks
Organization: TECHbooks --- Public Access UNIX --- (503) 220-0636
Date: Thu, 28 Jan 1993 05:52:31 GMT

Hi - 

I've been given the assignment of creating a boot and install
disk for a Compaq 486/33L running Interactive Unix V3.01, so
that we may load the two disks, and then load the rest of the
software from a tape drive.  

Has anyone done this type of thing before?  Any suggestions would
be gratefully received - a source for documentation would be great
also.  

Thanks,

Nancy




-- 
--------------------------------------------------------------------------
| Nancy Parsons            | "You can't fire me - slaves must be sold!   |
|------------------------------------------------------------------------|
| nancyp@techbook.COM  ...!{tektronix!nosun,uunet}techbook!nancyp        |
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.unix.wizards
Subject: Re: Is it possible to E-mail through Telnet?
Date: 21 Jan 93 05:18:37 GMT
Organization: Auspex Systems, Santa Clara

>The command above tells the BSD telnet program (and most if not all of its
>derivatives) to connect to the well-known-port identified in the services
>file by smtp.  In BSD and its derivatives, this should be the port assigned
>to MTAs implementing SMTP (Simple Mail Transport --or is it Transmission?--
>Protocol).

Transfer.

And, on any system that supports SMTP, that port is port 25; the
assignment antedates BSD (it may even antedate UNIX...).

>If the local machine does forward foreign mail
>automatically (most systems with BSD heritage might call the daemon
>"sendmail"; sun calls it "in.smtpd" (or some such)),

No, Sun calls it "sendmail" (yes, even in Solaris 2.x).  Any SunOS
daemons with "in." at the beginning of their name have the "traditional"
name after the "in." (no, I don't know why it was stuck there; it
happened before I went to work at Sun).  Guessing that it'd be called
"in.smtpd" is interesting, but incorrect.

>you might use something a little less cryptic.

I.e., you might try handing the mail file to "sendmail"; see the manual
page for it.

Not all machines necessarily use "sendmail"; others might, I think, use
"smail", for example.  Others may require you to hand the mail to "mail"
directly.

In any case, one advantage of handing it directly to some Mail Transfer
Agent (MTA) such as "sendmail" isyou don't have to know SMTP - if you
talk directly to a "telnet" that's connected to port 25, you'd have to
pump out all the appropriate SMTP commands.
Newsgroups: comp.unix.wizards
From: jdb@sabal.cis.ufl.edu (John Brothers)
Subject: brain search (part II)
Keywords: remote signalling
Organization: CIS Department, University of Florida
Date: Sun, 24 Jan 93 17:36:38 GMT


I posted a message similar to this to comp.unix.questions, but I got no
response, so I will try again here.  

I have been developing a form of remote signalling as a thesis.  i.e. a 
user/process on one machine would be able to send a signal to a process
on another machine. What my advisor would like to make sure of is 
whether or not something like this already exists.  I know that rsh has all
the means necessary to execute the actual signal, but I have been adding
some other features, like registration, where a process can associate a
name with the pid, so a remote signaller won't have to know the pid, and
password access, so a group of people who know a password associated with
the process can send signals to it, instead of just the owner.

So, do you know of anything that does this, or something like this?
Does this sound like a good idea/useful tool?  I'm trying to design the
system to be as portable as possible, so it would work on the common 
machines of 'the big 5' (sun, ibm, hp, dec and sgi)

Any response would be appreciated, even something as simple as 
'You're an idiot.'

Thanks for your time,
	John

Xref: sparky comp.unix.wizards:5612 comp.unix.bsd:11719 alt.suit.att-bsdi:830