From ta02@academia.swt.edu  Tue Feb  8 13:43:25 1994
Received: from nyssa.swt.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA15220; Tue, 8 Feb 1994 12:43:58 MST
Received: from [147.26.101.110] (grasshopper.cs.swt.edu) by academia.swt.edu
 (PMDF V4.2-15 #3941) id <01H8N88BNWGG936LZL@academia.swt.edu>; Tue,
 8 Feb 1994 13:43:25 CST
Date: Tue, 08 Feb 1994 13:43:25 -0600 (CST)
Date-Warning: Date header was inserted by academia.swt.edu
From: ta02@academia.swt.edu (Tod Amon)
Subject: SR solution to Stable Marriage Problem
To: info-sr@cs.arizona.edu
Message-Id: <01H8N88BVXSY936LZL@academia.swt.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7BIT

I teach a class at Southwest Texas State University on Concurrent
Programming.  If anyone has an SR solution to the stable-marriage problem
(exercise 2.20 in the Andrews text) I'd love to see it.  I have a
message-passing solution.  I'm more interested in seeing a simple solution
that a student who has not read past chapter 2 could potentially come up
with.

Much Thanks.
-Tod Amon (ta02@academia.swt.edu)

p.s.  yeah, you guessed it, I assigned this problem as homework, but am
having trouble seeing the 'obvious' simple solution, :=).  Prompt reply
appreciated!



From @exeter.ac.uk:steve@dcs.exeter.ac.uk  Wed Feb  9 13:55:58 1994
Received: from sun2.nsfnet-relay.ac.uk by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA10127; Wed, 9 Feb 1994 07:13:56 MST
Via: uk.ac.exeter; Wed, 9 Feb 1994 13:56:26 +0000
Received: from atlas.exeter.ac.uk by exub.exeter.ac.uk with SMTP (PP) 
          id <11237-0@exub.exeter.ac.uk>; Wed, 9 Feb 1994 13:56:06 +0000
Received: from sirius.dcs.exeter.ac.uk by atlas.dcs.exeter.ac.uk;
          Wed, 9 Feb 94 13:55:59 GMT
From: steve@atlas.ex.ac.uk
Date: Wed, 9 Feb 94 13:55:58 GMT
Message-Id: <24719.9402091355@sirius.dcs.exeter.ac.uk>
To: ta02@academia.swt.edu
Cc: info-sr@cs.arizona.edu
In-Reply-To: Tod Amon's message of Tue, 08 Feb 1994 13:43:25 -0600 (CST) <01H8N88BVXSY936LZL@academia.swt.edu>
Subject: SR solution to Stable Marriage Problem


Below is a solution to the stable marriage problem. It also uses
message passing, but then this problem is particularly suitable
for solving using message passing.  The first part of the program
reads in the data and records the preferences -- an example of a 
data file together with its output is given after the program. 
(Note: this solution leaves blocked processes after solving the
problem.)

If you get an alternative solution I'd quite like to see it.

Steve

-------------------------------------------------------------------------------
Parallel Systems Research Laboratory	|  Stephen Turner
Email:  steve@dcs.exeter.ac.uk   	|  Department of Computer Science
Fax:    +44 392 264067			|  University of Exeter
Tel:    +44 392 264048			|  Prince of Wales Road
Telex:  42894 EXUNIV G			|  Exeter EX4 4PT England
-------------------------------------------------------------------------------

# Stable Marriage problem

resource StableMarriage()
   const strlen := 20
   var fname: string[strlen]
   getarg(1, fname)
   var f: file := open(fname, READ)		# open file of names and preferences

   var N: int  					# number of Men and Women
   read(f, N)
   var name[1:N]: string[strlen]
   fa i := 1 to N -> read(f, name[i]) af	# read names of Men and Women

   var M: int := N/2  				# number of each sex
   var prefer[1:M, 1:M]: int			# Men's preferences
   var rank[M+1:N, 1:M]: int			# Women's rankings 

   var p: int
   fa i := 1 to N ->
      writes(name[i], " prefers: ")  
      fa j := 1 to M ->
         read(f, p)				# read preferences of Men and Women
         if i <= M -> prefer[i,j] := p		# record Man's preference
	 [] else -> rank[i,p] := j		# or Woman's ranking
         fi
         writes(j, ", ", name[p], "; ")
      af
      write()
   af
   write()

   op propose[M+1:N](int)   			# indexed by Woman number
   op answer [1:M](bool)  			# indexed by Man number

   # life history of Man
   process Man (i := 1 to M)
      var accepted: bool := false
      var choice: int
      var c: int := 0
      do true ->
         nap(int(random()*1000))
         # propose to Women in order of preference
         do not accepted ->
            choice := prefer[i,++c]            
            send propose[choice](i)
            receive answer[i](accepted)
         od
         # wait to see if jilted 
         receive answer[i](accepted)	   
      od
   end

   # life history of Woman
   process Woman (i := M+1 to N)
      var best, suitor: int
      receive propose[i](best)  		# receive first proposal
      send answer[best](true)  			# accept first suitor
      write(name[best], "accepted by", name[i])
      do true ->
         receive propose[i](suitor)  		# receive new proposal
         if rank[i, suitor] < rank[i, best] -> 
            # new suitor better than previous best
            send answer[best](false)  		# previous best jilted
            write(name[best], "jilted by", name[i])
	    best := suitor 
            send answer[suitor](true)  		# accept new suitor
            write(name[suitor], "accepted by", name[i])
         [] else -> 
            send answer[suitor](false) 		# reject new suitor 
            write(name[suitor], "rejected by", name[i])
         fi
      od
   end

end StableMarriage

-------------------------------------------------------------------------------

10
Andrew
Brian
Charles
David
Edward
Angela
Brenda
Carol
Diana
Elizabeth

6 8 10 9 7
9 10 7 6 8
6 8 9 7 10
8 10 7 9 6 
6 8 7 10 9
2 5 3 1 4
3 4 2 5 1
5 1 3 4 2
5 1 4 2 3
1 2 3 5 4

-------------------------------------------------------------------------------

51 % a.out mdata10
Andrew prefers: 1, Angela; 2, Carol; 3, Elizabeth; 4, Diana; 5, Brenda; 
Brian prefers: 1, Diana; 2, Elizabeth; 3, Brenda; 4, Angela; 5, Carol; 
Charles prefers: 1, Angela; 2, Carol; 3, Diana; 4, Brenda; 5, Elizabeth; 
David prefers: 1, Carol; 2, Elizabeth; 3, Brenda; 4, Diana; 5, Angela; 
Edward prefers: 1, Angela; 2, Carol; 3, Brenda; 4, Elizabeth; 5, Diana; 
Angela prefers: 1, Brian; 2, Edward; 3, Charles; 4, Andrew; 5, David; 
Brenda prefers: 1, Charles; 2, David; 3, Brian; 4, Edward; 5, Andrew; 
Carol prefers: 1, Edward; 2, Andrew; 3, Charles; 4, David; 5, Brian; 
Diana prefers: 1, Edward; 2, Andrew; 3, David; 4, Brian; 5, Charles; 
Elizabeth prefers: 1, Andrew; 2, Brian; 3, Charles; 4, Edward; 5, David; 

Andrew accepted by Angela
Brian accepted by Diana
Andrew jilted by Angela
Charles accepted by Angela
David accepted by Carol
Charles jilted by Angela
Edward accepted by Angela
David jilted by Carol
Andrew accepted by Carol
Charles rejected by Carol
Charles rejected by Diana
Charles accepted by Brenda
David accepted by Elizabeth






From pheras@tornasol.uc3m.es  Mon Mar 21 15:44:59 1994
Message-Id: <199403211448.AA14142@optima.CS.Arizona.EDU>
Received: from tornasol.uc3m.es by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA14142; Mon, 21 Mar 1994 07:48:11 MST
Received: by tornasol.uc3m.es
	(16.7/15.6) id AA20246; Mon, 21 Mar 94 15:44:59 GMT
From: Pedro de las Heras <pheras@tornasol.uc3m.es>
Subject: Linux- SR 2.2
To: info-sr@cs.arizona.edu
Date: Mon, 21 Mar 94 15:44:59 GMT
Mailer: Elm [revision: 66.33]



	Hello.

The last release of SR (2.2), supports Linux plattforms.
Some time ago I compiled it with gcc-2.4.5 and it went ok.

Yesterday I installed Linux 0.99.15 (Version 1.0 is current Linux release), and
I had problems when I recompiled SR-2.2

Due to changes in the new Linux's libgcc, some SR files which depend on
this stuff didn't compile. (rts/io.c and others).

SOLUTION: The problem is within the FILE structure. It has changed to become
Posix compliant in Linux 0.99.15 and later. Simply defining 4 macros in stdio.h we haveagain SR compiled in this version:
-----------------------------
#define _pptr _IO_write_ptr
#define _gptr _IO_read_ptr
#define _egptr _IO_read_end
#define _pbase _IO_write_base
------------------------------


Hope this helps someone.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
	Pedro de las Heras Quiros.			C.S. Engineer 
	e-mail:  pheras@tornasol.uc3m.es

	Universidad Carlos III.       
	C/ Butarque 15. E-28911, 
	Leganes SPAIN
+-+-+-+-----------------=======--------=-=-_+_=-=+_+__++_-+_=-__++_-+_+-_+_+__



From GK15004@academia.swt.edu  Mon Apr  4 16:37:53 1994
Received: from tegan.swt.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA19949; Mon, 4 Apr 1994 14:38:26 MST
Received: from academia.swt.edu by academia.swt.edu (PMDF V4.2-15 #3941) id
 <01HAS8C31O5S99ELNJ@academia.swt.edu>; Mon, 4 Apr 1994 16:37:54 CST
Date: Mon, 04 Apr 1994 16:37:53 -0600 (CST)
From: GK15004@academia.swt.edu
Subject: SR and X windows. Help!
To: info-sr@cs.arizona.edu
Message-Id: <01HAS8C33TBM99ELNJ@academia.swt.edu>
Organization: Southwest Texas State University
X-Vms-To: IN%"info-sr@cs.arizona.edu"
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Transfer-Encoding: 7BIT

Hi, I hope I have the right address, I am looking for the forum on 
the SR programming language.

I am a rather new user of SR and I need some help with a couple
of things. I am working on an SR project and I would like to give
it a graphical interface using X windows. The way I see it, I have
two options. Either use the SRWin subsystem to call the X functions
or link C and SR code and handle the X interface with C. (I am quite
experienced with X through C) 

The problem with SRWin is that I cannot it to work. I can compile the
SRWin examples that came with SR, and I can run them but I only get a 
black window. Nothing is drawn on it. Any suggestions are welcomed.

However, my prefered solution would be to link C and SR code 
as I have a substancial X toolkit written in C. I need to know what
protocol I have to use in order to call C functions from SR and SR 
functions from C. 

The machine I am using is a UNIX workstation based on the DEC Alpha
chip and is running DEC OSF/1 V1.3

Any sugestions on either of the above would be most apprechiated.

-- George Kazangas 


From russh@galileo.tracor.com  Tue Apr  5 11:15:23 1994
Received: from galileo.tracor.com by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA19624; Tue, 5 Apr 1994 09:15:45 MST
Received: by galileo.tracor.com (4.1/SMI-4.1)
	id AA14353; Tue, 5 Apr 94 11:15:23 CDT
Date: Tue, 5 Apr 94 11:15:23 CDT
From: russh@galileo.tracor.com (Russell Hill)
Message-Id: <9404051615.AA14353@galileo.tracor.com>
To: GK15004@academia.swt.edu
Subject: SR questions
Cc: info-sr@cs.arizona.edu

Hey George:

I'm in your Concurrent Programming class at SWT.  I had the same
results when trying to use the Alphas.  I use SRWin on Linux at home
and a Silicon Graphics at work and it works great.

I think getting SRWin to work on the Alphas is out of your control.
Its up to the Sys Admin.  The Alphas may run Unix(OSF/Motif), but 
Digital always has to change their stuff and make it proprietary, 
(they screwed with Motif to make it look like DECWindows.)  I could
flame DEC all day...

In response to your other question SR can call C functions.  It's in
the SR manual under "External Operations," check the index but I think
it's link page 112.

You will need to declare a prototype at the begining of the resource 
using the keyword "external" and then you can call it just like any 
other procedure.  SR scans through the C libs looking for the procedure
or if it is routine you wrote just include the ".o" filename as an
argument to "srl".

If you have any more questions you can email me directly and I give it
shot.

-Russell

       __________________
  ---- |                 | |-\_
 ----  |                 | | |_\     \o/
  ---- |                 |_| | |      |
       ^^oo^^^^^^^^^oo^^^ o^^o^     _/ \_

-----------------------------------------------------------
Russell Hill                      Russell_Hill@tracor.com
Tracor Applied Sciences, Inc.
6500 Tracor Lane   MD 1-7         512-929-4082 office
AUSTIN TX 78725-2050              512-929-2241 fax


From azhao@cc.gatech.edu  Tue Apr  5 21:34:52 1994
Received: from burdell.cc.gatech.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA22937; Tue, 5 Apr 1994 18:34:55 MST
Received: from oakmont.cc.gatech.edu (azhao@oakmont.cc.gatech.edu [130.207.119.218]) by burdell.cc.gatech.edu (8.6.4/8.6.4) with ESMTP id VAA10613; Tue, 5 Apr 1994 21:34:53 -0400
Received: from localhost (azhao@localhost) by oakmont.cc.gatech.edu (8.6.4/8.6.4) id VAA24428; Tue, 5 Apr 1994 21:34:52 -0400
From: azhao@cc.gatech.edu (Q. Alex Zhao)
Message-Id: <199404060134.VAA24428@oakmont.cc.gatech.edu>
Subject: Re: SR and X windows. Help!
To: GK15004@academia.swt.edu
Date: Tue, 5 Apr 1994 21:34:52 -0400 (EDT)
Cc: info-sr@cs.arizona.edu
In-Reply-To: <01HAS8C33TBM99ELNJ@academia.swt.edu> from "GK15004@academia.swt.edu" at Apr 4, 94 04:37:53 pm
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 1737      

According to GK15004@academia.swt.edu in a previous message:
] ...
] The problem with SRWin is that I cannot it to work. I can compile the
] SRWin examples that came with SR, and I can run them but I only get a 
] black window. Nothing is drawn on it. Any suggestions are welcomed.

I just worked out a patch to the SRWin lib in the 2.2.1 distribution.
It fixes most of the problems on DEC Alpha's.

However "WinAddPixel()" doesn't work -- this was on a DEC Alpha OSF/1
1.3 and displaying on its own 24-bit display. "WinAddPixel()" is
implemented by directly calling Xlib function "XAddPixel()". I tried to
use "WinGetPixel()" then "WinPutPixel()" to go around it and that
worked ok.

This patch has been tested on SGI's too (8-bit and 24-bit monitors). If
you are interested, please let me know and I can send you the patch.
Other user-visible changes include:
	winCursor type changed to "pointer to any"
	winPixel type changed to "pointer to any"
(to use 64-bit integers on the Alpha).

This is not an official patch though...

] However, my prefered solution would be to link C and SR code 
] as I have a substancial X toolkit written in C. I need to know what
] protocol I have to use in order to call C functions from SR and SR 
] functions from C. 

As pointed out by Russell Hill, this could be done by first declaring
the C functions as "external" in the SR code, then link the SR code
with C code. Examples: see "gsrwin.sr" and "srwin.[ch]" in the "srwin"
directory.

Cheers,
= Q. Alex Zhao    ~{0"UT~}    ! Graphics, Visualization & Usability Center
  Email: azhao@cc.gatech.edu  ! College of Computing
  FAX:   404-853-9378         ! Georgia Institute of Technology
  Lab:   404-894-9633         ! Atlanta, Georgia 30332-0280

From @jeeves.engr.mun.ca:kwong@engr.mun.ca  Thu Apr  7 02:15:00 1994
Received: from jeeves.engr.mun.ca by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA27763; Wed, 6 Apr 1994 21:51:05 MST
Received: from nano.engr.mun.ca by jeeves.engr.mun.ca id <59426>; Thu, 7 Apr 1994 02:21:39 -0230
Date: 	Thu, 7 Apr 1994 02:15:00 -0230
From: Kai Wong <kwong@engr.mun.ca>
Subject: Anyone have the source for concurrent eight queens problem!
To: info-sr@cs.arizona.edu
Message-Id: <Pine.3.87.9404070200.A16531-0100000@nano.engr.mun.ca>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


	I got stuck with my eight queens assignment,  wonder if anyone on 
the net have the source. thanks!

--KAI--


From Jacob.Levy@eng.sun.com  Wed Apr  6 22:41:16 1994
Received: from Sun.COM by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA00546; Wed, 6 Apr 1994 22:39:13 MST
Received: from Eng.Sun.COM (zigzag.Eng.Sun.COM) by Sun.COM (sun-barr.Sun.COM)
	id AA20713; Wed, 6 Apr 94 22:39:01 PDT
Received: from burgess.Eng.Sun.COM by Eng.Sun.COM (4.1/SMI-4.1)
	id AA17963; Wed, 6 Apr 94 22:38:02 PDT
Received: by burgess.Eng.Sun.COM (5.0/SMI-SVR4)
	id AA10802; Wed, 6 Apr 1994 22:41:16 +0800
Date: Wed, 6 Apr 1994 22:41:16 +0800
From: Jacob.Levy@eng.sun.com (Jacob Levy)
Message-Id: <9404070541.AA10802@burgess.Eng.Sun.COM>
To: Kai Wong <kwong@engr.mun.ca>
Cc: info-sr@cs.arizona.edu
In-Reply-To: <Pine.3.87.9404070200.A16531-0100000@nano.engr.mun.ca>
Subject: Anyone have the source for concurrent eight queens problem!
Reply-To: jyl@toss.eng.sun.com
Content-Length: 175


Homework alert! :-) --JYL

Kai Wong writes:
 > 
 > 	I got stuck with my eight queens assignment,  wonder if anyone on 
 > the net have the source. thanks!
 > 
 > --KAI--
 > 

From olsson@cs.ucdavis.edu  Thu Apr 14 20:52:02 1994
Received: from ivy.cs.ucdavis.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA07260; Thu, 14 Apr 1994 20:52:12 MST
Received: by ivy.cs.ucdavis.edu (5.65/UCD.CS.2.4)
	id AA06648; Thu, 14 Apr 1994 20:52:02 -0700
Date: Thu, 14 Apr 1994 20:52:02 -0700
From: olsson@cs.ucdavis.edu (Ron Olsson)
Message-Id: <9404150352.AA06648@ivy.cs.ucdavis.edu>
To: info-sr@cs.arizona.edu
Subject: SRgetopt -- a global for handling command line options

Attached is a very handy global for handling command line options.
(It is also available via anonymous ftp from cs.arizona.edu in the sr
subdirectory.)  Enjoy!

# OVERVIEW:
#
# SRgetopt provides a general means for an SR program to parse command
# line arguments in accordance with the standard Unix conventions;
# it is analogous to, and based on, getopt(3) for C programs.
# (The following documentation is based on the man page for getopt(3).)

# DESCRIPTION:
#
# SRgetopt is an SR global that provides one procedure, getopt,
# and some variables that control behavior of or return additional
# information from getopt.
#
# getopt interprets command arguments in accordance with the standard
# Unix conventions: option arguments of a command are introduced by "-"
# followed by a key character, and a non-option argument terminates
# the processing of options.  getopt's option interpretation is controlled
# by its parameter optstring, which specifies what characters designate
# legal options and which of them require associated values.
#
# getopt returns the next, moving left to right, option letter
# in the command line arguments that matches a letter in optstring.
# optstring must contain the option letters the command using getopt
# will recognize.  For example, getopt("ab") specifies that the command
# line should contain no options, only "-a", only "-b", or both "-a" and
# "-b" in either order.  (The command line can also contain non-option
# arguments after any option arguments.)  Multiple options per argument
# are allowed, e.g., "-ab" for the last case above.
#
# If a letter in optstring is followed by a colon, the option is expected
# to have an argument.  The argument may or may not be separated by
# whitespace from the option letter.  For example, getopt("w:") allows
# either "-w 80" or "-w80".  The variable optarg is set to the option
# argument, e.g., "80" in either of the previous examples.  Predefined
# conversion functions such as int, char, etc. can then be applied to
# optarg.  (Use optarg[1] instead of char(optarg) if the first blank or
# non-blank character is wanted.)  The constant optMAXLEN defines the
# length of the longest string that getopt can read from the command line
# (extra characters are truncated silently) or will return in optarg.
#
# getopt places in the variable optind the index of the next command
# line argument to be processed; optind is automatically initialized
# to 1 before the first call to getopt.
#
# When all options have been processed (that is, up to the first
# non-option argument), getopt returns optEOF.  getopt recognizes the
# command line argument "--" (i.e., two dashes) to delimit the end of
# the options; getopt returns optEOF and skips "--".  Subsequent,
# non-option arguments can be retrieved using the predefined
# function getarg, beginning in with argument number optind.

# DIAGNOSTICS:
#
# getopt prints an error message on stderr and returns a question mark
# ('?') when it encounters an option letter in a command line argument
# that is not included in optstring.  Setting the variable opterr to
# false disables this error message.

# NOTES:
#
# The following notes describe SRgetopt's behavior in a few interesting
# or special cases; these behaviors are consistent with getopt(3)'s behaviors.
#
# -- A '-' by itself is treated as a non-option argument.
# -- If optstring is "a:" and the command line arguments are "-a -x",
#    then "-x" is treated as the argument associated with the "-a".
# -- Duplicate command line options are allowed; it is up to user to
#    deal with them as appropriate.
# -- A command line option like "-b-" is considered as the two options
#    "b" and "-" (so "-" should appear in option string); this differs
#    from "-b --".
# -- Sun and DEC getopt(3)'s differ w.r.t. how "---" is handled.
#    Sun treats "---" (or anything starting with "--") the same as "--"
#    DEC treats "---" as two separate "-" options
#    (so "-" should appear in option string).
#    SRgetopt follows the DEC convention.
# -- An option `letter' can be a letter, number, or most special character.
#    Like getopt(3), SRgetopt disallows a colon as an option letter.

# EXAMPLE:
#
# The following code fragment shows how to use SRgetopt to
# process a command that takes the options 'a', 'f', and 'w'
# where 'f' is followed by a file name and 'w' is followed by an integer.

/****
  resource main()
      import SRgetopt
      var ch: char
      # command line arguments
      var aflg := 0
      var filename: string[optMAXLEN] := "out"
      var width := 80
      do (ch := getopt("abf:w:")) != optEOF ->
         if ch = 'a' ->
            aflg++
         [] ch = 'f' ->
            filename := optarg
         [] ch = 'w' ->
            width := int(optarg)
         [] else ->
            stop(1)
         fi
      od
      write("-a", aflg)
      write("-f", filename)
      write("-w", width)
      fa k := optind to numargs() ->
         var xx: string[40]
         getarg(k,xx)
         write("normal argument", k, "is", xx)
      af
   end
****/

# SEE ALSO:
#
# getopt(3)

# WARNING:
#
# Changing the value of the variable optind may lead to unexpected behavior.


global SRgetopt

   var optind := 1
   var opterr := true

   # maximum length of an argument
   # (it is a const, not a var, so not redefinable by user,
   # because optarg declaration must be here in spec.)
   const optMAXLEN := 256

   var optarg: string[optMAXLEN]

   # optEOF is a var so user can redefine it if desired.
   # (also, as a const, it uncovered a bug in 2.2.1
   # which requires a patch to fold.c (94-04-06)).
   var optEOF := char(EOF)

   op getopt(optstring: string[*]) returns char

body SRgetopt

   procedure write_error(msg: string[*]; ch: char)
      var cmd: string[optMAXLEN]
      getarg(0, cmd)
      writes(stderr, cmd, ": ", msg, " -- ", ch, "\n")
   end

   const argc := numargs()
   var optpos := 2

   proc getopt(optstring) returns ch
      optarg := ""
      if optind < 1 | optind > argc ->
         ch := optEOF
         return
      fi
      var thisarg: string[optMAXLEN]
      getarg(optind, thisarg)
      var len := length(thisarg)
      # handle special cases
      if len <= 1 | thisarg[1] != '-' ->
         # e.g., "", "a", "abc", or just "-"
         ch := optEOF
         return
      [] thisarg = "--" ->
         # end of non-option args
         ch := optEOF
	 optind++
         return
      fi
      # get next "letter" from option argument
      ch := thisarg[optpos]
      # find this option in optstring
      var found := false
      var pos: int
      fa x := 1 to length(optstring) ->
         if optstring[x] = ch ->
            found := true
            pos := x
            exit
         fi
      af
      if not found | ch = ':' ->
         if opterr ->
            write_error("illegal option", ch)
         fi
         ch := '?'
      [] else ->
         # handle colon, if present
         if pos < length(optstring) & optstring[pos+1] = ':' ->
            if optpos != len ->
               # take rest of current arg as optarg
               optarg := thisarg[optpos+1:*]
               optpos := len # to force advance to next arg below
            [] else ->
               # take next arg as optarg
               optind++
               if optind <= argc ->
                  getarg(optind,optarg)
               [] else ->
                  if opterr ->
                     write_error("option requires an argument", ch)
                  fi
                  ch := '?'
               fi
            fi 
         fi
      fi
      # advance to next option argument,
      # which might be in thisarg or next arg
      optpos++
      if optpos > len ->
         optind++
         optpos := 2
      fi
   end

end

From pheras@tornasol.uc3m.es  Fri Apr 22 03:29:54 1994
Message-Id: <199404221029.AA13968@optima.CS.Arizona.EDU>
Received: from tornasol.uc3m.es by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA13968; Fri, 22 Apr 1994 03:29:54 MST
Received: by tornasol.uc3m.es
	(16.7/15.6) id AA17083; Fri, 22 Apr 94 12:25:47 +0100
From: Pedro de las Heras <pheras@tornasol.uc3m.es>
Subject: Exceptions
To: info-sr@cs.arizona.edu
Date: Fri, 22 Apr 94 12:25:47 BST
Mailer: Elm [revision: 66.33]

Hello.

Is there any implementation available of exceptions in SR as the one described in the article on Trans. on ACM Prog. Lang. and Syst. in Jan. 1988 ?


I'm currently using SR 2.1



Thanks in advance

---------------------------------------------------------------------------
	Pedro de las Heras Quiros.			C.S. Engineer 
	e-mail:  pheras@tornasol.uc3m.es

	Universidad Carlos III.      		Tlf: +34-1-624 94 97 
	C/ Butarque 15. E-28911, 
	Leganes SPAIN
---------------------------------------------------------------------------

From pheras@tornasol.uc3m.es  Fri Apr 22 03:40:52 1994
Message-Id: <199404221040.AA14714@optima.CS.Arizona.EDU>
Received: from tornasol.uc3m.es by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA14714; Fri, 22 Apr 1994 03:40:52 MST
Received: by tornasol.uc3m.es
	(16.7/15.6) id AA17109; Fri, 22 Apr 94 12:36:04 +0100
From: Pedro de las Heras <pheras@tornasol.uc3m.es>
Subject: source repository
To: info-sr@cs.arizona.edu
Date: Fri, 22 Apr 94 12:36:04 BST
Mailer: Elm [revision: 66.33]

Hello.


Is there any repository of source code?

Is there any faq or some place where the messages in the list are stored?


   
   Regards


---------------------------------------------------------------------------
	Pedro de las Heras Quiros.			C.S. Engineer 
	e-mail:  pheras@tornasol.uc3m.es

	Universidad Carlos III.      		Tlf: +34-1-624 94 97 
	C/ Butarque 15. E-28911, 
	Leganes SPAIN
---------------------------------------------------------------------------

From pheras@tornasol.uc3m.es  Fri Apr 22 03:41:34 1994
Message-Id: <199404221041.AA14763@optima.CS.Arizona.EDU>
Received: from tornasol.uc3m.es by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA14763; Fri, 22 Apr 1994 03:41:34 MST
Received: by tornasol.uc3m.es
	(16.7/15.6) id AA17122; Fri, 22 Apr 94 12:37:33 +0100
From: Pedro de las Heras <pheras@tornasol.uc3m.es>
Subject: SR as a teaching tool
To: info-sr@cs.arizona.edu
Date: Fri, 22 Apr 94 12:37:32 BST
Mailer: Elm [revision: 66.33]

Hello.

I'd like to hear about experiences in the use of SR as a teaching tool at the university.

We are planning to use it in a course on distributed systems.                 

Is there any report on this theme?




Regards


---------------------------------------------------------------------------
	Pedro de las Heras Quiros.			C.S. Engineer 
	e-mail:  pheras@tornasol.uc3m.es

	Universidad Carlos III.      		Tlf: +34-1-624 94 97 
	C/ Butarque 15. E-28911, 
	Leganes SPAIN
---------------------------------------------------------------------------

From olsson@cs.ucdavis.edu  Fri Apr 22 03:54:19 1994
Received: from ivy.cs.ucdavis.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA15528; Fri, 22 Apr 1994 03:54:49 MST
Received: by ivy.cs.ucdavis.edu (5.65/UCD.CS.2.4)
	id AA16828; Fri, 22 Apr 1994 03:54:19 -0700
Date: Fri, 22 Apr 1994 03:54:19 -0700
From: olsson@cs.ucdavis.edu (Ron Olsson)
Message-Id: <9404221054.AA16828@ivy.cs.ucdavis.edu>
To: pheras@tornasol.uc3m.es
Cc: info-sr@cs.arizona.edu
In-Reply-To: <199404221029.AA13968@optima.CS.Arizona.EDU> (message from Pedro de las Heras on Fri, 22 Apr 94 12:25:47 BST)
Subject: Exceptions

   From: Pedro de las Heras <pheras@tornasol.uc3m.es>
   Date: Fri, 22 Apr 94 12:25:47 BST

   Is there any implementation available of exceptions in SR as the
   one described in the article on Trans. on ACM Prog. Lang. and
   Syst. in Jan. 1988 ?

Those features were never implemented.  You might be interested in the
paper by Daniel Huang and myself cited in the SR book's bibliography,
although those features were never implemented either.  You might also
be interested in FT-SR, developed by Vic Thomas and Rick Schlichting
(rick@cs.arizona.edu); I'm not fully aware of the status of that work,
but I believe at least parts of that were implemented.

From olsson@cs.ucdavis.edu  Fri Apr 22 03:58:53 1994
Received: from ivy.cs.ucdavis.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA15602; Fri, 22 Apr 1994 03:59:05 MST
Received: by ivy.cs.ucdavis.edu (5.65/UCD.CS.2.4)
	id AA16863; Fri, 22 Apr 1994 03:58:53 -0700
Date: Fri, 22 Apr 1994 03:58:53 -0700
From: olsson@cs.ucdavis.edu (Ron Olsson)
Message-Id: <9404221058.AA16863@ivy.cs.ucdavis.edu>
To: pheras@tornasol.uc3m.es
Cc: info-sr@cs.arizona.edu
In-Reply-To: <199404221041.AA14763@optima.CS.Arizona.EDU> (message from Pedro de las Heras on Fri, 22 Apr 94 12:37:32 BST)
Subject: SR as a teaching tool

The only such report of which I'm aware is the one by Hartley cited in
the bibliography of the SR book.  (You might contact him directly,
shartley@mcs.drexel.edu, if you don't have access to those proceedings.)

From olsson@cs.ucdavis.edu  Fri Apr 22 04:02:58 1994
Received: from ivy.cs.ucdavis.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA16001; Fri, 22 Apr 1994 04:03:15 MST
Received: by ivy.cs.ucdavis.edu (5.65/UCD.CS.2.4)
	id AA17058; Fri, 22 Apr 1994 04:02:58 -0700
Date: Fri, 22 Apr 1994 04:02:58 -0700
From: olsson@cs.ucdavis.edu (Ron Olsson)
Message-Id: <9404221102.AA17058@ivy.cs.ucdavis.edu>
To: pheras@tornasol.uc3m.es
Cc: info-sr@cs.arizona.edu
In-Reply-To: <199404221040.AA14714@optima.CS.Arizona.EDU> (message from Pedro de las Heras on Fri, 22 Apr 94 12:36:04 BST)
Subject: source repository

   From: Pedro de las Heras <pheras@tornasol.uc3m.es>
   Date: Fri, 22 Apr 94 12:36:04 BST

   Is there any repository of source code?

Not of which I'm aware.  If you're looking for specific code, post to
info-sr.

   Is there any faq or some place where the messages in the list are stored?

No faq.  Old mail to info-sr is available by ftp from cs.arizona.edu
in the sr subdirectory.

From thomas@orion.ssdc.honeywell.com  Tue Apr 26 11:39:38 1994
Received: from orion.ssdc.honeywell.com by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA14140; Tue, 26 Apr 1994 09:39:58 MST
Received: from zephyr.ssdc.honeywell.com by orion.ssdc.honeywell.com; Tue, 26 Apr 94 11:39:49 CDT
From: "Vic Thomas 951-7470" <thomas@orion.ssdc.honeywell.com>
Message-Id: <9404261639.AA02921@zephyr.ssdc.honeywell.com>
Received: by zephyr.ssdc.honeywell.com; Tue, 26 Apr 94 11:39:40 CDT
Subject: Re: Exceptions
To: pheras@tornasol.uc3m.es
Date: Tue, 26 Apr 1994 11:39:38 -0500 (CDT)
Cc: info-sr@cs.arizona.edu, rick@cs.arizona.edu
In-Reply-To: <9404221054.AA16828@ivy.cs.ucdavis.edu> from "Ron Olsson" at Apr 22, 94 03:54:19 am
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 1442      

Ron Olsson writes
> 
>    From: Pedro de las Heras <pheras@tornasol.uc3m.es>
>    Date: Fri, 22 Apr 94 12:25:47 BST
> 
>    Is there any implementation available of exceptions in SR as the
>    one described in the article on Trans. on ACM Prog. Lang. and
>    Syst. in Jan. 1988 ?
> 
> Those features were never implemented.  You might be interested in the
> paper by Daniel Huang and myself cited in the SR book's bibliography,
> although those features were never implemented either.  You might also
> be interested in FT-SR, developed by Vic Thomas and Rick Schlichting
> (rick@cs.arizona.edu); I'm not fully aware of the status of that work,
> but I believe at least parts of that were implemented.
> 

FT-SR, which is SR with extensions for writing fault-tolerant programs, has a
limited exception handling facility that is used to signal loss of resources
due to machine crashes.  It is therefore not a full fledged exception
mechanism that can be used to signal arbitrary exceptions.  FT-SR also has an
asynchrounous failure notification/handling mechanism.

A paper describing FT-SR is due to appear in the IEEE Transactions on
Computers in August.  If you want, I will be happy to mail you a postscript
version of the paper.  For a more complete description of FT-SR you might want
to look at my dissertation, a copy of which can be ftp'd from cs.arizona.edu.
Look for TR93-23.ps (or TR93-23.ps.Z) in directory reports/1993.

< Vic

From djesau@barrow.uwaterloo.ca  Thu Jun 23 16:06:37 1994
Received: from barrow.uwaterloo.ca by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA20748; Thu, 23 Jun 1994 13:06:57 MST
Received: by barrow.uwaterloo.ca id <106128>; Thu, 23 Jun 1994 16:06:39 -0400
Subject: Help finding SR applications
From: Darren Esau <djesau@barrow.uwaterloo.ca>
To: info-sr@cs.arizona.edu
Date: Thu, 23 Jun 1994 16:06:37 -0400
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 337       
Message-Id: <94Jun23.160639edt.106128@barrow.uwaterloo.ca>

Hi.  I'm a student doing some work on some software for detecting data
races in SR programs, and I was wondering if anyone might be able to
point me to some existing SR applications that I could test it with,
preferably making substantial use of shared variables.

Thanks,

Darren Esau
University of Waterloo
djesau@barrow.uwaterloo.ca


From scip3161@leonis.nus.sg  Sat Jun 25 09:17:14 1994
Received: from leonis.nus.sg by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA28329; Fri, 24 Jun 1994 18:17:27 MST
Received: from localhost (scip3161@localhost) by leonis.nus.sg (8.6.4/8.6.4/CNS-2.0) id JAA11472 for info-sr@cs.arizona.edu; Sat, 25 Jun 1994 09:17:14 +0800
From: E Z A M <scip3161@leonis.nus.sg>
Message-Id: <199406250117.JAA11472@leonis.nus.sg>
Subject: about the nap() function...
To: info-sr@cs.arizona.edu (arizona info_sr)
Date: Sat, 25 Jun 1994 09:17:14 +0800 (SST)
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 578       

Hello, I would like to check that will the nap() function put a process in
a waiting state, i.e. not using any cpu resources?
I would like to have the process still seeking for cpu services for a
specific time period.  Is there better way than to use for loops?  Or even
the for loops, if empty, will be optimize to no operation or suspension?

thanks.

-- 
........................................................
Lai_Hong Cheong (E Z A M)
scip3161@leonis.nus.sg
Learn from the atom and particles about the way of life.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

From greg  Sat Jun 25 08:49:11 1994
Received: from paloverde.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA09947; Sat, 25 Jun 1994 08:49:12 MST
Date: Sat, 25 Jun 1994 08:49:11 MST
From: "Greg Andrews" <greg>
Message-Id: <199406251549.AA00846@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Sat, 25 Jun 1994 08:49:11 MST
To: info-sr@cs.arizona.edu, scip3161@leonis.nus.sg
Subject: Re:  about the nap() function...

A call to nap() suspends (blocks) the executing process (unless
the argument is zero).  Thus, you will need to use a loop to busy
wait.  However, I don't know why you would want to continue to
"seek cpu services" while waiting.

Loops are "interrupted" every so often to reenter the SR runtime.
The default is 10,000 iterations.  This can be altered using the
-L option of srl, the SR linker.  (See the man page, or execute
"srl -l" to see all runtime limits.)

Greg Andrews

From shartley@mcs.drexel.edu  Fri Jul  8 13:52:24 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA01352; Fri, 8 Jul 1994 10:51:12 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA26030; Fri, 8 Jul 94 13:52:24 EDT
Date: Fri, 8 Jul 94 13:52:24 EDT
From: shartley@mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9407081752.AA26030@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: Re: SR as a teaching tool

>The only such report of which I'm aware is the one by Hartley cited in
>the bibliography of the SR book.  (You might contact him directly,
>shartley@mcs.drexel.edu, if you don't have access to those proceedings.)

"Experience with the Language SR in an Undergraduate Operating Systems
Course," ACM SIGCSE Bulletin, Vol. 24, No. 1, March 1992.

I can send uuencoded PostScript of the above to anyone interested.

Also, a related article is the following.

"An Operating Systems Laboratory Based on the SR (Synchronizing Resources)
Programming Language," Computer Science Education, Vol. 3, No. 3, 1992,
pp. 251-276.

Finally, I am under contract to Oxford University Press to expand the above
article into a book.  Look for it in about a year.

Steve Hartley
shartley@mcs.drexel.edu

From shartley@king.mcs.drexel.edu  Fri Jul  8 14:07:17 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA02286; Fri, 8 Jul 1994 11:06:04 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA26488; Fri, 8 Jul 94 14:07:17 EDT
Date: Fri, 8 Jul 94 14:07:17 EDT
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9407081807.AA26488@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: Re: SR and X windows. Help!

>I am a rather new user of SR and I need some help with a couple
>of things. I am working on an SR project and I would like to give
>it a graphical interface using X windows. The way I see it, I have
>two options. Either use the SRWin subsystem to call the X functions
>or link C and SR code and handle the X interface with C. (I am quite
>experienced with X through C)

  There is a third choice, described in the article:

"Animating Operating Systems Algorithms with XTANGO," ACM SIGCSE Bulletin,
Vol. 26, No. 1, March 1994.

  This article shows (with an example) how to use SR with XTANGO.  I can
send uuencoded PostScript to anybody who is interested.  The article shows
how to insert additional write statements into a program so that the algorithm
in the program is "animated" when the program output is piped into an
XTANGO program called animator.  Contrast this with SRWin, where you put
procedure calls into your SR program.  I am working on blending the use
of XTANGO's animator into an SR program, similar to the way SRWin works,
so that procedures can be called to drive the animation.  The advantage
over SRWin is that I think animator is easier to use, particularly for
students.
  I am hoping the SR people will include this in a future release of the
SR system.

From shartley@mcs.drexel.edu  Mon Jul 11 19:16:20 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA24587; Mon, 11 Jul 1994 16:15:11 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA00356; Mon, 11 Jul 94 19:16:20 EDT
Date: Mon, 11 Jul 94 19:16:20 EDT
From: shartley@mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9407112316.AA00356@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: citation help

  If someone out there has the last 7 years of ACM SIGOPS OSR, could
you supply me with the complete citation for the article:

    "A Corrent and Unrestrictive Implementation of General Semaphores"
    by Phil Kearns, Operating Systems Review, 1988 or 1989 or so

I need the year, volume number, and issue number.

Thanks,

Steve Hartley
shartley@mcs.drexel.edu

From greg  Wed Jul 13 09:25:08 1994
Received: from paloverde.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA07064; Wed, 13 Jul 1994 09:25:09 MST
Date: Wed, 13 Jul 1994 09:25:08 MST
From: "Greg Andrews" <greg>
Message-Id: <199407131625.AA16641@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Wed, 13 Jul 1994 09:25:08 MST
To: info-sr@cs.arizona.edu, shartley@king.mcs.drexel.edu
Subject: Re:  citation help

    Date: Mon, 11 Jul 94 19:16:20 EDT
    From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
    Subject: citation help

      If someone out there has the last 7 years of ACM SIGOPS OSR, could
    you supply me with the complete citation for the article:

        "A Correct and Unrestrictive Implementation of General Semaphores"
        by Phil Kearns, Operating Systems Review, 1988 or 1989 or so

    I need the year, volume number, and issue number.

    Thanks,

    Steve Hartley
    shartley@mcs.drexel.edu

I have a complete set of OSR for the past 20 years.  The citation for the
Kearns article is Volume 22, Number 4, October 1988, pp. 46-48.

If anyone else has a similar question, holler.

Greg Andrews

From pheras@tornasol.uc3m.es  Fri Jul 29 04:22:26 1994
Message-Id: <199407291122.AA02297@optima.cs.arizona.edu>
Received: from tornasol.uc3m.es by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA02297; Fri, 29 Jul 1994 04:22:26 MST
Received: by tornasol.uc3m.es
	(16.7/15.6) id AA24729; Fri, 29 Jul 94 13:21:54 +0100
From: Pedro de las Heras <pheras@tornasol.uc3m.es>
Subject: SR on NetBSD
To: info-sr@cs.arizona.edu
Date: Fri, 29 Jul 94 13:21:54 BST
Mailer: Elm [revision: 66.33]

We have compiled SR-2.2 in NetBSD boxes. If anyone is interested on it,
let us know.







--
Pedro de las Heras Quiros	

Internet:  pheras@tornasol.uc3m.es   //   snail-mail:
           pheras@bizcoyo.uc3m.es    //      Universidad Carlos III
Voice: +34-1-624 94 97               //      C/ Butarque 15. E-28911
Fax: +34-1-624 94 30                 //      Leganes SPAIN
WWW: http://www.uc3m.es/~pheras/   

From pingu!edgar@tmpuhf.saar.de  Mon Aug  1 14:34:39 1994
Received: from shug-internet.saar.de by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA24891; Mon, 1 Aug 1994 14:34:39 MST
Received: from TMPuhf.Saar.DE (tmpuhf.saar.de [192.109.53.3]) by shug-internet.saar.de (8.6.8.1/8.5) with SMTP id XAA11182; Mon, 1 Aug 1994 23:34:23 +0200
Received: from pingu by TMPuhf.Saar.DE with uucp
	(Smail3.1.28.1 #1) id m0qV5sG-00021LC; Mon, 1 Aug 94 23:30 WET DST
Received: by pingu.saar.de (Smail3.1.28.1 #4)
	id m0qV4w2-000025C; Mon, 1 Aug 94 23:30 MET DST
Message-Id: <m0qV4w2-000025C@pingu.saar.de>
Date: Mon, 1 Aug 94 23:30 MET DST
From: edgar@pingu.saar.de (Edgar Greuter)
To: info-sr@cs.arizona.edu
Subject: patch for rts/scan.c to allow scansets in scanf


Hello!

The following patch - applied to rts/scan.c in the SR source tree - enables
the use of scansets in scanf-format specifiers like in ANSI-C. A typical usage
would be:

	scanf(inputFile, "%[^\n]\n", line)

to read a string up to the next linefeed character (not necessarily separated
by whitespace chars). I know that read() can do the same thing as the example
above, but it's not as general and i didn't want to mix scanf and read.

And BTW the %[-format is mentioned in the book (The SR Programming Language) at
page 305 :-).

	- Edgar

--- rts/scan.c~	Tue Sep 28 00:58:32 1993
+++ rts/scan.c	Mon Aug  1 23:16:31 1994
@@ -5,6 +5,7 @@
 #include "rts.h"
 
 static int scanToken (), scanInteger (), scanReal (), scanPointer ();
+static int scanTokenFromSet ();
 
 #define BACKCH(c,f,S,s) (S ? ((s>DATA (S)) ? (s)-- : 0) : (char*)ungetc (c, f))
 #define NEXTCH(l,f,S,s) (S ? ((*s=='\0') ? EOF : * (Char*)(s)++) : INCH (l, f))
@@ -204,6 +205,140 @@
 		}
 		break;		/*----  end of integer conversion */
 
+	      case '[':
+		  {
+		      char charset[256];
+		      int in_set = 1;
+
+		      c = *fmt++;
+		      if (c == '^') {
+			  in_set = 0;
+			  c = *fmt++;
+		      }
+		      if (c == '\0')
+			  ABORT_IO (fp, locn, "premature termination of format string");
+		      memset(charset, !in_set, 256);
+		      if (fmt[1] == '-') {
+			  if (fmt[2] < c) {
+			      if (fmt[2] == '\0')
+				  ABORT_IO (fp, locn, "premature termination of
+format string");
+			  } else {
+			      for (ch = c; ch <= fmt[2]; ch++)
+				  charset[ch] = in_set;
+			  }
+			  c = fmt[3];
+			  fmt += 3;
+		      } else {
+			  if (c == ']') {
+			      charset[c] = in_set;
+			      c = *fmt++;
+			  } else if (c == '-') {
+			      charset[c] = in_set;
+			      c = *fmt++;
+			  }
+		      }
+		      while (1) {
+			  if (c == '\0')
+			      ABORT_IO (fp, locn, "premature termination of format string");
+			  if (c == ']') break;
+			  if (fmt[1] == '-') {
+			      if (fmt[2] < c) {
+				  if (fmt[2] == '\0')
+				      ABORT_IO (fp, locn, "premature termination of
+format string");
+			      } else {
+				  for (ch = c; ch <= fmt[2]; ch++)
+				      charset[ch] = in_set;
+			      }
+			      c = fmt[3];
+			      fmt += 3;
+			  } else {
+			      charset[c] = in_set;
+			      c = *fmt++;
+			  }
+		      }
+		      /*
+		       * handle the string (s) format type here.
+		       * if this field is suppressed then do not consume an arg.
+		       * have to special case the format %1s to allow assignment
+		       * to a char.
+		       */
+		      if (fldWidth == 1 && *argt == 'c' && !suppress) {
+			  /*
+			   * do this only if format is '%1s', arg is char AND
+			   * the field is NOT suppressed.
+			   */
+			  ch = NEXTCH (locn, fp, sarg, inString);
+
+			  if (ch == EOF)
+			      IO_RETURN (fp, nread ? nread : EOF);
+
+			  if (!charset[ch])
+			      IO_RETURN (fp, nread ? nread : EOF);
+
+			  cp = va_arg (ap, Char *);
+			  *cp = ch;
+			  ++nread;
+			  ++argt;
+
+		      } else if (*argt == 'a' && !suppress) {
+
+			  /*
+			   * scan into array of characters
+			   */
+			  ++argt;
+			  a = (Array *) va_arg (ap, Array *);
+			  l = a->ub - a->lb + 1;
+
+			  /*
+			   *  Scan no more than max (length of string, field width)
+			   */
+			  i = (l < fldWidth) ? l : fldWidth;
+			  if ((n = scanTokenFromSet (locn, fp, sarg, &inString,
+						     buf, i, charset)) == EOF)
+			      IO_RETURN (fp, nread ? nread : EOF);
+			  if (n == 0)
+			      IO_RETURN (fp, nread);
+
+			  ++nread;
+			  strncpy (DATA (a), buf, n);
+			  /*
+			   *  blank out the remainder of the input array
+			   */
+			  while (n < l)
+			      DATA (a) [n++] = ' ';
+
+		      } else {
+			  n = scanTokenFromSet (locn, fp, sarg, &inString, buf,
+						fldWidth, charset);
+			  if (n == EOF)
+			      IO_RETURN (fp, nread ? nread : EOF);
+			  if (n == 0)
+			      IO_RETURN (fp, nread);
+
+			  if (!suppress) {
+			      if (*argt != 's')
+				  ABORT_IO (fp, locn,
+					    "arguments do not match format string");
+			
+			      sp = (String *) va_arg (ap, String *);
+			      ++argt;
+			
+			      /*
+			       * set length limit (l) to lesser of
+			       * size of String or or the number of chars read.
+			       */
+			      l = MAXLENGTH (sp);
+			      l = (l < n) ? l : n;
+			
+			      strncpy (DATA (sp), buf, l);
+			      sp->length = l;
+			      ++nread;
+			  }
+		      }
+		      break;	/*----  end of string format conversion */
+		  }
 	      case 's':
 		/*
 		 * handle the string (s) format type here.
@@ -528,6 +663,42 @@
 
     n = 0;
     while (ch != EOF && !isspace (ch) && n < len) {
+	buf[n++] = ch;
+	ch = NEXTCH (locn, fp, S, *s);
+    }
+
+    BACKCH (ch, fp, S, *s);
+
+    buf[n] = '\0';
+    return n;
+}
+
+/*
+ *  Scan a token from either the file or string into the buffer.
+ *  Token is any string of chars from the charset supplied.
+ *  Scans up to len chars into buf.
+ *
+ *  This is always called between a BEGIN_IO and an END_IO so we
+ *  do not do it here.
+ */
+static int
+scanTokenFromSet (locn, fp, S, s, buf, len, charset)
+char *locn;
+FILE *fp;
+String *S;
+char **s, *buf;
+int len;
+char *charset;
+{
+    int n, ch;
+
+    ch = NEXTCH (locn, fp, S, *s);
+
+    if (ch == EOF)
+	return EOF;
+
+    n = 0;
+    while (ch != EOF && charset[ch] && n < len) {
 	buf[n++] = ch;
 	ch = NEXTCH (locn, fp, S, *s);
     }

From benson@cs.ucdavis.edu  Tue Aug  9 03:26:56 1994
Received: from toadflax.cs.ucdavis.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA04597; Tue, 9 Aug 1994 03:27:02 MST
Received: from elysium.cs.ucdavis.edu by toadflax.cs.ucdavis.edu (4.1/UCD.CS.2.5)
	id AA17189; Tue, 9 Aug 94 03:26:59 PDT
Received: from localhost.cs.ucdavis.edu by elysium.cs.ucdavis.edu (5.65/UCD.CS.2.5)
	id AA26773; Tue, 9 Aug 1994 03:26:58 -0700
Message-Id: <9408091026.AA26773@elysium.cs.ucdavis.edu>
To: info-sr@cs.arizona.edu
Subject: SR and pthreads
Date: Tue, 09 Aug 94 03:26:56 -0700
From: benson@cs.ucdavis.edu
X-Mts: smtp


Here are two SR implementation questions:

1.  Has anyone rewritten the the SR RTS using pthreads?

2.  Has anyone ported SR to Mach?  (by this I mean a rewrite of the
    SR RTS to use cthreads or kernel threads, not a port to a BSD
    single server)

I am interested in both these tasks and I don't want to duplicate
any work.  Even if someone hasn't completed either project I
would be interested in hearing about any efforts towards these ends.

In addition, if anyone has put some thought to these projects or
simply has some ideas I would appreciate any comments.

Thanks

Greg Benson
benson@cs.ucdavis.edu

From mmunoz@inf.utfsm.cl  Tue Aug  9 09:23:07 1994
Received: from inti.inf.utfsm.cl by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA13135; Tue, 9 Aug 1994 06:21:52 MST
Received: by inti.inf.utfsm.cl id AA08837
  (5.67b8/IDA-1.5 for info-sr@cs.arizona.edu); Tue, 9 Aug 1994 09:23:07 -0400
Date: Tue, 9 Aug 1994 09:23:07 -0400
From: Marcelo Munoz Jofre <mmunoz@inf.utfsm.cl>
Message-Id: <199408091323.AA08837@inti.inf.utfsm.cl>
To: info-sr@cs.arizona.edu

unsubcribe me

From gangrene!gene@netcom.com  Wed Aug 10 05:47:57 1994
Received: from netcomsv.netcom.com (uucp7.netcom.com) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA04245; Wed, 10 Aug 1994 06:18:18 MST
Received: from gangrene.UUCP by netcomsv.netcom.com with UUCP (8.6.4/SMI-4.1)
	id GAA05913; Wed, 10 Aug 1994 06:18:29 -0700
Received: by gangrene. (NX5.67c/NX3.0M)
	id AA08515; Wed, 10 Aug 94 05:47:57 -0700
Date: Wed, 10 Aug 94 05:47:57 -0700
From: gene michael stover <gangrene!gene@netcom.com>
Message-Id: <9408101247.AA08515@gangrene.>
Received: by NeXT.Mailer (1.87.1)
Received: by NeXT Mailer (1.87.1)
To: info-sr@cs.arizona.edu
Subject: SR and pthreads
Reply-To: gangrene!CyberTiggyr.com!gene@netcom.com

Dr Olssen lectured at California State University in Hayward  
almost two years ago, and I asked him about SR on Mach in terms  
of cthreads. He said this had been done. I was surprised when he  
said that SR in terms of "simulated" threads (setjmp/longjmp, I  
guess) was more efficient.

I don't know if the Mach implementation is available or where  
you might get it.

Cheers.
gene
-----------------------------------------------------------
gene m. stover      "Making the world safe from democracy."
Software Engineer                     CyberTiggyr Solutions
                             Internet: gene@CyberTiggyr.com
                                      NeXT Mail spoken here
                 For PGP public key, finger gene@netcom.com


Begin forwarded message:

Errors-To: cs.arizona.edu!info-sr-errors@netcomsv.netcom.com
To: info-sr@cs.arizona.edu
Subject: SR and pthreads
Date: Tue, 09 Aug 94 03:26:56 -0700
From: cs.ucdavis.edu!benson@netcomsv.netcom.com
X-Mts: smtp
Errors-To: cs.arizona.edu!info-sr-errors@netcomsv.netcom.com


Here are two SR implementation questions:

1.  Has anyone rewritten the the SR RTS using pthreads?

2.  Has anyone ported SR to Mach?  (by this I mean a rewrite of  
the
    SR RTS to use cthreads or kernel threads, not a port to a  
BSD
    single server)

I am interested in both these tasks and I don't want to  
duplicate
any work.  Even if someone hasn't completed either project I
would be interested in hearing about any efforts towards these  
ends.

In addition, if anyone has put some thought to these projects or
simply has some ideas I would appreciate any comments.

Thanks

Greg Benson
benson@cs.ucdavis.edu


From thomas@p01.htc.honeywell.com  Wed Aug 10 09:30:42 1994
Received: from smoke.htc.honeywell.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA08401; Wed, 10 Aug 1994 07:29:49 MST
From: "Vicraj Thomas 951-7470" <thomas@p01.htc.honeywell.com>
Message-Id: <9408101430.AA01937@smoke.htc.honeywell.com>
Received: by smoke.htc.honeywell.com; Wed, 10 Aug 94 09:30:43 CDT
Subject: Re: SR and pthreads
To: gangrene!CyberTiggyr.com!gene@netcom.com
Date: Wed, 10 Aug 1994 09:30:42 -0500 (CDT)
Cc: info-sr@cs.arizona.edu
In-Reply-To: <9408101247.AA08515@gangrene.> from "gene michael stover" at Aug 10, 94 05:47:57 am
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 1873      

gene michael stover writes
> 
> Dr Olssen lectured at California State University in Hayward  
> almost two years ago, and I asked him about SR on Mach in terms  
> of cthreads. He said this had been done. I was surprised when he  
> said that SR in terms of "simulated" threads (setjmp/longjmp, I  
> guess) was more efficient.
> 
A couple of years ago I ported SR to run on the x-kernel vers. 3.1, which had
kernel level threads.  My observations were similar: the Unix version that
used simultated threads performed better than the native-threads version in
most cases.  There were two reasons for this behaviour. 1) In the simulated
threads version a thread was preempted only when the rts deemed it safe.
Hence there was no need for concurrency control mechanisms such as locks on
data structures inside the rts. To make matters worse, lock operations in v3.1
of the x-kernel were extremely expensive because they involved kernel calls.
2) While it was possible to associate thread specific data with x-kernel
threads, retrieving this information was expensive, again because it involved
a kernel call.  This thread specific information was necessary to determine
which SR thread corresponded to an executing kernel thread.  The simulated
version does this by having the scheduler set the sr_curr_proc variable.

The x-kernel version performed much better than the Unix version in programs
the involved inter-vm communication.  This was no surprise and could be
attributed to the superior communication support provided by the x-kernel.

The port itself was relatively straight-forward and didn't involve much change
to the SR rts.

< Vic

-----
Vicraj Thomas                                        thomas@htc.honeywell.com
Senior Research Scientist                            +1 612 951 7470
Honeywell Technology Center, Minneapolis, MN 55418   +1 612 951 7438 (fax)

From scip3161@leonis.nus.sg  Mon Aug 22 12:06:03 1994
Received: from leonis.nus.sg by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA29911; Sun, 21 Aug 1994 21:06:07 MST
Received: (from scip3161@localhost) by leonis.nus.sg (8.6.9/8.6.9/CNS-3.5) id MAA15618 for info-sr@cs.arizona.edu; Mon, 22 Aug 1994 12:06:04 +0800
From: E Z A M <scip3161@leonis.nus.sg>
Message-Id: <199408220406.MAA15618@leonis.nus.sg>
Subject: priority setting
To: info-sr@cs.arizona.edu (arizona info_sr)
Date: Mon, 22 Aug 1994 12:06:03 +0800 (SST)
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 558       

There is a process in my program that does something like allocating
proccessors to tasks generated by some other parts of the program.  Is there
a way to make this allocation be done immediately?  Can I set a priority,
or anything that will cause the process to be run by the CPU immediately
whenever the situation arrises?
Thanks.

-- 
........................................................
Lai_Hong Cheong (E Z A M)
scip3161@leonis.nus.sg
Learn from the atom and particles about the way of life.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

From gmt@owl  Mon Aug 22 09:49:56 1994
Received: from owl.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA13108; Mon, 22 Aug 1994 09:49:58 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id JAA02918; Mon, 22 Aug 1994 09:49:56 -0700
Date: Mon, 22 Aug 1994 09:49:56 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199408221649.JAA02918@owl.CS.Arizona.EDU>
To: info-sr@cs.arizona.edu, scip3161@leonis.nus.sg
Subject: Re: priority setting
Content-Length: 530

Every process inherits the priority of its creator; the initial
resource of the main resource is created with a process of 0.
A process can change its own priority using setpriority(n).

If you want to run a process at a higher priority than yourself,
one way is this:
	raise your own priority
	create the new process (via send() or whatever)
	lower your priority back

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From Per-Arne.Wiberg@cca.hh.se  Tue Aug 30 16:50:01 1994
Received: from hh.se (garfield.hh.se) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA08272; Tue, 30 Aug 1994 07:49:36 MST
Received: from hamlet.hh.se by hh.se (5.65+bind 1.7+ida 1.4.2/HH-4-NS); Tue, 30 Aug 94 16:50:01 +0200 (MET)
Date: Tue, 30 Aug 94 16:50:01 +0200
From: Per-Arne Wiberg <Per-Arne.Wiberg@cca.hh.se>
Message-Id: <9408301450.AA08864@hh.se>
To: info-sr@cs.arizona.edu
Subject: sr exercises

Hi

I am running a cource in concurrent programming using SR (exelent language).
I wonder if I can get hold of solutions to the exercises in the SR languge
book?

Best regards 
Pelle Wiberg

From scip3161@leonis.nus.sg  Thu Sep  1 14:15:06 1994
Received: from leonis.nus.sg by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11098; Wed, 31 Aug 1994 23:15:28 MST
Received: (from scip3161@localhost) by leonis.nus.sg (8.6.9/8.6.9/CNS-3.5) id OAA02023 for info-sr@cs.arizona.edu; Thu, 1 Sep 1994 14:15:12 +0800
From: E Z A M <scip3161@leonis.nus.sg>
Message-Id: <199409010615.OAA02023@leonis.nus.sg>
Subject: event marker
To: info-sr@cs.arizona.edu (arizona info_sr)
Date: Thu, 1 Sep 1994 14:15:06 +0800 (SST)
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 556       


I have implemented a parallel algorithm using sr and it is running on a
Sun elc.  All along I am using write statements to output event markers
onto a file.  I would like to know are there any better methods?

Or should it be significantly much better if I were to send different
types of event markers to different files?

thanks
-- 
........................................................
Lai_Hong Cheong (E Z A M)
scip3161@leonis.nus.sg
Learn from the atom and particles about the way of life.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

From olsson@cs.ucdavis.edu  Thu Sep  1 04:30:58 1994
Received: from toadflax.cs.ucdavis.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA27614; Thu, 1 Sep 1994 04:31:00 MST
Received: from ivy.cs.ucdavis.edu by toadflax.cs.ucdavis.edu (4.1/UCD.CS.2.6)
	id AA19331; Thu, 1 Sep 94 04:30:58 PDT
Received: by ivy.cs.ucdavis.edu (5.65/UCD.CS.2.6)
	id AA02616; Thu, 1 Sep 1994 04:30:58 -0700
Date: Thu, 1 Sep 1994 04:30:58 -0700
From: olsson@cs.ucdavis.edu (Ron Olsson)
Message-Id: <9409011130.AA02616@ivy.cs.ucdavis.edu>
To: Per-Arne.Wiberg@cca.hh.se
Cc: info-sr@cs.arizona.edu
In-Reply-To: <9408301450.AA08864@hh.se> (message from Per-Arne Wiberg on Tue, 30 Aug 94 16:50:01 +0200)
Subject: sr exercises

   Date: Tue, 30 Aug 94 16:50:01 +0200
   From: Per-Arne Wiberg <Per-Arne.Wiberg@cca.hh.se>
   Errors-To: info-sr-errors@cs.arizona.edu

   I wonder if I can get hold of solutions to the exercises in the SR languge
   book?

Sorry, there is no solutions manual.

From owner-info-sr  Fri Sep  2 10:30:30 1994
Received: from owl.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA06864; Fri, 2 Sep 1994 10:30:32 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id KAA03526 for info-sr; Fri, 2 Sep 1994 10:30:30 -0700
Date: Fri, 2 Sep 1994 10:30:30 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199409021730.KAA03526@owl.CS.Arizona.EDU>
To: info-sr@owl
Subject: Re: event marker
Content-Length: 658

    From: E Z A M <scip3161@leonis.nus.sg>

    I have implemented a parallel algorithm using sr and it is running on a
    Sun elc.  All along I am using write statements to output event markers
    onto a file.  I would like to know are there any better methods?

    Or should it be significantly much better if I were to send different
    types of event markers to different files?

Your approach sounds reasonable to me.  I can't see any advantage to
splitting things among different files.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From owner-info-sr  Sun Sep  4 09:43:03 1994
Received: from owl.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA25355; Sun, 4 Sep 1994 09:43:12 MST
Received: from paloverde.cs.arizona.edu (paloverde.CS.Arizona.EDU [192.12.69.16]) by owl.CS.Arizona.EDU (8.6.9/8.6.6) with SMTP id JAA04720; Sun, 4 Sep 1994 09:43:04 -0700
Date: Sun, 4 Sep 1994 09:43:03 MST
From: "Greg Andrews" <greg@owl>
Message-Id: <199409041643.AA26127@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Sun, 4 Sep 1994 09:43:03 MST
To: gmt@owl, info-sr@owl
Subject: Re: event marker

I'd add that if what you really want is internal event tracing,
then see the man page for srtrace.

-- Greg Andrews

From warren@darien.cray.com  Tue Sep  6 09:14:27 1994
Received: from timbuk.cray.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA21331; Tue, 6 Sep 1994 06:14:36 MST
Received: from darien.cray.com (warren@darien.cray.com [128.162.41.1]) by timbuk.cray.com (8.6.9/8.6.9L) with SMTP id IAA02008 for <info-sr@cs.arizona.edu>; Tue, 6 Sep 1994 08:14:30 -0500
Received: by darien.cray.com (4.1/CRI-5.13)
	id AA17874; Tue, 6 Sep 94 09:14:27 EDT
Date: Tue, 6 Sep 94 09:14:27 EDT
From: warren@darien.cray.com (Warren Carranza)
Message-Id: <9409061314.AA17874@darien.cray.com>
To: info-sr@cs.arizona.edu
Subject: group removal


Please remove me from the sr group.

thank-you


From grabow@venus.baylor.edu  Tue Sep  6 13:19:46 1994
Received: from baylor.edu (buvax2.baylor.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA16773; Tue, 6 Sep 1994 11:34:30 MST
Received: from venus (venus.baylor.edu) by baylor.edu (PMDF V4.3-7 #5363)
 id <01HGSL2WW47K987VSZ@baylor.edu>; Tue, 6 Sep 1994 13:33:46 CDT
Received: by venus (4.1/SMI-4.1) id AA02800; Tue, 6 Sep 94 13:19:46 CDT
Date: Tue, 06 Sep 1994 13:19:46 -0500 (CDT)
From: grabow@venus.baylor.edu (Paul Grabow)
Subject: group removal
To: info-sr@cs.arizona.edu
Message-Id: <9409061819.AA02800@venus>
Content-Transfer-Encoding: 7BIT

Please remove me from the sr group. Thanks.

From jerijian@hurricane.seas.ucla.edu  Tue Sep  6 15:31:30 1994
Received: from hurricane.seas.ucla.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA03902; Tue, 6 Sep 1994 15:31:34 MST
Received: by hurricane.seas.ucla.edu (5.65/1.37(UCLA esa 1.005))
	id AA07076; Tue, 6 Sep 94 15:31:30 -0700
From: jerijian@hurricane.seas.ucla.edu
Message-Id: <9409062231.AA07076@hurricane.seas.ucla.edu>
Subject: UNSUBSCRIBE
To: info-sr@cs.arizona.edu
Date: Tue, 6 Sep 1994 15:31:30 -0800 (PDT)
Cc: info-sr-request@cs.arizona.edu
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 12        

UNSUBSCRIBE

From cl@GOEDEL.UNI-MUENSTER.DE  Thu Sep  8 09:24:54 1994
Received: from math.uni-muenster.de (GOEDEL.UNI-MUENSTER.DE) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA26407; Thu, 8 Sep 1994 00:25:13 MST
Received: from zenon.uni-muenster.de by math.uni-muenster.de (4.1/SMI-4.1/smah-bp-1.37)
	id AA03763; Thu, 8 Sep 94 09:24:54 +0200
Organization: Westfaelische Wilhelms-Universitaet, Muenster, Germany
              Department of Mathematics
Date: Thu, 8 Sep 94 09:24:54 +0200
From: Achim Clausing <cl@GOEDEL.UNI-MUENSTER.DE>
Message-Id: <9409080724.AA03763@math.uni-muenster.de>
To: info-sr@cs.arizona.edu
Subject: UNSUBSCRIBE

UNSUBSCRIBE

From CR05427@academia.swt.edu  Thu Sep  8 14:51:33 1994
Received: from nyssa.swt.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA07104; Thu, 8 Sep 1994 12:51:37 MST
Received: from academia.swt.edu by academia.swt.edu (PMDF V4.3-7 #6249)
 id <01HGVGD9JX0WCA041D@academia.swt.edu>; Thu, 8 Sep 1994 14:51:33 CDT
Date: Thu, 08 Sep 1994 14:51:33 -0500 (CDT)
From: Rufus <CR05427@academia.swt.edu>
Subject: unsubscribe
To: info-sr@cs.arizona.edu
Message-Id: <01HGVGD9JYWYCA041D@academia.swt.edu>
Organization: Southwest Texas State University
X-Vms-To: IN%"info-sr@cs.arizona.edu"
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Transfer-Encoding: 7BIT

unsubscribe


From cliff  Thu Sep  8 13:25:05 1994
Received: from cheltenham.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA09924; Thu, 8 Sep 1994 13:25:06 MST
Date: Thu, 8 Sep 1994 13:25:05 MST
From: "Cliff Hathaway" <cliff>
Message-Id: <199409082025.AA26668@cheltenham.cs.arizona.edu>
Received: by cheltenham.cs.arizona.edu; Thu, 8 Sep 1994 13:25:05 MST
To: info-sr
Subject: please use "info-sr-request@cs.arizona.edu" for administrative matters

Requests to subscribe or unsubscribe, and change of address messages
should be sent to info-sr-request@cs.arizona.edu, rather than
info-sr@cs.arizona.edu.


Thanks.


    Cliff Hathaway
    Dept. of Computer Science (602)621-4291
    University of Arizona     cliff@cs.arizona.edu 	        (internet) 
    Tucson, Ariz. 85721	      {cmcl2,noao,uunet}!arizona!cliff	(uucp)



From pheras@bizcoyo.uc3m.es  Fri Sep  9 13:56:28 1994
Received: from bizcoyo.uc3m.es by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA16077; Fri, 9 Sep 1994 09:21:18 MST
Message-Id: <m0qj6RJ-00009LC@bizcoyo.uc3m.es>
From: pheras@bizcoyo.uc3m.es (Pedro de las Heras)
Subject: SR on WWW
To: info-sr@cs.arizona.edu
Date: Fri, 9 Sep 1994 13:56:28 +0000 ()
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 653       

Hello.


What about organizing the mail-list with hypermail in the SR pages on the WWW? 
Hypermail provides access to mail archives, being it possible to search for a 
topic, date, person,... It presents the information in a tree where answers
to previous mails appear nested,...

Info on hypermail can be found in http://www.eit.com

-- 
Pedro de las Heras Quiros	

Internet:  pheras@bizcoyo.uc3m.es    //   snail-mail:
           pheras@tornasol.uc3m.es   //      Universidad Carlos III
Voice: +34-1-624 94 97               //      C/ Butarque 15. E-28911
Fax: +34-1-624 94 30                 //      Leganes SPAIN
WWW: http://www.uc3m.es/~pheras/   

From pheras@bizcoyo.uc3m.es  Fri Sep  9 13:57:53 1994
Received: from bizcoyo.uc3m.es by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA16112; Fri, 9 Sep 1994 09:22:42 MST
Message-Id: <m0qj6Sf-00009LC@bizcoyo.uc3m.es>
From: pheras@bizcoyo.uc3m.es (Pedro de las Heras)
Subject: XTANGO
To: info-sr@cs.arizona.edu
Date: Fri, 9 Sep 1994 13:57:53 +0000 ()
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 469       

Hello.

Some time ago there were an announcement of XTango, and the development
of a library written-accessible from SR.

Any news about this topic?


-- 
Pedro de las Heras Quiros	

Internet:  pheras@bizcoyo.uc3m.es    //   snail-mail:
           pheras@tornasol.uc3m.es   //      Universidad Carlos III
Voice: +34-1-624 94 97               //      C/ Butarque 15. E-28911
Fax: +34-1-624 94 30                 //      Leganes SPAIN
WWW: http://www.uc3m.es/~pheras/   

From shartley@king.mcs.drexel.edu  Fri Sep  9 13:21:28 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA20388; Fri, 9 Sep 1994 10:20:31 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA11209; Fri, 9 Sep 94 13:21:28 EDT
Date: Fri, 9 Sep 94 13:21:28 EDT
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9409091721.AA11209@mcs.drexel.edu>
To: pheras@bizcoyo.uc3m.es
Subject: Re:  XTANGO
Cc: info-sr@cs.arizona.edu

  I have sent the files to the SR people at Arizona for inclusion in a
future release.

>From: pheras@bizcoyo.uc3m.es (Pedro de las Heras)
>Subject: XTANGO
>Date: Fri, 9 Sep 1994 13:57:53 +0000 ()
>
>Some time ago there were an announcement of XTango, and the development
>of a library written-accessible from SR.
>
>Any news about this topic?

From owner-info-sr  Fri Sep  9 10:59:40 1994
Received: from owl.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA23097; Fri, 9 Sep 1994 10:59:41 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id KAA10820 for info-sr; Fri, 9 Sep 1994 10:59:40 -0700
Date: Fri, 9 Sep 1994 10:59:40 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199409091759.KAA10820@owl.CS.Arizona.EDU>
To: info-sr@owl
Subject: Re: XTANGO
Content-Length: 273

The XTANGO interface will be included in the next version of SR.
I expect that to be ready sometime in October.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From owner-info-sr  Fri Sep  9 11:04:09 1994
Received: from owl.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA23727; Fri, 9 Sep 1994 11:04:11 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id LAA10833 for info-sr; Fri, 9 Sep 1994 11:04:09 -0700
Date: Fri, 9 Sep 1994 11:04:09 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199409091804.LAA10833@owl.CS.Arizona.EDU>
To: info-sr@owl
Subject: Re: SR on WWW
Content-Length: 341

Hypermail looks interesting, and we'll keep it in mind;  but we have
a lot of other things going on right now, so I don't think we'll be
doing anything with it in the near future.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From gwpatter@king.mcs.drexel.edu  Sat Sep 24 09:56:07 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA12336; Sat, 24 Sep 1994 06:55:08 MST
Received: from queen.mcs.drexel.edu by mcs.drexel.edu (4.1/SMI-4.0)
	id AA06392; Sat, 24 Sep 94 09:56:07 EDT
Date: Sat, 24 Sep 94 09:56:07 EDT
From: gwpatter@king.mcs.drexel.edu (William R. Patterson)
Message-Id: <9409241356.AA06392@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: Linux

I would be interested in hearing from anyone who has successfully 
implemented SR on Linux.  My installation is proceeding more 
slowly than I would like.  I have been able to successfully install
SR on a Sun account, but when the same methods are applied to
Linux problems result:

make
cc -g     -c util.c -o util.o
In file included from util.c:4:
/usr/include/sys/types.h:4: linux/types.h: No such file or directory

...

make: *** [util.o] Error 1


and it ends there.  There is paobably something obvious here to a Linux pro 
that I am missing, but even after applying the patches in linux.patch, 
I am still unable to come up with an answer to this.

I would be glad to provide further information by email or generally to
the broadcast address if others could benefit.

Thanks in advance for any help!

--Bill Patterson
gwpatter@mcs.drexel.edu

From hennus@sky.ow.org  Sun Sep 25 03:00:35 1994
Received: from eleet.mimuw.edu.pl by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA21757; Sun, 25 Sep 1994 21:54:14 MST
Received: by eleet.mimuw.edu.pl (8.6.9/8.6.9) with ESMTP id FAA01312; Mon, 26 Sep 1994 05:52:10 +0100
Received: by mail.OW.org (8.6.9/8.6.9) with UUCP id FAA11155; Mon, 26 Sep 1994 05:43:15 +0100
Received: from sky.ow.org by sun4ow.ow.org (8.6.9/8.6.9) with UUCP
	id DAA20133; Mon, 26 Sep 1994 03:13:23 GMT
Received: by sky.ow.org (Linux Smail3.1.28.1 #2)
	id m0qoitH-000vniC; Sun, 25 Sep 94 03:00 MET
Message-Id: <m0qoitH-000vniC@sky.ow.org>
From: hennus@sky.ow.org (Hennus Bergman)
Subject: Re: Linux
To: gwpatter@king.mcs.drexel.edu (William R. Patterson)
Date: Sun, 25 Sep 1994 03:00:35 +0100 (MET)
Cc: info-sr@cs.arizona.edu
In-Reply-To: <9409241356.AA06392@mcs.drexel.edu> from "William R. Patterson" at Sep 24, 94 09:56:07 am
X-Mailer: ELM [version 2.4 PL22]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 1621      

> I would be interested in hearing from anyone who has successfully 
> implemented SR on Linux.  My installation is proceeding more 
> slowly than I would like.  I have been able to successfully install
> SR on a Sun account, but when the same methods are applied to
> Linux problems result:

> make
> cc -g     -c util.c -o util.o
> In file included from util.c:4:
> /usr/include/sys/types.h:4: linux/types.h: No such file or directory

> ...

> make: *** [util.o] Error 1

> and it ends there.  There is paobably something obvious here to a Linux pro 
> that I am missing, but even after applying the patches in linux.patch, 
> I am still unable to come up with an answer to this.

Looks like the compiler can't find the kernel include files.

/usr/include/sys/types.h includes the types.h file from the Linux
kernel sources, which are normally located in /usr/src/linux.
/usr/include/linux usually is a symlink to the /usr/src/linux/include/linux
directory where the kernel include file types.h lives.

So, you need to un-tar the linux kernel sources in /usr/src, or create
the symlink /usr/include/linux to point to your kernel include files.
You don't really need to have the entire kernel sources online, just the
/usr/src/linux/include part should be sufficient.

BTW, there should also be a /usr/include/asm symlink to /usr/src/linux/include/asm.

If you want smaller binaries, remove the -g (debugging) option.

> --Bill Patterson
> gwpatter@mcs.drexel.edu

Hennus

-- 
Hennus Bergman <hennus@sky.ow.org> [my Linux box, UUCP-connected (slow)]
   PGP fingerprint: 76 99 FD 31 91 E1 96 1C  90 BB 22 80 62 F6 BD 63

From chris@chaos.aerojet.com  Mon Sep 26 09:45:27 1994
Message-Id: <199409261643.AA09880@optima.cs.arizona.edu>
Received: from chaos.aerojet.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA09880; Mon, 26 Sep 1994 09:43:25 MST
Subject: Documentation on SR RTS
To: info-sr@cs.arizona.edu
Date: Mon, 26 Sep 1994 09:45:27 -0700 (PDT)
From: Christopher Arndt-Kohlway <chris@chaos.aerojet.com>
X-Mailer: ELM [version 2.4 PL21]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 799

Hello -
  I am trying to develop a thorough understanding of the SR runtime 
system for a project I am working on.  Does anyone have or know of
the existence of any detailed documentation on the RTS.  I'm looking
for something a bit more detailed than that in the appendix of the
book "The SR Programming Language".  Any help would be greatly
appreciated.  Thank you.
                                             - Chris
-- 
===============================================================================
Christopher Arndt-Kohlway                      E-Mail: chris@aerojet.com 
Aerojet, Sacramento Plant                      Phone : (916) 355-5634
Sacramento, California (US)                    Fax   : (916) 355-6635
===============================================================================

From greg  Mon Sep 26 09:58:04 1994
Received: from paloverde.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11268; Mon, 26 Sep 1994 09:58:08 MST
Date: Mon, 26 Sep 1994 09:58:04 MST
From: "Greg Andrews" <greg>
Message-Id: <199409261658.AA26083@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Mon, 26 Sep 1994 09:58:04 MST
To: chris@chaos.aerojet.com
Subject: Re:  Documentation on SR RTS
Cc: info-sr@cs.arizona.edu

    Subject: Documentation on SR RTS
    To: info-sr@cs.arizona.edu
    Date: Mon, 26 Sep 1994 09:45:27 -0700 (PDT)
    From: Christopher Arndt-Kohlway <chris@chaos.aerojet.com>

    Hello -
      I am trying to develop a thorough understanding of the SR runtime 
    system for a project I am working on.  Does anyone have or know of
    the existence of any detailed documentation on the RTS.  I'm looking
    for something a bit more detailed than that in the appendix of the
    book "The SR Programming Language".  Any help would be greatly
    appreciated.  Thank you.
                                                 - Chris
    -- 

    Christopher Arndt-Kohlway                      E-Mail: chris@aerojet.com 
    Aerojet, Sacramento Plant                      Phone : (916) 355-5634
    Sacramento, California (US)                    Fax   : (916) 355-6635

Have you looked at The SR Run-Time System Interface, which is part
of the standard distribution?  It contains quite a few details,
although not to the level of a "walkthrough".  The files are runtime.ms
(in "doc") and runtime.ps (in "ps").

-- Greg Andrews

From renganag@next2.msci.memst.edu  Mon Sep 26 21:39:55 1994
Received: from next2 (next2.msci.memst.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA22727; Mon, 26 Sep 1994 19:44:11 MST
Received: by next2 id AA11220
  (5.65c/IDA-1.4.4 for info-sr@cs.arizona.edu); Mon, 26 Sep 1994 21:44:08 -0500
Date: Mon, 26 Sep 1994 21:39:55 -0500 (CDT)
From: Gopal Renganathan <renganag@next1.msci.memst.edu>
Subject: Problems Compiling SR
To: info-sr@cs.arizona.edu
Message-Id: <Pine.3.05.9409262155.A11212-a100000@next2>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello:
	I have implemented SR in a SUN machine in the /usr/local/src/sr/bin
directory and included that path in my .profile. When I try to compile
even simple SR programs it gives me the message

	sr: no resource bodies; linking supressed.

Is there something I am doing wrong here or am I missing some files. 
Please help me.

================================================================================

Gopal Renganathan                        PH # : (off) : (901)-325-6014
Dept of Computer Sciences                       (res) : (901)-454-7760
Memphis State University
Memphis, TN - 38111   

================================================================================



From shartley@king.mcs.drexel.edu  Tue Sep 27 11:34:42 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA01356; Tue, 27 Sep 1994 08:33:45 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA20910; Tue, 27 Sep 94 11:34:42 EDT
Date: Tue, 27 Sep 94 11:34:42 EDT
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9409271534.AA20910@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: new OS book using SR

In a few months, Oxford University Press will publish my book
"Operating Systems Programming: The SR Programming Language"

Steve Hartley
Drexel University
shartley@mcs.drexel.edu

Here is the Preface:

  SR is a language for concurrent programming.  This book describes the SR
language, presents some examples of SR programs in the context of an operating
systems or concurrent programming course, and provides some programming as-
signments in the form of open Student Laboratories.  The SR language can be
used by instructors of concurrent programming or operating systems courses to
give students experience in writing concurrent programs that use multiple
processes, semaphores, monitors, message passing, remote procedure calls, and
the rendezvous.  The language can also be used for parallel computing in a
shared-memory multiprocessor or a distributed memory cluster environment.
  The intended audience is undergraduate and graduate students enrolled in
concurrent programming and operating systems classes.  Prerequisites for stu-
dents are knowledge of a high-level programming language like C or Pascal and
operating systems concepts.  See the Instructor's Manual for more detailed
prerequisites.  This book is designed to be used during an operating systems
course in conjunction with one of the standard texts to provide concurrent
programming experience.  The book can also be used in a full semester follow-
on course to operating systems to provide more extensive programming experi-
ence.  Since most concepts and terms are defined, the book can be used as the
sole text in an introductory concurrent programming course that precedes the
operating systems course.
  The required computing environment is a UNIX platform such as a Sun 3, Sun
4, Sequent Symmetry, DECstation, SGI Iris, NeXT, HP RISC, or PC compatible
running Linux.
  The SR examples and programming assignments in this book have been used suc-
cessfully in undergraduate concurrent programming and operating systems
courses at Drexel University, Philadelphia, Pennsylvania, and Trinity Univer-
sity, San Antonio, Texas.  The book arose out of a collection of handouts and
class notes distributed to students during 1991-94 and is a greatly expanded
version of [some earlier journal papers].
  This book has several important features.
    * The material is keyed to four standard operating systems texts: Deitel,
Silberschatz and Galvin, Stallings, and Tanenbaum.  The relevant sections of
these texts for the major concepts, such as semaphores and monitors, is indi-
cated.
    * Each of the numerous example programs in this book includes output from
one or two sample runs to show how the program works.
    * Algorithm animation using the animator interpreter from the XTANGO sys-
tem is described and used in several of the examples.
    * Numerous programming assignments in the form of open Student Labora-
tories are given.
  The example programs in this book will be made available by anonymous ftp at
site mcs.drexel.edu.  Contact the author for further details.

Here is the TOC:

Operating Systems Programming
   Hardware Basics
      Hardware and Software Interrupts
      Hardware Protection
      CPU Scheduling
The SR Programming Language
   Sequential Features
   Additional Sequential Examples and Features
   Lab: Sequential SR
   Multiple Resources
   Lab: Resources and Capabilities
   Additional Features
   Animating Programs with XTANGO
   Lab: XTANGO Animation
Concurrent Programming
   Multiple Processes in One Resource
   Multiple Processes in Multiple Resources
   Simulated versus Real Concurrency
   Debugging Techniques
   Race Conditions and Process Synchronization
   Lab: Race Conditions
   Architecture and Shared Memory Systems
   The Mutual Exclusion Problem
Semaphores
   SR Semaphores
   Classical Operating Systems Problems
   Semaphore Solutions
      The Producers and Consumers
      The Sleeping Barber
      The Dining Philosophers
      The Readers and Writers
   Binary Semaphores
   Lab: Semaphores
      Assignment: Fix Race Condition
      Assignment: Multiple Producers and Consumers
      Assignment: Another Classical Problem
      Assignment: Multiple Sleeping Barbers
      Assignment: Dining Philosophers
      Assignment: Fair Readers and Writers
      Assignment: Baboons Crossing a Canyon
      Assignment: Fraternity Party
      Assignment: Jurassic Park
   Animating Operating Systems Algorithms
   Lab: Classical Problem Animation
Monitors
   Monitors and SR
      The Producers and Consumers
      The Dining Philosophers
      The Readers and Writers
   Implementing Monitors with Semaphores
   Lab: Monitors
      Assignment: Fair Baboons
      Assignment: Sleeping Barber
      Assignment: Fair Dining Philosophers
      Assignment: Fraternity Party
      Assignment: Bakery
Message Passing and the Rendezvous
   Message Passing
   Message Passing in SR
      Concurrent Programs and Message Passing
      Distributed Mutual Exclusion
      Miscellaneous Examples
   Lab: Message Passing
      Assignment: Merge Sort
      Assignment: Pipeline Sieve of Eratosthenes
      Assignment: Compare/Exchange Sort
      Assignment: Speedup
      Assignment: Algorithm Animation
   Rendezvous
      Classical Problems Using Rendezvous
      Nested in Statements
      A Lock Resource
      The Distributed Dining Philosophers
   RPC and Client-Server Programming
   Summary of Operations and Invocations
   Lab: Rendezvous
      Assignment: Fair Baboons
      Assignment: Sleeping Barber
      Assignment: Fair Readers and Writers
      Assignment: Fair Dining Philosophers
      Assignment: Fraternity Party
      Assignment: Bakery
      Assignment: Banker's Algorithm
   More Animation with XTANGO
   Lab: Algorithm Animation
Parallel Computing
   Coarse-Grained Concurrency in SR
   Patterns of Communication
   Data Parallelism
      Shared Memory Examples
      Message Passing Examples
   Integrating Animator into SR
   Lab: Parallel Computing
      Assignment: Speedup
      Assignment: Race Condition
      Assignment: No Race Condition
Instructor's Manual
   Sample Lab Solutions
      Semaphores
      Monitors
      Message Passing
      Rendezvous
      Parallel Computing


From @exeter.ac.uk:steve@dcs.exeter.ac.uk  Mon Oct  3 18:47:37 1994
Received: from sun2.nsfnet-relay.ac.uk by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA27488; Tue, 4 Oct 1994 03:00:50 MST
Via: uk.ac.exeter; Mon, 3 Oct 1994 18:50:01 +0100
Received: from atlas.exeter.ac.uk by exub.exeter.ac.uk with SMTP (PP) 
          id <10967-0@exub.exeter.ac.uk>; Mon, 3 Oct 1994 18:50:27 +0100
Received: from sirius.dcs.exeter.ac.uk by atlas.dcs.exeter.ac.uk;
          Mon, 3 Oct 94 18:50:23 BST
From: steve@atlas.ex.ac.uk
Date: Mon, 3 Oct 94 18:47:37 +0100
Message-Id: <28199.9410031747@sirius.dcs.exeter.ac.uk>
To: gmt@cs.arizona.edu
Cc: info-sr@cs.arizona.edu
Subject: SR on SGI under IRIX 5.2


We have been using SR on our SGIs for over two years.
However, we have recently upgraded our operating system
to IRIX 5.2

When I came to rebuild SR, I found I could not link the
context switching code:

        cd csw;         make  CC="cc" CFLAGS="-g  "
        cc -g   -c cstest.c
        cc -g   -E asm.c | sed -e '/^ *$/d' -e '/^#/'d >asm.s
        as -o asm.o asm.s
        . ../paths.sh; cc -g   -o cstest \
                cstest.o asm.o $LIBM $LIBC
ld:
Object file format error in: asm.o: non-shared Elf object "asm.o" cannot be linked shared.
*** Error code 1 (bu21)

As a temporary fix, we can setenv SGI_IRIX4 1
and use the old IRIX 4 libraries, but I wondered
if anyone had successfully build SR under IRIX 5.2

Steve

-------------------------------------------------------------------------------
Parallel Systems Research Laboratory	|  Stephen Turner
Email:  steve@dcs.exeter.ac.uk   	|  Department of Computer Science
WWW:	http://www.dcs.exeter.ac.uk	|  University of Exeter
Fax:    +44 392 264067			|  Prince of Wales Road
Tel:    +44 392 264048			|  Exeter EX4 4PT England
-------------------------------------------------------------------------------


From MOORE_KEITH@Tandem.COM  Tue Oct  4 06:19:00 1994
Received: from comm.Tandem.COM (comm.cpd.tandem.com) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA05827; Tue, 4 Oct 1994 06:21:40 MST
Received: by comm.Tandem.COM (4.12/4.5)
        id AA29497; 4 Oct 94 06:21:14 -0700
Date: 4 Oct 94 06:19:00 -0700
From: MOORE_KEITH@tandem.com
Message-Id: <199410040621.AA29497@comm.Tandem.COM>
To: steve@atlas.ex.ac.uk
Cc: info-sr@cs.arizona.edu
Subject: RE:SR on SGI under IRIX 5.2

Steve,
  I'm having the same problem, but I'm new to Unix, so I wasn't so
sure what it was.  I tried re-installing everything -- compilers,
linkers, and the SR source.  I think I got through the sr install
the other day, but I haven't yet done anything to test it yet. I'm
still at the very bottom of an extremely steep learning curve. Please
let me know what you hear. Thanks in advance.  - Keith

------------   ORIGINAL ATTACHMENT   --------
SENT 10-04-94 FROM SMTPGATE (steve@atlas.ex.ac.uk)


We have been using SR on our SGIs for over two years.
However, we have recently upgraded our operating system
to IRIX 5.2

When I came to rebuild SR, I found I could not link the
context switching code:

        cd csw;         make  CC="cc" CFLAGS="-g  "
        cc -g   -c cstest.c
        cc -g   -E asm.c | sed -e '/^ *$/d' -e '/^#/'d >asm.s
        as -o asm.o asm.s
        . ../paths.sh; cc -g   -o cstest \
                cstest.o asm.o $LIBM $LIBC
ld:
Object file format error in: asm.o: non-shared Elf object "asm.o" cannot be linked shared.
*** Error code 1 (bu21)

As a temporary fix, we can setenv SGI_IRIX4 1
and use the old IRIX 4 libraries, but I wondered
if anyone had successfully build SR under IRIX 5.2

Steve

-------------------------------------------------------------------------------
Parallel Systems Research Laboratory    |  Stephen Turner
Email:  steve@dcs.exeter.ac.uk          |  Department of Computer Science
WWW:    http://www.dcs.exeter.ac.uk     |  University of Exeter
Fax:    +44 392 264067                  |  Prince of Wales Road
Tel:    +44 392 264048                  |  Exeter EX4 4PT England
-------------------------------------------------------------------------------


------------   TEXT ATTACHMENT   --------
SENT 10-04-94 FROM MOORE_KEITH @DETROIT

 _________________________________________________________________________
/                                                                         \
| Keith Moore (M. Keith Moore)                                            |
| Advisory Analyst                       Guardian: moore_keith            |
| Tandem Computers, Inc.                 Internet: moore_keith@tandem.com |
| 19500 Victor Pkwy.  #400                                                |
| Livonia, Michigan 48152-1061  U.S.A.   Phone: (313) 953-2422 or 8800    |
|                                                                         |
| Opinions expressed here are my own.                                     |
\_________________________________________________________________________/

From owner-info-sr  Tue Oct  4 07:41:43 1994
Received: from owl.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA09254; Tue, 4 Oct 1994 07:41:46 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id HAA15891; Tue, 4 Oct 1994 07:41:43 -0700
Date: Tue, 4 Oct 1994 07:41:43 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199410041441.HAA15891@owl.CS.Arizona.EDU>
To: steve@atlas.ex.ac.uk
Cc: info-sr@owl
Subject: Re: SR on SGI under IRIX 5.2
Content-Length: 1244

    From steve@dcs.exeter.ac.uk Tue Oct  4 03:01 MST 1994
    
	as -o asm.o asm.s
	    ...
	asm.o: non-shared Elf object "asm.o" cannot be linked shared.
    
I don't know how to explain that particular error.  Is it possible
somehow that /bin/as didn't get updated with 5.2?  

The mips.s file *does* require a fix for Irix 5.2, though; I've included
that patch below.

SR version 2.3 will be released this month if you'd rather just
wait for that.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

-----------------------------------------------------------------------------

diff -c old/csw/mips.s new/csw/mips.s
*** old/csw/mips.s	Thu May 14 15:12:10 1992
--- new/csw/mips.s	Mon Sep 12 17:58:22 1994
***************
*** 64,70 ****
  	move	$6,$18
  	move	$7,$19
  	la	$31,under	/* detect underflow if called code returns */
! 	j	$20		/* jump to entry point */
  	.end	sr_build_context
  
  
--- 64,71 ----
  	move	$6,$18
  	move	$7,$19
  	la	$31,under	/* detect underflow if called code returns */
! 	move	$25,$20		/* MIPS ABI requires $25 for indirect call */
! 	j	$25		/* jump to entry point */
  	.end	sr_build_context
  
  

From owner-info-sr  Mon Oct 10 08:46:22 1994
Received: from owl.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA04695; Mon, 10 Oct 1994 08:46:25 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id IAA06231 for info-sr; Mon, 10 Oct 1994 08:46:22 -0700
Date: Mon, 10 Oct 1994 08:46:22 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199410101546.IAA06231@owl.CS.Arizona.EDU>
To: info-sr@owl
Subject: further Linux help
Content-Length: 1053

From gwpatter@king.mcs.drexel.edu Sat Oct  8 19:33:04 1994
Date: Sat, 8 Oct 94 22:33:59 EDT
From: gwpatter@king.mcs.drexel.edu (William R. Patterson)
Subject: further linux help

Some very nice and helpful people have responded to my previous
message requesting help in porting SR to Linux.  I have set up one
symbolic link that appears to have been helpful, and I have doctored
up the util.c file to provide additional references.  But... alas, 
while the effort has gone farther than it did before, the result is still
that I am getting numerous undefined conditions.  

Does anyone have a clear and concise set of symlinks or whatever other
things are needed for a successful port to Linux?  So far the portation
has been piecemeal, and I am hoping some good soul can provide me with
a silver bullet or a quick fix, or, if not, some comiseration.

Is there a particular directory onto which SR should be placed?  I have
been trying to place it on /home/sr, is this OK?

Any and all ideas are welcome, and I thank you.

--Bill
gwpatter@mcs.drexel.edu

From tage@cs.uit.no  Tue Oct 11 05:32:01 1994
Received: from hpserv0.cs.UiT.No by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA16486; Tue, 11 Oct 1994 05:32:01 MST
Received: from dslab2.cs.uit.no by hpserv0.cs.uit.no (1.37.109.11/Task/HJ-5)
	id AA052018718; Tue, 11 Oct 1994 13:31:58 +0100
Received: from localhost by dslab2.cs.uit.no (1.37.109.9/HJ/Task-5)
	id AA0466434237; Tue, 11 Oct 1994 13:31:57 +0100
Message-Id: <199410111231.AA0466434237@dslab2.cs.uit.no>
To: info-sr@cs.arizona.edu
Subject: Passing rec (struct) with String (back) from C to SR
Date: Tue, 11 Oct 94 13:31:57 MET
From: Tage Stabell-Kulo <tage@cs.uit.no>


   I'm trying to pass a rec from an external routine in C back into SR.
   In SR I have
      type to_c = rec( x : int; c : char)
      type from_c = rec( x : int; s: string[10]; y : int; z : int)
      external pasing_test(i :to_c) returns x : ptr from_c

   and in C I write:
      struct from_sr {
        int x;
        char c;
      }
      struct to_sr {
        int x;
        String s;
        int y;
        int z;
      }
   But in /usr/local/lib/sr/sr.h, the char* is commented out from the
   struct String, and the Interfaces/main.c represent the struct from_c as
      typedef struct {
        Int x;
        String c[3];
        Int y;
        Int z;
      } rs2;

   How do I declare the struct from_sr, and how do I fill it in so that I
   can access the string within SR ?

//// Tage Stabell-Kuloe                | e-mail: tage@cs.uit.no        ////
/// Department of Computer Science/IMR | Finger: tage@tage.cs.uit.no   ///
// 9037  University of Tromsoe, Norway | Phone : +47-776-44032         //
/       "'oe' is '\o' in TeX"          | Fax   : +47-776-44580         /

From owner-info-sr  Tue Oct 11 11:43:24 1994
Received: from owl.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA10257; Tue, 11 Oct 1994 11:43:28 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id LAA07704; Tue, 11 Oct 1994 11:43:24 -0700
Date: Tue, 11 Oct 1994 11:43:24 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199410111843.LAA07704@owl.CS.Arizona.EDU>
To: tage@cs.uit.no
Cc: info-sr@owl
Subject: Re: Passing rec (struct) with String (back) from C to SR
Content-Length: 931

[re: question about passing a particular struct back from C to SR]

The declaration   String c[3]  generated by SR allocates space for
a string header followed by space to hold the string data.  The [3]
varies depending on the declared maxlength of the string.  An equivalent
declaration in C would be
    typedef struct {
      int x;
      String cheader;				/* header = c[0] */
      unsigned char cdata[2*sizeof(String)];	/* data = c[1],c[2] */
      int y;
      int z;
    } rs2;

To set up the string for return into SR, put the string data in the
"cdata" field above.  Set cheader.length to the number of characters
(which should be between 0 and 10 inclusive per the declaration in SR).
Also, set cheader.size to  10 + sizeof(String) + 1  to set the maxlength.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From smartt@ariel.msci.memst.edu  Thu Oct 13 17:14:30 1994
Received: from ariel (ariel.msci.memst.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA25268; Thu, 13 Oct 1994 15:14:32 MST
Received: by ariel id AA13871
  (5.65c/IDA-1.4.4 for info-sr@cs.arizona.edu); Thu, 13 Oct 1994 17:14:30 -0500
Date: Thu, 13 Oct 1994 17:14:30 -0500
From: Todd Smart <smartt@ariel.msci.memst.edu>
Message-Id: <199410132214.AA13871@ariel>
Received: by NeXT.Mailer (1.95)
Received: by NeXT Mailer (1.95)
To: info-sr@cs.arizona.edu
Subject: SR on AIX???
Cc: ordmanc@next1

SR developers/users:

I am trying to find out if there has been any effort made to implement SR on  
IBM's AIX environment.  If anyone has information on this matter please route  
it to:
	 smartt@next1.msci.memst.edu

Thanks for your time...

Todd Smart (The University of Memphis)

From gmt  Mon Oct 17 13:54:20 1994
Date: Mon, 17 Oct 1994 13:54:20 MST
From: "Gregg Townsend" <gmt>
Message-Id: <199410172054.AA17809@optima.cs.arizona.edu>
Received: by optima.cs.arizona.edu (5.65c/15)
	id AA17809; Mon, 17 Oct 1994 13:54:20 MST
To: info-sr
Subject: Announcing version 2.3 of SR

[ This is a special mailing that includes people who've shown a recent
  interest in SR.  If you're not on the Info-SR mailing list, you won't
  receive any further mail from this list. ]

Version 2.3 of the SR programming language is now available, superseding
version 2.2.1 of last December.  Version 2.3 can be obtained:
  -- by anonymous FTP from the /sr directory on ftp.cs.arizona.edu
  -- by electronic mail: for details, send a "help" message to
     ftpmail@cs.arizona.edu
  -- on tape, cartridge or diskette: write to the address below for details

SR (Synchronizing Resources) is a language for writing concurrent programs
and is documented in "The SR Programming Language: Concurrency in Practice",
by Gregory R. Andrews and Ronald A. Olsson (Benjamin/Cummings, 1993, ISBN
0-8053-0088-0).  An overview of version 1 of the language and implementation
appeared in the January, 1988, issue of ACM TOPLAS (10,1, 51-86).  SR runs
on Sun, DEC, HP, IBM, SGI, Linux, and other Unix platforms.

Version 2.3 improves array performance, adds support for the Intel Paragon
and the IBM RS/6000, and includes other improvements.  Details are given in
the Release Notes, which are available as a separate PostScript file in the
FTP area.

For more information, send a message to sr-project@cs.arizona.edu.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From marco@nextiac.iac.rm.cnr.it  Tue Oct 18 10:54:53 1994
Received: from vaxiac.iac.rm.cnr.it by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA10770; Tue, 18 Oct 1994 06:13:51 MST
Received: from nextiac.iac.rm.cnr.it by vaxiac.iac.rm.cnr.it with PMDF#10339;
 Tue, 18 Oct 1994 11:59 GMT
Received: by nextiac.iac.rm.cnr.it (NX5.67c/NX3.0S) id AA00867; Tue, 18 Oct 94
 10:54:53 +0200
Received: by NeXT.Mailer (1.87.1.RR)
Received: by NeXT Mailer (1.87.1.RR)
Date: Tue, 18 Oct 94 10:54:53 +0200
From: marco@nextiac.iac.rm.cnr.it
Subject: Re: Announcing version 2.3 of SR
To: Info-SR@cs.arizona.edu
Message-Id: <9410180854.AA00867@nextiac.iac.rm.cnr.it>

I subscribe this mail-list

bests
marco

From gwpatter@king.mcs.drexel.edu  Mon Oct 31 10:20:50 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA07682; Mon, 31 Oct 1994 08:19:57 MST
Received: from queen.mcs.drexel.edu by mcs.drexel.edu (4.1/SMI-4.0)
	id AA13410; Mon, 31 Oct 94 10:20:50 EST
Date: Mon, 31 Oct 94 10:20:50 EST
From: gwpatter@king.mcs.drexel.edu (William R. Patterson)
Message-Id: <9410311520.AA13410@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: Thanks\

Thanks to all who helped me.  I now have an implementation of
SR under Linux on both a Compaq notebook computer and on a desktop.
Your help is much appreciated.


--Bill

From gwpatter@king.mcs.drexel.edu  Mon Nov 14 10:16:22 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA21088; Mon, 14 Nov 1994 08:15:29 MST
Received: from queen.mcs.drexel.edu by mcs.drexel.edu (4.1/SMI-4.0)
	id AA14305; Mon, 14 Nov 94 10:16:22 EST
Date: Mon, 14 Nov 94 10:16:22 EST
From: gwpatter@king.mcs.drexel.edu (William R. Patterson)
Message-Id: <9411141516.AA14305@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: clock

Does anyone know a way to dissociate the age() and 
nap() functions from the real-time clock to enable
a simulation clock that is not closely coupled to 
real time?  Doing this would extend the utility of SR
as a simulation language, allowing it to examine 
processes that take a long time and doing the examination
in a short time, and allowing it to do computationally
intensive analysis of processes that take a short time.
It would free the computation from the constraint of
real time.

--Bill
gwpatter@mcs.drexel.edu

From @exeter.ac.uk:steve@dcs.exeter.ac.uk  Mon Nov 14 19:04:27 1994
Received: from sun2.nsfnet-relay.ac.uk by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA19130; Mon, 14 Nov 1994 14:50:21 MST
Via: uk.ac.exeter; Mon, 14 Nov 1994 19:04:41 +0000
Received: from atlas.exeter.ac.uk by exub.exeter.ac.uk with SMTP (PP) 
          id <14646-0@exub.exeter.ac.uk>; Mon, 14 Nov 1994 19:04:30 +0000
Received: from sirius.dcs.exeter.ac.uk by atlas.dcs.exeter.ac.uk;
          Mon, 14 Nov 94 19:04:26 GMT
From: steve@atlas.ex.ac.uk
Date: Mon, 14 Nov 94 19:04:27 GMT
Message-Id: <4150.9411141904@sirius.dcs.exeter.ac.uk>
To: gwpatter@king.mcs.drexel.edu
Cc: info-sr@cs.arizona.edu
In-Reply-To: William R. Patterson's message of Mon, 14 Nov 94 10:16:22 EST <9411141516.AA14305@mcs.drexel.edu>
Subject: clock


>>>>> On Mon, 14 Nov 94 10:16:22 EST, gwpatter@edu.drexel.mcs.king (William R. Patterson) said:

> Does anyone know a way to dissociate the age() and 
> nap() functions from the real-time clock to enable
> a simulation clock that is not closely coupled to 
> real time?  Doing this would extend the utility of SR
> as a simulation language, allowing it to examine 
> processes that take a long time and doing the examination
> in a short time, and allowing it to do computationally
> intensive analysis of processes that take a short time.
> It would free the computation from the constraint of
> real time.

What you seem to be asking for is a language for parallel 
discrete event simulation.  This leads to the principle of 
causality (the future cannot affect the past).  If a process'
time is dissociated from real-time, one process could get 
ahead of another and then there is the possibility of it 
receiving a message in its simulated past.

There are a number of approaches from parallel discrete event 
simulation that can be used to solve this problem such as the 
conservative approach (null messages) or optimistic (time warp).
One of my students implemented the conservative approach in SR
two years ago.

Another way of preserving causality is to have a central
scheduler.  Chapter 18 of the SR book shows how you can do 
discrete event simulation in SR in this way.  The scheduler
provides time() and delay() operations which are similar to
age() and nap() but use simulated rather than real-time.

Steve

-------------------------------------------------------------------------------
Parallel Systems Research Laboratory	|  Stephen Turner
Email:  steve@dcs.exeter.ac.uk   	|  Department of Computer Science
WWW:	http://www.dcs.exeter.ac.uk	|  University of Exeter
Fax:    +44 392 264067			|  Prince of Wales Road
Tel:    +44 392 264048			|  Exeter EX4 4PT England
-------------------------------------------------------------------------------


From dkarumur@eecs.uic.edu  Tue Nov 15 10:33:27 1994
Received: from mail.eecs.uic.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA13841; Tue, 15 Nov 1994 09:32:03 MST
Received: from bert.eecs.uic.edu (bert.eecs.uic.edu [128.248.166.23]) by mail.eecs.uic.edu (8.6.9/8.6.9) with ESMTP id KAA01646 for <info-sr@cs.arizona.edu>; Tue, 15 Nov 1994 10:33:06 -0600
Received: (dkarumur@localhost) by bert.eecs.uic.edu (8.6.9/8.6.9) id KAA15860; Tue, 15 Nov 1994 10:33:27 -0600
Date: Tue, 15 Nov 1994 10:33:27 -0600 (CST)
From: Dinkar Karumuri <dkarumur@eecs.uic.edu>
To: info-sr@cs.arizona.edu
Subject: UNSUBSCRIBE
Message-Id: <Pine.SUN.3.91.941115103258.15719B-100000@bert.eecs.uic.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Please unsubscribe me

--Dinkar


                                   |||||
                                   (o o)
 /-----------------------------OOOo-(_)-oOOO---------------------------------\
 | Dinkar Karumuri		      Phone: Res: (312)693-8120              |
 | 5461, N.East River Road, #909	     Off: (708)-531-1310 x 358	     |
 | Chicago. IL-60656			                                     | 
 |                                                                           |
 |                         E-Mail: dinkar@eecs.uic.edu                       |
 \------------------------------ooo0---0ooo----------------------------------/



From chris@chaos.aerojet.com  Thu Nov 17 15:43:55 1994
Received: from chaos.aerojet.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA17089; Thu, 17 Nov 1994 15:45:06 MST
Received: (from chris@localhost) by chaos.aerojet.com (8.6.9/8.6.9) id PAA26415 for info-sr@cs.arizona.edu; Thu, 17 Nov 1994 15:43:55 -0800
Message-Id: <199411172343.PAA26415@chaos.aerojet.com>
Subject: Questions about srtrace
To: info-sr@cs.arizona.edu
Date: Thu, 17 Nov 1994 15:43:55 -0800 (PST)
From: Christopher Arndt-Kohlway <chris@chaos.aerojet.com>
X-Mailer: ELM [version 2.4 PL21]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 1363      

I have a few questions about SR trace.  I am trying to profile SR by placing
some hooks in the SR RTS and I have come across some srtrace behavior that
I can't explain.  Using the program remote.sr in examples/other, I set up a
test which should output beginning and end statitics for each process.  My 
problem is that I do not see the ENDBODY trace for the main resource.  Looking
at the intermediate code, I see the code to write the trace as follows:

L2:;
sr_stop(0,0);
end:
if (sr_profile_flag) sr_profile("main end",0);
if (sr_trc_flag) sr_trace("ENDBODY",SRC0+23,0);
sr_finished_init();
}

(with my sr_profile call inserted).  When I look at the trace output this 
trace is missing.  The BODY trace and others do appear.  

Also, I do not get traces from VM's running on remote systems.  Is there 
something special which needs to be done to enable remote VM's to trace?

I would appreciate any help you can give.    
                                            TIA :^) Chris

-- 
===============================================================================
Christopher Arndt-Kohlway                      E-Mail: chris@aerojet.com 
Aerojet, Sacramento Plant                      Phone : (916) 355-5634
Sacramento, California (US)                    Fax   : (916) 355-6635
===============================================================================

From gmt@owl  Fri Nov 18 09:19:45 1994
Received: from owl.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA07108; Fri, 18 Nov 1994 09:19:47 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id JAA01585; Fri, 18 Nov 1994 09:19:45 -0700
Date: Fri, 18 Nov 1994 09:19:45 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199411181619.JAA01585@owl.CS.Arizona.EDU>
To: chris@chaos.aerojet.com, info-sr@cs.arizona.edu
Subject: Re: Questions about srtrace
Content-Length: 790

    From: Christopher Arndt-Kohlway <chris@chaos.aerojet.com>
    
    Using the program remote.sr in examples/other, I set up a test which
    should output beginning and end statitics for each process.  My 
    problem is that I do not see the ENDBODY trace for the main resource.

The main resource executes an explicit `stop' statement, so it never
reaches the end of the body.
    
    Also, I do not get traces from VM's running on remote systems.  Is there 
    something special which needs to be done to enable remote VM's to trace?

Remote VMs are traced if the trace is written to stdout or stderr, but
not otherwise.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From canedo@taec.enet.dec.com  Tue Nov 29 08:36:59 1994
Received: from inet-gw-2.pa.dec.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA10017; Tue, 29 Nov 1994 08:36:59 MST
Received: from vbormc.vbo.dec.com by inet-gw-2.pa.dec.com (5.65/10Aug94)
	id AA15767; Tue, 29 Nov 94 07:31:49 -0800
Received: by vbormc.vbo.dec.com; id AA00672; Tue, 29 Nov 94 16:15:52 +0100
From: canedo@taec.enet.dec.com
Message-Id: <9411291515.AA00672@vbormc.vbo.dec.com>
Received: from taec.enet; by vbormc.enet; Tue, 29 Nov 94 16:15:52 MET
Date: Tue, 29 Nov 94 16:15:52 MET
To: info-sr@cs.arizona.edu
Apparently-To: info-sr@cs.arizona.edu
Subject: Graphical interface support with sr

Hello everyone,

I'm new in sr programming and I wish to have some info 
about the following:

I plan to model a network system using sr concurrency 
(each node is a single "thread" of control). This 
network will be viewed with an X11 interface written 
with tcl (and tk extension) language. I need also to 
monitor an external process which gives the real state 
of the network (or at least some nodes of it). 

Is it possible to program the "kernel" (network model) 
in sr and use tcl-tk interface (making tk calls in sr 
program for example) ? I saw that sr has 2 grahical 
extensions but I need widgets (menus, dialogs...)

Sorry if this question is too obvious but I have little 
time to choose a language to implement my system (the 
interface is partially written).

Thanks in advance,

Best regards

Joseph Canedo


From owner-info-sr  Tue Nov 29 13:29:09 1994
Received: from owl.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA26730; Tue, 29 Nov 1994 13:29:12 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id NAA02280; Tue, 29 Nov 1994 13:29:09 -0700
Date: Tue, 29 Nov 1994 13:29:09 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199411292029.NAA02280@owl.CS.Arizona.EDU>
To: canedo@taec.enet.dec.com, info-sr@owl
Subject: Re: Graphical interface support with sr
Content-Length: 681

An SR main program can call functions written in C, so you could write
an interface to the tcl/tk library.  I'd think that would fairly
straightforward, though it would take some time.  However, if SR calls
a C function that blocks (waiting for input, for instance) the whole SR
program comes to a halt -- not just the particular process.  Also, it's
not possible for the C program to call back into SR, which would make
callbacks tricky.  Either of these problems might be enough to make a
tcl/tk interface impossible.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From canedo@taec.enet.dec.com  Thu Dec  1 09:40:42 1994
Received: from inet-gw-2.pa.dec.com by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA23032; Thu, 1 Dec 1994 09:40:42 MST
Received: from vbormc.vbo.dec.com by inet-gw-2.pa.dec.com (5.65/10Aug94)
	id AA11376; Thu, 1 Dec 94 08:34:35 -0800
Received: by vbormc.vbo.dec.com; id AA26575; Thu, 1 Dec 94 17:18:20 +0100
From: canedo@taec.enet.dec.com
Message-Id: <9412011618.AA26575@vbormc.vbo.dec.com>
Received: from taec.enet; by vbormc.enet; Thu, 1 Dec 94 17:18:21 MET
Date: Thu, 1 Dec 94 17:18:21 MET
To: info-sr@cs.arizona.edu
Apparently-To: info-sr@cs.arizona.edu
Subject: Little problem with a sr program

Hello,

I wrote a little program in order to learn sr language. 
It is composed of 1 ressource in which there is 3 
processes: one of them writes "toto" in the screen every 
4 seconds. The 2 others wait an integer in standard 
input and print it when is entered by user. When I 
launch the program the string "toto" is written as 
expected but when I enter the first integer the program 
"blocks" (does not print "toto" anymore). I enter the 
second integer and the program writes "toto" again and 
so on. This is the script:

resource essai()

  process readline
    var x: int
    do true ->
      writes("First source\n")
      read(x)
      write("result 1 is ",x)
      if x = 0 -> exit fi
    od
  end

  process readline2
    var x: int
    do true ->
      writes("Second source\n")
      read(x)
      write("result 2 is ",x)
      if x = 0 -> exit fi
    od
  end

  process print
    do true ->
      writes("toto\n")
      nap(400)
    od
  end
end

I'm sure it is a trivial problem in concurrency 
(conflict in sharing the same resource or something like 
that) but I'm very new in this domain. Can some one 
explain to me this phenomemon please ?

Thanks in advance

Best regards

Joseph Canedo


From greg  Thu Dec  1 09:53:48 1994
Received: from paloverde.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA24191; Thu, 1 Dec 1994 09:53:50 MST
Date: Thu, 1 Dec 1994 09:53:48 MST
From: "Greg Andrews" <greg>
Message-Id: <199412011653.AA01080@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Thu, 1 Dec 1994 09:53:48 MST
To: canedo@taec.enet.dec.com, info-sr@cs.arizona.edu
Subject: Re:  Little problem with a sr program

Input has to be ended with a newline (carriage return) character.
I believe this is what happened to you.

Greg Andrews

From magnus@cs.chalmers.se  Fri Dec  2 12:42:27 1994
Received: from muppet101.cs.chalmers.se by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA01667; Fri, 2 Dec 1994 04:46:52 MST
Received: (from magnus@localhost) by muppet101.cs.chalmers.se (8.6.9/8.6.9) id MAA02759; Fri, 2 Dec 1994 12:42:27 +0100
Date: Fri, 2 Dec 1994 12:42:27 +0100
From: Magnus Carlsson <magnus@cs.chalmers.se>
Message-Id: <199412021142.MAA02759@muppet101.cs.chalmers.se>
To: canedo@taec.enet.dec.com
Cc: info-sr@cs.arizona.edu
Subject: Re: Little problem with a sr program
In-Reply-To: <9412011618.AA26575@vbormc.vbo.dec.com>
References: <9412011618.AA26575@vbormc.vbo.dec.com>

You have two processes that contend for input, which is not a good
idea. You have no idea which characters from input will end up in
readline1, and  which of them that readline2 will get.

Therefore, SR-programs usually do not try to read from the same file
simultaneously in many processes. Of course, the whole program
shouldn't block if you do it, so I gather that's a bug in the runtime system.

One fix could be to protect the reading by a semaphore. See the
enclosed program.

If anybody thinks I'm wrong here, please correct me!

Regards
/Magnus
---

resource essai()

  sem m := 1 # New
  process readline
    var x: int
    do true ->
      P(m) # New
      writes("First source\n")
      read(x)
      V(m) # New
      write("result 1 is ",x)
      if x = 0 -> exit fi
    od
  end

  process readline2
    var x: int
    do true ->
      P(m) # New
      writes("Second source\n")
      read(x)
      V(m) # New
      write("result 2 is ",x)
      if x = 0 -> exit fi
    od
  end

  process print
    do true ->
      writes("toto\n")
      nap(400)
    od
  end
end


From canedo@taec.enet.dec.com  Mon Dec  5 08:15:48 1994
Received: from inet-gw-2.pa.dec.com by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA04415; Mon, 5 Dec 1994 08:15:48 MST
Received: from vbormc.vbo.dec.com by inet-gw-2.pa.dec.com (5.65/10Aug94)
	id AA08592; Mon, 5 Dec 94 07:09:58 -0800
Received: by vbormc.vbo.dec.com; id AA16897; Mon, 5 Dec 94 15:52:28 +0100
From: canedo@taec.enet.dec.com
Message-Id: <9412051452.AA16897@vbormc.vbo.dec.com>
Received: from taec.enet; by vbormc.enet; Mon, 5 Dec 94 15:52:29 MET
Date: Mon, 5 Dec 94 15:52:29 MET
To: info-sr@cs.arizona.edu
Apparently-To: info-sr@cs.arizona.edu
Subject: More detailed documentation on sr

Hello every one,

I wish to learn to use sr language but unfortunately I 
have only one article (TR 92-09 "SR : A language for 
Parallel and Distributed Programming").

I know there is a book on sr language programming but I 
think it will be difficult to me to obtain from France. 

Is there a more detailed documentation on sr (than the 
article TR 92-09 : "SR : A language for Parallel and 
Distributed Programming") available under electronic 
form and FTPable ? 

If not, does some one know how to order te book from 
France (and its price) ?

Thanks in advance

Best regards

Joseph Canedo


From owner-info-sr  Mon Dec  5 08:59:41 1994
Received: from owl.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA07385; Mon, 5 Dec 1994 08:59:44 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id IAA04408 for info-sr; Mon, 5 Dec 1994 08:59:41 -0700
Date: Mon, 5 Dec 1994 08:59:41 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199412051559.IAA04408@owl.CS.Arizona.EDU>
To: info-sr@owl
Subject: Re: More detailed documentation on sr
Content-Length: 801

    From: canedo@taec.enet.dec.com
    
    Is there a more detailed documentation on sr (than the 
    article TR 92-09 : "SR : A language for Parallel and 
    Distributed Programming") available under electronic 
    form and FTPable ? 

Sorry, no.
    
    If not, does some one know how to order te book from 
    France (and its price) ?

The real experts on ordering things from the US are probably to be found
in technical and university bookstores in France.  They can probably get
a copy from the stock of a European distributor.  Alternatively, you could
call the publisher at +1 415 594 4400.  [In the US, call 1 800 950 2665.]

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From jmwagner@ucdavis.edu  Mon Dec  5 08:51:07 1994
Received: from ucdavis.ucdavis.edu by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA14931; Mon, 5 Dec 1994 10:35:25 MST
Received: from ike.ucdavis.edu by ucdavis.ucdavis.edu (8.6.9/UCD2.50)
	id IAA11389; Mon, 5 Dec 1994 08:50:24 -0800
Received: from james.ucdavis.edu.ucdavis.edu by ike.ucdavis.edu (4.1/UCD2.04)
	id AA22307; Mon, 5 Dec 94 08:51:47 PST
Received: by james.ucdavis.edu.ucdavis.edu (931110.SGI/client-1.5)
	id AA16572; Mon, 5 Dec 94 08:51:07 -0800
From: "John Wagner" <wagner@ike.ucdavis.edu>
Message-Id: <9412050851.ZM16570@james.ucdavis.edu>
Date: Mon, 5 Dec 1994 08:51:07 -0800
In-Reply-To: canedo@taec.enet.dec.com
        "More detailed documentation on sr" (Dec  5,  3:52pm)
References: <9412051452.AA16897@vbormc.vbo.dec.com>
X-Mailer: Z-Mail (3.1.0 22feb94 MediaMail)
To: canedo@taec.enet.dec.com, info-sr@cs.arizona.edu
Subject: Re: More detailed documentation on sr
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0

Joseph,
Try
	The SR Programming Language -- Concurrency in Practice
	By Gregory R. Andrews and Ronald A. Olsson.
	The Benjamin/Cummings Publishing Co, Inc. 1993.
	ISBN 0-8053-0088-0

-- 
John Wagner
Institute of Theoretical Dynamics
Hydrology Modeling Lab (LAWR)
Graduate Group in Applied Mathematics
University of California, Davis

Disclaimer: NOBODY at UCD agrees with ANYTHING I say...
+----------------------+-------------------------------------------------+
| jmwagner@ucdavis.edu | I spent four years prostrate to the higher mind |
| jmwagner@ucdavis     | Got my paper and I was free       -Indigo Girls |
+----------------------+-------------------------------------------------+


From shartley@king.mcs.drexel.edu  Wed Dec  7 07:27:43 1994
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA13409; Wed, 7 Dec 1994 05:26:52 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA01791; Wed, 7 Dec 94 07:27:43 EST
Date: Wed, 7 Dec 94 07:27:43 EST
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9412071227.AA01791@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: teaching operating systems

In late January or early February, Oxford Univ. Press will publish my book

     "Operating Systems Programming: The SR Programming Language".
     The ISBN is 0-19-5095790.  Contact them at (800) 451-7556 for
     a copy.  Suggested list price is $25.00.

The example SR programs used in the book are avaliable by anonymous ftp
from site mcs.drexel.edu in directory pub/shartley; retrieve file
book_SR_examples.tar.gz or book_SR_examples.tar.Z (remember to use binary
mode) to get a tar archive compressed with the GNU compression program
gzip or the UNIX utility compress, respectively.

Steve Hartley
Drexel University
shartley@mcs.drexel.edu

Here is the Preface:

  SR is a language for concurrent programming.  This book describes the SR
language, presents some examples of SR programs in the context of an operating
systems or concurrent programming course, and provides some programming as-
signments in the form of open Student Laboratories.  The SR language can be
used by instructors of concurrent programming or operating systems courses to
give students experience in writing concurrent programs that use multiple
processes, semaphores, monitors, message passing, remote procedure calls, and
the rendezvous.  The language can also be used for parallel computing in a
shared-memory multiprocessor or a distributed memory cluster environment.
  The intended audience is undergraduate and graduate students enrolled in
concurrent programming and operating systems classes.  Prerequisites for stu-
dents are knowledge of a high-level programming language like C or Pascal and
operating systems concepts.  See the Instructor's Manual for more detailed
prerequisites.  This book is designed to be used during an operating systems
course in conjunction with one of the standard texts to provide concurrent
programming experience.  The book can also be used in a full semester follow-
on course to operating systems to provide more extensive programming experi-
ence.  Since most concepts and terms are defined, the book can be used as the
sole text in an introductory concurrent programming course that precedes the
operating systems course.
  The required computing environment is a UNIX platform such as a Sun 3, Sun
4, Sequent Symmetry, DECstation, SGI Iris, NeXT, HP RISC, or PC compatible
running Linux.
  The SR examples and programming assignments in this book have been used suc-
cessfully in undergraduate concurrent programming and operating systems
courses at Drexel University, Philadelphia, Pennsylvania, and Trinity Univer-
sity, San Antonio, Texas.  The book arose out of a collection of handouts and
class notes distributed to students during 1991-94 and is a greatly expanded
version of [some earlier journal papers].
  This book has several important features.
    * The material is keyed to four standard operating systems texts: Deitel,
Silberschatz and Galvin, Stallings, and Tanenbaum.  The relevant sections of
these texts for the major concepts, such as semaphores and monitors, are indi-
cated.
    * Each of the numerous example programs in this book includes output from
one or two sample runs to show how the program works.
    * Algorithm animation using the animator interpreter from the XTANGO sys-
tem is described and used in several of the examples.
    * Numerous programming assignments in the form of open Student Labora-
tories are given.
  The example programs in this book will be made available by anonymous ftp at
site mcs.drexel.edu.  Contact the author for further details.

Here is the TOC:

Operating Systems Programming
   Hardware Basics
      Hardware and Software Interrupts
      Hardware Protection
      CPU Scheduling
The SR Programming Language
   Sequential Features
   Additional Sequential Examples and Features
   Lab: Sequential SR
   Multiple Resources
   Lab: Resources and Capabilities
   Additional Features
   Animating Programs with XTANGO
   Lab: XTANGO Animation
Concurrent Programming
   Multiple Processes in One Resource
   Multiple Processes in Multiple Resources
   Simulated versus Real Concurrency
   Debugging Techniques
   Race Conditions and Process Synchronization
   Lab: Race Conditions
   Architecture and Shared Memory Systems
   The Mutual Exclusion Problem
Semaphores
   SR Semaphores
   Classical Operating Systems Problems
   Semaphore Solutions
      The Producers and Consumers
      The Sleeping Barber
      The Dining Philosophers
      The Readers and Writers
   Binary Semaphores
   Lab: Semaphores
      Assignment: Fix Race Condition
      Assignment: Multiple Producers and Consumers
      Assignment: Another Classical Problem
      Assignment: Multiple Sleeping Barbers
      Assignment: Dining Philosophers
      Assignment: Fair Readers and Writers
      Assignment: Baboons Crossing a Canyon
      Assignment: Fraternity Party
      Assignment: Jurassic Park
   Animating Operating Systems Algorithms
   Lab: Classical Problem Animation
Monitors
   Monitors and SR
      The Producers and Consumers
      The Dining Philosophers
      The Readers and Writers
   Implementing Monitors with Semaphores
   Lab: Monitors
      Assignment: Fair Baboons
      Assignment: Sleeping Barber
      Assignment: Fair Dining Philosophers
      Assignment: Fraternity Party
      Assignment: Bakery
Message Passing and the Rendezvous
   Message Passing
   Message Passing in SR
      Concurrent Programs and Message Passing
      Distributed Mutual Exclusion
      Miscellaneous Examples
   Lab: Message Passing
      Assignment: Merge Sort
      Assignment: Pipeline Sieve of Eratosthenes
      Assignment: Compare/Exchange Sort
      Assignment: Speedup
      Assignment: Algorithm Animation
   Rendezvous
      Classical Problems Using Rendezvous
      Nested in Statements
      A Lock Resource
      The Distributed Dining Philosophers
   RPC and Client-Server Programming
   Summary of Operations and Invocations
   Lab: Rendezvous
      Assignment: Fair Baboons
      Assignment: Sleeping Barber
      Assignment: Fair Readers and Writers
      Assignment: Fair Dining Philosophers
      Assignment: Fraternity Party
      Assignment: Bakery
      Assignment: Banker's Algorithm
   More Animation with XTANGO
   Lab: Algorithm Animation
Parallel Computing
   Coarse-Grained Concurrency in SR
   Patterns of Communication
   Data Parallelism
      Shared Memory Examples
      Message Passing Examples
   Integrating Animator into SR
   Lab: Parallel Computing
      Assignment: Speedup
      Assignment: Race Condition
      Assignment: No Race Condition
Instructor's Manual
   Sample Lab Solutions
      Semaphores
      Monitors
      Message Passing
      Rendezvous
      Parallel Computing

From scip3161@cobra.nus.sg  Thu Dec  8 09:07:51 1994
Received: from cobra.nus.sg by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA01625; Wed, 7 Dec 1994 18:08:17 MST
Received: (from scip3161@localhost) by cobra.nus.sg (8.6.9/8.6.9/CNS-3.5) id JAA22621 for info-sr@cs.arizona.edu; Thu, 8 Dec 1994 09:07:52 +0800
From: E Z A M <scip3161@cobra.nus.sg>
Message-Id: <199412080107.JAA22621@cobra.nus.sg>
Subject: any shared memory machine with SR?
To: info-sr@cs.arizona.edu (arizona info_sr)
Date: Thu, 8 Dec 1994 09:07:51 +0800 (SST)
X-Mailer: ELM [version 2.4 PL21]
Content-Type: text
Content-Length: 558       

Hello, I am looking for a place where I can test a program running in parallel
environment.  There are many problems in trying to understand or visualise
the behaviour of concurrent algorithms.  I hope that if possible, I would 
like to run the program in parallel environment.

-- 
........................................................
Lai_Hong Cheong (E Z A M)
scip3161@leonis.nus.sg, cheongla@iscs.nus.sg
http://www.iscs.nus.sg/~cheongla
Learn from the atom and particles about the way of life.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

From canedo@taec.enet.dec.com  Tue Dec 13 03:45:57 1994
Received: from inet-gw-2.pa.dec.com by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA08008; Tue, 13 Dec 1994 03:45:57 MST
Received: from vbormc.vbo.dec.com by inet-gw-2.pa.dec.com (5.65/10Aug94)
	id AA06266; Tue, 13 Dec 94 02:42:12 -0800
Received: by vbormc.vbo.dec.com; id AA22327; Tue, 13 Dec 94 11:24:35 +0100
From: canedo@taec.enet.dec.com
Message-Id: <9412131024.AA22327@vbormc.vbo.dec.com>
Received: from taec.enet; by vbormc.enet; Tue, 13 Dec 94 11:24:36 MET
Date: Tue, 13 Dec 94 11:24:36 MET
To: info-sr@cs.arizona.edu
Apparently-To: info-sr@cs.arizona.edu
Subject: Passing a SR proc in argument to an external C function

Hello everyone,

Is it possible to pass a SR proc in argument to an 
external C function ? I want to make a callback (GUI) 
using SR code instead of C code...

If that is not possible what do you think about this 
solution :
1 process written in SR + 1 process written in C (Motif) 
or tcl (tk) which communicate via UNIX pipes. Does this 
solution garantee synchronization between interface and 
state of objects in SR process ? 

Any help is greatly appreciated

Best regards

Joseph Canedo


From owner-info-sr  Tue Dec 13 07:40:32 1994
Received: from owl.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA14469; Tue, 13 Dec 1994 07:40:35 MST
Received: (from gmt@localhost) by owl.CS.Arizona.EDU (8.6.9/8.6.6) id HAA11977; Tue, 13 Dec 1994 07:40:32 -0700
Date: Tue, 13 Dec 1994 07:40:32 -0700
From: Gregg Townsend <gmt@owl>
Message-Id: <199412131440.HAA11977@owl.CS.Arizona.EDU>
To: canedo@taec.enet.dec.com
Cc: info-sr@owl
Subject: Re: Passing a SR proc in argument to an external C function
Content-Length: 898

    From: canedo@taec.enet.dec.com
    
    Is it possible to pass a SR proc in argument to an 
    external C function ? I want to make a callback (GUI) 
    using SR code instead of C code...

No. SR procs use a different calling convention than C.
    
    If that is not possible what do you think about this solution :
    1 process written in SR + 1 process written in C (Motif) 
    or tcl (tk) which communicate via UNIX pipes.

That should be feasible.  Just be sure to explicitly flush the output
from both sides so that it doesn't stall in a buffer.

    Does this solution garantee synchronization between interface and 
    state of objects in SR process ? 

It should