HDTenEightyP/NetNews huggingface dataset:
From: humesdg1@netnews.jhuapl.edu (Dave Humes)
Subject: Realtime data acquisition under UNIX?
Summary: To what extent is UNIX capable of realtime processing?
Keywords: realtime UNIX 
Organization: JHU/Applied Physics Laboratory
Date: Tue, 15 Dec 1992 19:47:40 GMT


We have a requirement to process analog data on an existing UNIX system in our
laboratory.  Continuous, gap-free acquisition is required, thus we have a
realtime processing requirement.  The A/D board has dual 64K X 16 bit buffers.
One fills while the other is available to the host.  An interrupt signals buffer
full and data starts filling in the other buffer.  During the interval between
interrupts, the data must be moved from the A/D buffer to a disk file.

The computer we are using is a Solbourne 5/602 (2 cpu Sun/SPARC) clone.  It is
based on a propietary bus (Kbus), but includes a 6U VME subchassis where we 
intend to install the A/D board.  The VME bus is accessible to the host through
the system I/O board which acts as a bus translator.  The operating system is 
Solbourne's OS/MP 4.1.A3, a multiprocessing variant of the Sun operating system.

The worst case occurs while processing one channel of analog data at a sample 
rate of 100KHz.  At this rate and using an input buffer of 64K X 16 bits, an
interrupt will occur every 0.66 seconds.  So, every 0.66 seconds we must get
128 Kbytes of data out of the A/D, probably by doing a DMA from the input 
buffer to memory on the Kbus, and from there it must be appended to a file.
The input buffer is mapped to VMEbus addresses.

I realize that it is almost impossible to answer this question without actually
trying it, but since that requires buying hardware, we'd rather not take that
approach.  I also realize that a number of realtime executives exist to solve
this problem, but we'd rather not take that approach either if it is not
strictly necessary.  I would greatly appreciate hearing from anyone who has 
actually attempted realtime data acquisition under UNIX.  Thanks.

-- 

-------------------------------------------------------------------------------
David Humes         |       Johns Hopkins University Applied Physics Laboratory
(410) 792-6651      |       humesdg1@aplcomm.jhuapl.edu
-------------------------------------------------------------------------------
-- 

-------------------------------------------------------------------------------
David Humes         |       Johns Hopkins University Applied Physics Laboratory
(410) 792-6651      |       humesdg1@aplcomm.jhuapl.edu
Xref: sparky comp.unix.wizards:5252 comp.unix.programmer:5714 comp.unix.internals:2060 comp.unix.questions:14735
From: urlichs@smurf.sub.org (Matthias Urlichs)
Newsgroups: comp.unix.wizards,comp.unix.programmer,comp.unix.internals,comp.unix.questions
Subject: Re: HELP !!!!! TCP/IP, SOCKETS
Followup-To: comp.unix.questions
Date: 16 Dec 1992 16:53:22 +0100
Organization: University of Karlsruhe, FRG
NNTP-Posting-Host: 127.0.0.1

[ Please do not crosspost to comp.unix.wizards,comp.unix.internals, and
  comp.unix.questions. Followups are redirected to the latter only. ]

In comp.unix.wizards, article <1992Dec11.162251.1887@us-es.sel.de>,
  lal@us-es.sel.de (US/EM Deepak Lal - Systemverwaltung #5657) writes:
>
>  I have a big problem. I will be thankfull for ANY reply whatsoever. It is
> urgent:
> 
Every problem usually is.  :-/

>    When the parentprocess is killed, the child processes realize the
> broken connection. On typing      netstat       no established 
> connections are visible. 
> After the parent server process is restarted, the
> child processes connect AGAIN to the same port and the communication
> takes place as before.  BUT SOMETIMES and UNFORTUNATELY NOT reproducable
> scene is that :
>    After the parent Server dies, all TCP connections are still alive 
> ( visible with    netstat). And NOW if the parent server process is restarted
> he can't bind to the previous port and hence no communication
> is possible *sob*
> 
Does the server fork? If so, why don't you close all its file descriptors
in the child and/or set their close-on-exec flag?

> 2) Is it possible to remove the pending TCP/IP connections after 
>    the parent server dies and TCP/IP connections are still lingering. What can
>    the server parent process do to remove the lingering TCP connections on
>     restart. 
> 
Please define _lingering_.

If the socket you used to accept() things with is still open in any program,
forget it. (Well, OK, kill the offender and try again.)

If there are just some connections left open, set the SO_REUSEADDR flag
on the socket before listening with it.

-- 
Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
From: cq377@cleveland.Freenet.Edu (David C. Williss)
Newsgroups: comp.unix.wizards
Subject: /dev
Date: 21 Dec 92 05:52:38 GMT
Reply-To: cq377@cleveland.Freenet.Edu (David C. Williss)
Organization: MicroImages, Inc
NNTP-Posting-Host: hela.ins.cwru.edu


I have a question, and maybe somebody here can point me in the right 
direction.  I'm working on a software package wich we are porting to
Unix and one of my parts is the hardcopy output.  On the old system
I could just open "lpt1:" and start dumping.  On unix, things become
harder.  

  1.  Should I look at the /etc/printcap file to find printers?
      Assuming that somebody at the user's site is compatent
      (bad assumption) they would just have to setup printcap
      The problems here are 1. Based on past experience, I can't
      assume they know what their doing.  2. Seems not all flavors
      of unix use /etc/printcap. (We're supporting multiple platforms)

  2.  How do I print to a remote printer.  I suppose I could fork
      and exec lpr.  Is that the reccomended method?  

  3.  For the sake of argument, lets say I ignore printcap and let the
      user select printer driver/port from within my program.  Is
      there any way to tell which special files in /dev are ports
      and which aren't?  Every book I've read talks about "conventional"
      names, but every implementation seems to have its own ideas
      as what to name them.  I want to avoid confusing the user by
      showing such things as /dev/rroot.

Is there a book about this kind of thing?  I can find all kinds of
books about writing unix device drivers, but nothing about using them.

	Thanks.



-- 
		-Dave Williss
---------------------------------------------------------------------------
GAAKK -- It's not just for breakfast anymore!
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.wizards
Subject: Re: /dev/null and file locking
Date: 19 Dec 1992 02:22:38 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <1992Dec18.182107.22098@zeus.ieee.org> jbarth@ep.ieee.org writes:
>I recall reading in Bach's "The Design of the UNIX Operating System" that
>device inodes, unlike regular inodes, are never locked.  I don't remember
>what the rationale was -- perhaps someone more knowledgeable than me could 
>comment.

The locking operations lock a specific range of bytes of a file.  Some
devices, like tty's, simply present data continuously, and have no
meaningful notion of offsets into the file.

However, this should only be a problem for mandatory locking, since the
kernel tries to relate the locks to the read() and write() operations.  In
the case of advisory locks they only interact with other locking
operations, so the ranges could be considered as arbitrary identifiers,
with no necessary relationship to the file contents.

It sure would be nice if you could lock devices, though.  The lack of this
forces many applications to create extraneous files just to mediate access
to a device.  An example is the locking files in /usr/spool/uucp.  And if
two applications try to use the same device but have different lock file
conventions, they don't work together properly.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.unix.wizards,comp.unix.admin
From: prs9k@brain.med.virginia.edu (Phil Scarr)
Subject: Re: Causes Of Death On Heavily-Loaded UNIX System?
Organization: Neuroclinical Trials Center, University of Virginia
Date: Tue, 15 Dec 1992 05:29:14 GMT

Much of this is raw interrupt delay.  The interrupt handler and message
handler simply get overwealmed.  What you are doing is equivalent to
running OS/2 on a 4mb 386sx16mhz and asking why it is slow.  The system
performance.  How much RAM does the system have?  How many people are
running Xwindows?  Remember, each user shell requires a minimum ammount
of real (i.e. non-virtual) memory.  If you are pushing your Sun this
hard and you don't have enough memory, you could run into some REAL
problems with swapping delays.  The system is spending a lot of time
figuring out what it can and cannot swap to disk at any given time.

One simple fix might be to add lots more memory to the box (if you can).

	-Phil
-- 
PHIL SCARR        \      We are Microsoft...     /          (o) 804.243.0229
 University of    /     OS/2 is irrelevant.      \          (f) 804.243.0290
 Virginia,        \     UNIX is irrelevant.      /        prs9k@Virginia.EDU
 Neurosurgery     /     Openness is futile.      \     prs9k@Virginia.BITNET
 HP-UX is my life!\ Prepare to be assimilated... /   ...uunet!virginia!prs9k

Xref: sparky comp.unix.wizards:5278 comp.unix.wizards:5279
From: vss@mathcs.emory.edu (V.S.Sunderam)
Newsgroups: comp.unix.wizards,comp.unix.wizards
Subject: Looking for split-screen utility
Followup-To: poster
Date: 18 Dec 1992 15:17:43 -0500
Organization: Emory University, Dept of Math and CS
NNTP-Posting-Host: emory.mathcs.emory.edu
Keywords: split screen tty


I'm looking for some utility/libs that can divide a terminal (or window)
in two  pieces and effectively present two sets of fd's
to a program (or two). 

screen3.2 doesnt quite do this, but pointers to any other
software will be very much appreciated.

Thanks in advance
-- 
V. S. Sunderam      | vss@mathcs.emory.edu          | Phone: (404) 727-5926
Emory University    | {decvax,gatech}!emory!vss     | Fax  : (404) 727-5611
Dept of Math and CS | vss@emory.bitnet              | Dept : (404) 727-7580
Atlanta, GA 30322   | sunderam@msr.epm.ornl.gov     | Home : (404) 370-1211
From: lhn@iss.nus.sg (Ngoh Lek Heng)
Newsgroups: comp.unix.wizards
Subject: Solaris TCP/IP Implementation
Date: 10 Dec 92 00:29:20 GMT
Organization: Institute of Systems Science, NUS, Singapore
X-Newsreader: Tin 1.1 PL4

Hi, can any one shed some light on the kernel-level TCP/IP implementation on
Sun's Solaris? Does it use the "mbuf" data structure similar to that found
under SunOS 4.1.x??

Thanks in advance.

Lek


--
_____________________________________________________________________
Ngoh Lek Heng PhD                           Phone: +65 772 6597 or 
Room 3-26,                                         +65 456 0912
Institute of Systems Science,        Lek    Fax:   +65 778 2571
National University of Singapore,     :     Telex: ISSNUS RS 39988
Heng Mui Keng Terrace, Kent Ridge,   Lek    Internet: lhn@iss.nus.sg
Singapore 0511                      ______
__________________________________/~      ~\_________________________       
Newsgroups: comp.unix.wizards
From: ten0772@aw2.fsl.ca.boeing.com (Timothy E. Neto )
Subject: Re: How do I invoke a login shell.
Organization: fsl
Date: Wed, 16 Dec 1992 01:06:28 GMT

From article <34657@adm.brl.mil>, by 92700217@vax1.dcu.ie (Ciaran Treanor):
> Hi Wizards,
>         I know this is probably not the right place to ask this question but
>         I need an answer in a hurry. I want to "exec" /bin/csh as a login
>         shell from a script file. In the man page for "csh" it says the
>         following:
> 
>         "If the shell is invoked with a name that starts with '-', as when
>         started by login(1) the shell runs as a login shell. In this case,
>         after executing commands from the .cshrc file, the shell executes
>         commands from the .login file in your home directory."
> 
>         How do you invoke /bin/csh with a name that starts with a '-'?
>         Do you mess around with argv[0], if so how do you do that in a
>         shell script?
>         Is there any other of invoking a login /bin/csh?
> 
>         I'm working on a Sparc 10 running SunOS 4.1.3.
> 
> Thanks in advance and apologies if this is a really stupid question!
> 
> Ciaran.
> 
> +------------------------+-----------------------------------------------------+
> | Ciaran Treanor         | In the sleepy west of the woody east,  | P          |
> | Electronic Engineering | is a valley full, full o' pioneer,     |  i         |
> | Dublin City University | we're not just kids, to say the least, |   x        |
> | Glasnevin              | we got ideas to us that's dear.        |    i       |
> | Ireland                |             [UMass]  Black Francis (!) |     e      |
> +------------------------+------------------------+---------------+------s---- +
> | Voice: +353-1-7045758  | Fax: +353-1-7045508    | E-Mail: 92700217@dcu.ie    |
> +------------------------+------------------------+----------------------------+

Try doing a man on 'csh'.  You're looking for the command 'start_csh'


-- 
Indecision is the key to | Timothy E. Neto  (206) 237-5527              1   000
flexibility, & you can't | Of B & T's Gadget & Widget Works             1  0. .0
E-Mail God.              | Flight Systems Lab, Boeing Comm. Aircraft    1  0 _ 0
My ideas not Boeing's    | Internet: ten0772@aw2.fsl.ca.boeing.com      1   000
Newsgroups: comp.unix.wizards,alt.folklore.computers
From: adam@owlnet.rice.edu (Adam Justin Thornton)
Subject: Re: So You Want To Be A Wizard? (A modest proposal)
Organization: Milo's Meadow
Date: Tue, 15 Dec 1992 02:54:09 GMT

In article <1992Dec14.080551.12999@blaze.cs.jhu.edu> bogstad@gauss.cs.jhu.edu (Bill Bogstad) writes:
>In article <1992Dec14.054857.6882@netcom.com> hitz@netapp.com writes:
>	Unfortunately, the Lions books hasn't been legally available in quite
>some time (over a decade I think).  If you want to start with something
>small and Unix-like, I'ld suggest getting a copy of Minix and the book that
>goes with it.  It's legally available and is probably as similar to modern
>Unix kernels as the V6 kernel described in the Lions books anyway.

Better still, get Linux or bsd386 (or is it 386bsd, anyway, the free one) and
study it.

Good stuff.

Adam
-- 
"And in the heartbreak years that lie ahead, |++| adam@rice.edu |++| Cthulhu
 Be true to yourself and the Grateful Dead." --Joan Baez  | 64,928 | fthagn!
"Very often, a common stone, thrown away and despised, is worth more than
 a cow." -- Paracelsus | If these were Rice's opinions I'd shoot myself.
From: moss@cs.cmu.edu (Eliot Moss)
Newsgroups: comp.unix.wizards
Subject: Re: What is text, data & bss anyway?
Date: 16 Dec 92 16:07:46 GMT
Article-I.D.: CRAFTY.MOSS.92Dec16110746
	<1992Dec15.085938.5975@ericsson.se> <15907@auspex-gw.auspex.com>
Reply-To: moss@cs.cmu.edu
Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)

>>>>> On 15 Dec 92 19:34:30 GMT, guy@Auspex.COM (Guy Harris) said:

Guy> What does GCC do with

Guy> 	const char foo[] = "abcd";

Guy> I.e., does it put it in the text or data segments?  (Text segment, I
Guy> hope.)

It puts it in the text segment by default. However, you can tell gcc to put
strings into the data segment (some programs actually expect to be able to
modify strings!) with the flag -fwritable-strings.
--

J. Eliot B. Moss, Associate Professor	Visiting Associate Professor
Department of Computer Science		School of Computer Science
Lederle Graduate Research Center	Carnegie Mellon University
University of Massachusetts		5000 Forbes Avenue
Amherst, MA  01003			Pittsburgh, PA  15213-3891
(413) 545-4206, 545-1249 (fax)		(412) 268-6767, 681-5739 (fax)
Moss@cs.umass.edu			Moss@cs.cmu.edu
Newsgroups: comp.unix.wizards
From: fff@microplex.com (Fred Fierling)
Subject: /dev/null and file locking
Organization: Microplex Systems Ltd
Distribution: na
Date: Tue, 15 Dec 1992 23:39:57 GMT

Is it kosher to mknod a device that has the same major and minor numbers as
/dev/null?  For example, given:

 $ ls -l /dev/null
 crw-rw-rw-   1 root     sys        4,  2 Dec 15 15:21 /dev/null

Can I:

 mknod /dev/another_null c 4 2

Can two processes write both these devices simultaneously without problems?
What happens when two processes try to lock /dev/null and /dev/another_null?

My guess is the locking is done at the inode level and each will have a
successful lock.  I've tried the mknod command under SCO Unix and it seems
to work as expected, but will this work for all flavours of Unix?

Sincere apologies if these questions are trite or trivial to the august
readership of this newsgroup.  :-)
-- 
Fred Fierling    fff@microplex.com      Tel: 604 875-1461   Fax: 604 875-9029
Microplex Systems Ltd   265 East 1st Avenue   Vancouver, BC  V5T 1A7,  Canada
Xref: sparky comp.unix.wizards:5202 alt.folklore.computers:17809
From: esr@snark.thyrsus.com (Eric S. Raymond)
Newsgroups: comp.unix.wizards,alt.folklore.computers
Subject: Re: So You Want To Be A Wizard? (A modest proposal)
Date: 11 Dec 92 16:49:43 GMT
Distribution: world
Validation-Errors: snark=0tzPDr9vQdX86TJ2CY6jtV2M

In <722720299.8269@minster.york.ac.uk> pete@minster.york.ac.uk wrote:
> What? No mentions of third-generation photocopies of the Lions book?!

Didn't occur to me, because though I've heard of this venerable tome (and
gave it an entry in the Jargon File) I've never actually *seen* it, nor
do I know anyone who has a copy.

I earned my wizard hat in late '83, early '84, administering a VAX 750 under 
BSD 4.1 (the BSD nobody remembers...).   As I recall, the Lions book (which
described V6) was considered historical even then.  I don't think I'd
recommend it to aspiring newbies ten years later.
-- 
					Eric S. Raymond <esr@snark.thyrsus.com>
Newsgroups: comp.unix.wizards
From: etxmesa@eos.ericsson.se (Michael Salmon)
Subject: Re: What is text, data & bss anyway?
Reply-To: etxmesa@eos.ericsson.se (Michael Salmon)
Organization: Ericsson Telecom AB
Date: Tue, 15 Dec 1992 08:59:38 GMT

In article <1992Dec14.234221.6644@saifr00.cfsat.honeywell.com>
klaus@saifr00.cfsat.honeywell.com (Todd Klaus) writes:
|> My collegues and I are experiencing some confusion as to the exact definition
|> of the text, data and bss segments of a executable image on disk and how this
|> changes when it is loaded into core memory.  My understanding (simplistic) is
|> that the text segment is executable instructions, data is initialized data, and 
|> bss is uinitialized data.  Is this correct?  Could someone please show me a code
|> fragment showing what types of variables would fall into each category?  As an
|> aside, does copy-on-write have anything to do with this scheme?

You are nearly correct:

text is read-only, loaded from disk
data is read-write, loaded from disk
bss is read-write, cleared at program start.

In gcc the following applies:

/* data */ char *s =
/* text */           "abcd";
/* bss  */ int i;

/* text */ main() { return 0; }

copy-on-write is a cheating system where data, heap, stack or, bss
segments are marked read only on forking and copied only when one or
the other process writes to them. It is used to avoid copying data on
forking as the child process usually doesn't do much work, it basically
just exec's another program.

-- 

Michael Salmon

#include	<standard.disclaimer>
#include	<witty.saying>
#include	<fancy.pseudo.graphics>

Ericsson Telecom AB
Stockholm
Newsgroups: comp.unix.wizards
From: joel@wmi.com (Joel Coltoff)
Subject: Problem with loadable device driver
Keywords: SPARC Sun4.1.2
Organization: Woodward McCoach, Inc.
Date: Tue, 15 Dec 1992 17:11:18 GMT

I'm trying to put the finishing touches on a loadable driver for
Sun 4.1.2. on SPARCstations (Yes I know you can make a career of
maintaining drivers) What I would like to know is the best method
of having the driver determine if it (or some other driver) was
already installed for that deivce. For now I cross my fingers and
if the system crashes the answer was yes. Is this something that
can be done easily? Is there a flag in a system structure that yields
this data or is a bit more complicated than that?

Please answer by email as we do not get this newsgroup at this
location.

Thanks in advance.
  - Joel
Xref: sparky comp.unix.wizards:5248 comp.unix.internals:2059
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Newsgroups: comp.unix.wizards,comp.unix.internals,bix.sco.opendesktop
Subject: Re: Need to have a device open a TCP/IP connection..
Date: 16 Dec 92 08:44:06 GMT
Organization: McGill Research Centre for Intelligent Machines

In article <1992Dec11.021307.11286@markv.com>, lance@markv.com (Lance Ellinghouse) writes:

> I want to re-setup our UUCP outbound connections.  The problem is
> that our modems are sitting on a terminal server now.  Each modem
> though has a unique IP address assigned to it.  I need to be able to
> connect to that modem using a TCP/IP socket, but from inside
> "uucico".  [...]  I was told by other people, "That is why they made
> pty's. Use them."

This is more or less correct.

> I have no idea how to.

Since you don't give any hint what sort of system you have (I can infer
that it's probably a relatively recent UNIX derivative, since you imply
it speaks UUCP and TCP), I can only guess at this too.

> I have tried a few things (open the master side, wait for chars, open
> the slave side, shove chars, no output/input, hangs!).

This is about as good a description as you can get in that little text.
Find a free pty pair, open the control side, connect to the modem, sic
uucico on the slave side.  How you go about the various steps depends
on your system.  I have some programs that mess with ptys on systems
that use the Berkeley pty mechanisms, and one of them even contains
conditional compilation to make it work on at least some versions of
IRIX (SGI's UNIX-alike, with a non-BSD pty interface).  I have no
trivial demo programs for ptys, unfortunately.

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
Xref: sparky comp.unix.wizards:5247 comp.unix.admin:6668
From: kmc@netcom.com (Kevin McCarty)
Newsgroups: comp.unix.wizards,comp.unix.admin
Subject: Re: Causes Of Death On Heavily-Loaded UNIX System?
Summary: What books deal with Unix system performance?
Keywords: system performance
Date: 16 Dec 92 08:07:08 GMT
Organization: Self

In article <1992Dec15.151754.27354@ra.msstate.edu> fwp@CC.MsState.Edu (Frank Peters) writes:
>
[discusses performance monitoring in SunOS]

>BIG DISCLAIMER TIME.  There are entire books written about performance
>tuning that cover a wide variety of issues like tuning kernel
>parameters and long term monitoring strategies.  I strongly suggest
>buying one of them.  

What are they?  I've already got (and read) the O'Reilly book.
What others are there?


-- 
Kevin McCarty (kmc@netcom.com)
Newsgroups: comp.unix.wizards
From: tommy@hilbert.att.com (Tom Reingold)
Subject: Re: select function
Reply-To: tommy@boole.att.com
Organization: AT&T Bell Labs, Holmdel, NJ, USA
Date: Tue, 15 Dec 1992 15:32:47 GMT

thf@zelator.in-berlin.de (Thomas Funke) writes:

$ In article <34398@adm.brl.mil> jbowyer%ovc.vutbr.cs@csbrmu11.bitnet (Jeff  
$ Bowyer) writes:
$ > I am trying to compile a program under Interactive UNIX (on some
$ > machine that I seldom use).  However, the program includes a call to
$ > the select() function, which is not present in our Interactive UNIX
$ > installation.  What should I use instead of the select() function?

$ Is this true ? I believe you cannot call something "UNIX" if there is no  
$ select(). 

What do you call versions of UNIX that preceded 4.2 BSD?
-- 
Tom Reingold
AT&T Bell Labs, Holmdel, NJ
tommy@boole.att.com or att!boole!tommy
Newsgroups: comp.unix.wizards,alt.folklore.computers