comp.os.chorus Frequently Asked Questions (FAQ)

0 views
Skip to first unread message

Philippe Robin

unread,
Dec 9, 1997, 3:00:00 AM12/9/97
to

Posting-Frequency: bi-monthly
Archive-name: chorus-faq
Last-modified: 1997/12/09
Revision: 1.31

Changes from last posting:

Update the product offerings section. This information is extracted
from the Chorus Web site and is quoted here as indication, so please
refer to http://www.chorus.com for up to date information or contact
Chorus systems.

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

Table of Contents
=================

1. General Information
1.1. Organization and Availability of this FAQ
1.2. What's New?
1.3. What is CHORUS?
1.4. How to Contact Chorus Systems?
1.5. Disclaimer & Copyright
2. Documentation
2.1. Documentation Available through Anonymous FTP
2.2. Papers on CHORUS
2.3. Other references
2.4. Press references
3. Chorus Product Offering
3.1. Overview
3.2. Offering for Universities
4. CHORUS Microkernel
4.1. General
4.2. Supported Microprocessors
4.3. Porting on various platforms
4.4. Scheduling and real-time
4.5. CHORUS on Transputers
4.6. Comparison with other OS
4.7. Perfomances
4.8. Object Oriented issues
5. OS Personalities
5.1. OS personalities available on top of CHORUS
5.2. CHORUS/MiX V.3.2
5.3. CHORUS/COOL-ORB
5.4. CHORUS/ClassiX
6. Other Software
--------------

1. General Information
===================
1.1. Organization and Availability of this FAQ
-----------------------------------------
This FAQ contains informations related to the CHORUS operating system,
description of the products and contacts. It will be progressively
updated according to the discussions held in this newsgroup and the
evolution of the products.

It is posted every two months in the following newsgroups:<<comp.os.chorus,
news.answers, comp.answers >>. A Japanese version of the FAQ is also available
in the <<fj.os.misc>> newsgroup. Copies of the FAQ can also be obtained by
e-mail by sending a request to "choru...@comp.lancs.ac.uk". Hypertext
version of the FAQ can be found at the following URLs:

http://www.comp.lancs.ac.uk/computing/users/pr/www/chorus/faq.html
http://www.faqs.org

You can make any comments, suggestions or contributions to this
FAQ by sending an e-mail to "choru...@comp.lancs.ac.uk" or
"p...@comp.lancs.ac.uk" or by discussions in the newsgroup.

1.2. What's New?
-----------
Update the product offerings section. This information is extracted
from the Chorus Web site and is quoted here as indication, so please
refer to http://www.chorus.com for up to date information or contact
Chorus systems.

1.3. What is CHORUS?
--------------
CHORUS is a family of open microkernel-based operating system
components to meet advanced distributed computing needs in areas such
as telecommunications, internetworking, embedded systems, realtime,
"mainframe UNIX", supercomputing and high availability. The CHORUS/MiX
multiserver implementations of UNIX allow to dynamically integrate
part or all of standard UNIX functionalities and services in the above
application areas.

CHORUS is designed, developed and marketed by Chorus Systems.


1.4. How to Contact Chorus Systems
-----------------------------
North America:
Chorus Systems Inc.
1999 South Bascom Avenue, Suite 400
Campbell, CA 95008
United States
Phone: +1 (408) 879-4100
Fax: +1 (408) 879-4102
Voice Mail: +1 (408) 291 8832
Email: in...@chorus.com

Europe:
Chorus systemes SA
6 avenue Gustave Eiffel
F-78182 St Quentin-en-Yvelines Cedex
France
Phone: +33 (1) 30 64 82 00
Fax: +33 (1) 30 57 00 66
Email: in...@chorus.fr

Asia Pacific:
Chorus Systems KK
Mitsutake Building Ikejiri, 8F
3-22-4 Ikejiri, Setagaya Ku
Tokyo 154
Japan
Phone: +81 (3) 5430-1131
Fax: +81 (3) 5430-1133
Email: inf...@chorus.com

1.4. Disclaimer & Copyright
---------------------
The author provides no warranty regarding the content of this document.
It is provided "as is" without express or implied waranty.

Permisson to distribute this document, in part or full, via electronic
means (emailed, posted or archived) or printed copy are granted providing
that no charges are involved, reasonable attempt is made to use the most
current version, and all credits notices are retained. For other distributions
including incorporation in commercial products, such as books, magazine
articles, or CD-ROMs, you must get permission from the author first
(e-mail: choru...@comp.lancs.ac.uk).

2. Documentation
=============
2.1. Documentation Available through Anonymous FTP
---------------------------------------------
There are several technical reports on CHORUS available via anonymous
FTP from Chorus systemes, France: ftp.chorus.fr [192.33.15.3],
directory pub/chorus-reports (see the file "index" for an overview).
A set of slides on CHORUS is also available in the directory
"pub/chorus-slides", documents CS-TR-92-64 (PostScript, versions 1-up
and 2-up).

Product Data Sheets are available (in ascii or PostScript format) in
the directory "pub/chorus-datasheets".

Those reports are available through the World Wide Web at Chorus
systemes: "ftp://ftp.chorus.fr/pub" or from the Web server at the
URL:"http://www.chorus.com".

2.2. Papers on CHORUS
----------------
[Bricker, 1991] A. Bricker, M. Gien, M. Guillemont, J. Lipkis, D. Orr and
M. Rozier, "A new look at micro-kernel-based UNIX operating systems:
Lessons in performance and compatibility". Proc. of the EurOpen Spring'91
Conference, Tromsoe, Norway, 20-24 May 1991.
Chorus Systems Technical Report CS-TR-91-7

[Coulson, 1994] Coulson G., and G.S. Blair. "Microkernel Support for
Continuous Media in Distributed Systems". Computer Networks and ISDN
Systems, Special Issue on Multimedia, 1994; also available as internal
report MPG-93-04, Computing Dept., Lancaster University.

[Gaultier, 1994] O. Gautier and Y. Metais. "Mise en Place d'une Plateforme
CHORUS, Conception et Implementation d'un Ordonnanceur a Echeance au Sein
du Noyau Chorus". Memoire CNAM, Paris, March 1994.

CS/TR-94-82.1 "CHORUS Kernel v3 r5 for T425/T805 Connection Manager and
Aserver Library" (Internal Report)

CS/TR-94-81.1 "CHORUS Kernel v3 r5 for T425/T805 Host Server User's
Manual, Aserver Guide" (Internal Report)

2.3. Other references
----------------
[Bradley, 1993] J Bradley Chen and Brian N Bershad
"The Impact of Operating System Structure on Memory System Performance",
ACM SIGOPS Dec. '93

[Coulouris, 1994] G. Coulouris, J. Dollimore and T. Kindberg. "Distributed
Systems, Concepts and Design", Addison-Wesley, second edition, 1994.

[Douglis et al., 1992] Douglis, F., Kaashoek, M.F., and Tanenbaum,
A.S.: "A Comparison of Two Distributed Systems: Amoeba and Sprite,"
Computing Systems, vol. 4, Fall 1991 (sic).

[Dean, 1992] R. Dean and F. Armand. "Data Movement in Kernelized Systems".
Proceedings of the USENIX Workshop on Micro-Kernels and Other Kernel
Architectures, pp. 243-261, April 1992.

[Tanenbaum, 1992] Andrew S. Tanenbaum: "Modern Operating Systems",
Prentice-Hall, 1992.

[Tanenbaum, 1994] Andrew S. Tanenbaum, "Distributed Operating Systems",
Prentice-Hall, ISBN 0-13-219908-4

[Tanenbaum, 1995] Andrew S. Tananbaum, "A Comparison of Three Microkernels",
The Journal of Supercomputing, vol 9, number 1, ISSN 0920-8542, 1995.

2.4. Press references
----------------
BYTE, Jan 94 issue:
- "Small Kernels Hit it Big" (by Peter Varhol, p. 119, 6 pages), and
- "The Chorus Microkernel" (by Dick Pountain, p. 131, 4 pages)
(a color reprint of these articles is available upon request
from Chorus Systems.)

BYTE, Feb 95 issue:
- "Novell's Campaign" (by Jon Udell, p. 43, 11 pages)
CHORUS is mentioned in this article as being the basis for
the microkernel underpinning the UnixWare and NetWare personalities.

BYTE, Mar 95 issue:
- "Europe's Chip Challenge" (by Dick Pountain, p. 19, 5 pages)
CHORUS is mentioned in this article on the CEC's Open Microprocessor
Initiative (OMI) as the microkernel being used and enhanced within
various OMI projects.

3. Chorus Product Offering
=======================
3.1. Overview
--------
CHORUS/Micro is a very small (10K) hard real-time embedded kernel
typically used in low-cost, dedicated application environments needing
minimal functionality and a minimum memory footprint, such as line cards,
portable phones, and hand-held devices.

CHORUS/ClassiX is host-target cross-development environment for
C++ or C written applications, named C_actors. C_actors can be loaded,
unloaded and debugged dynamically from the host (e.g. SPARCstation/SunOS)
on the target (e.g. ix86 PC/AT), interconnected via Ethernet.
C_actor applications can interoperate with UNIX on the host
through TCP/IP sockets and NFS. On the target, there is only the
CHORUS/Nucleus microkernel and the CHORUS/C_actor subsystem but
no CHORUS/MiX UNIX System V subsystem.
CHORUS/ClassiX is available for i386/i486/Pentium (PC/AT), mc68040
(MVME167), mc68360 (QUADS) Micro-SPARC-1/-2 (FORCE CPU-3CE/-5CE,
SPARCclassic, SPARCstation 5, SPARCengine 5) and T425/T805/T9000
(SGS-Thomson INMOS boards). More informations can be found at the
following URL: http://www.chorus.com/Products/Datasheets/classix.html.

CHORUS/MiX V.4 is a distributed multi-server implementation of
UNIX SVR4.0 on top of the CHORUS microkernel). E.g. on a 386/486 PC/AT,
it offers binary compatibility with native SVR4.0v4. MiX V.4 requires a
Novell/USG SVR4.0 source license. More information on this product can
be found at http://www.chorus.com/Products/Datasheets/mixv4.html.

CHORUS/COOL is a distributed programming environment for object-oriented
applications. CHORUS/COOL supports the dynamic creation of C++ objects,
these objects can be invoked, using C++ mechanism in a system wide
transparent way. Objects can migrate, and remain persistent unless
explicitly deleted. The programming model used is based on the Object
Management Group's architecture (OMG).

CHORUS/COOL-ORB is an OMG-CORBA compliant Object Request Broker. It is
available for CHORUS/Fusion, CHORUS/ClassiX, CHORUS/MiX V.4, SCO UNIX,
SunOS 4.1, Solaris, Linux, AIX, Windows95 and WindowsNT. More information
concerning this product can be found at the following URL:
http://www.chorus.com/Products/Datasheets/coolorb.html

CHORUS/JaZZ is an implementation of the Java runtime and selected
components of the JavaOS that have been integrated into CHORUS/ClassiX
as an operating system personality. CHORUS/JaZZ extends CHORUS/ClassiX
with a Java "Virtual Machine" personality including all standard Java
containers and classes such as windows, threads, I/O, exceptions and
network. More information on this product can be found at the following
URL: http://www.chorus.com/Products/Datasheets/jazz.html.

CHORUS/Harmony includes C , C++, and Embedded C++ optimizing compilers,
tool chains (assemblers, linkers, utility programs) profilers, runtime
error checkers, simulators and kernel debuggers. All of the Integrated
Development Environment components share a common GUI and communicate
with each other for enhanced functionality.

3.2. Offering for Universities
-------------------------
Chorus Systems has special programs for universities. More information
on offerings, conditions, etc is available via ftp (ftp://ftp.chorus.fr)
in the following ASCII files:
- pub/README
- pub/academic/README
- pub/academic/offerings

If you have questions, you may contact Didier....@chorus.fr.


4. CHORUS Microkernel
==================
4.1. General
-------
* What is a microkernel?
A "microkernel" is an operating system with only the essential services,
such as interprocess communication, short-term scheduling, and memory
management. It basically provides the process abstraction and a means
for processes to communicate. It is designed to be portable between
computer architectures, using high-level languages such as C or C++ and
reducing the machine-dependant component to a minimal bottom layer.
The microkernel appears as a layer between the hardware layer and a
layer consisting of system components called 'subsystems'.
Their size can vary from about 10Kb to several hundred kilobytes
of executable code and static data.

* Synchronisation primitives offered to CHORUS threads?
The CHORUS microkernel (v3 r5.x) offers the following synchronisation
primitives:
- mutexes
- (counting) sempahores
- spin locks (supervisor applications only)
- mini messages (supervisor applications only)

Other synchronisation primitives such as condition variables and
reader/writer locks can be built on top of those basic primitives.

* Do CHORUS threads support specific data?
Yes. The microkernel supports so-called "software registers".
Each thread has two software registers which are systematically
saved/restored by the microkernel upon a thread context switch.
The software registers can be read/written through threadStoreR(K)
and threadLoad(K) system calls.
A software register typically contains a pointer to a per-thread
private data area. Via software registers, one can implement e.g.
a per-thread value of "errno".

* Distributed synchronization service on top of the CHORUS microkernel?
This work is part of a PhD thesis undertaken by Stephane Eranian
<era...@chorus.fr> implementing distributed synchronization service on
top of the CHORUS microkernel. It implements pure mutex (no mr/sw).
The synchronization is achieved using a token-based algorithm through
a server. Its main role is to manage token creation, deletion and sharing
among sets of clients. For more information contact S. Eranian.

* Initialization of the context of an actor created with the actorCreate(K)
system call?

To create an actor in CHORUS using actorCreate(K), the actor address
space must be empty (i.e. does not include any valid memory region).
If you want to "fork" an actor, i.e. the new actor's code and data is
a copy of the main actor's code and data.

In order perform address space duplication, you can use the rgnDup(K)
service, just after having created the actor (and before having created
new regions: this operation is only valid on an empty address space).

Before invoking rgnDup(K), you must specify for each region how the region
will be "duplicated": map (sharing), copy or not duplicated at all.
In order to do this, you have to get the list of your regions
(rgnStat(K)), and set the inheritance flags using rgnSetInherit(K).

Note: an alternative to the rgnSetInherit/rgnDup scheme is to treat each
region individually, using rgnMapFromActor(K) for shared regions,
and rgnInitFromActor(K) for copied regions.

* Encryption mechanisms in CHORUS IPC?
CHORUS IPC does not provide any "encryption" mechanisms. Such mechanisms
can be implemented by applications.

* Given a set of actors and ports, what would happen if
one of the actors is stopped (with an actorStop) prior to an ipcSend().
Would all the other members of the port group receive the message or
would the behavior of the kernel be different ?

Depends on the mode set for the group, but if the group is in
broadcast mode all the members of the group should receive the message,
including ports belonging to actors in stopped state.

* Trap connection in supervisor actors using svTrapConnect(K) or
scCallConnect(K)?

- svCallConnect(int trapNb, KnCallEntry *table, uint entNb, int flag);
Connects a trap handler table to a specific trap number where each
entry in the table contains a pointer to a function and the number of
arguments it takes. entNb is the number of entries in the table.
One thing to note is that svCallConnect()'s trap number is biased by the
constant TRAP_BASE (cf. cpu.h). That is, if you want to use interrupt 5,
you would pass 5 to svCallConnect() and trigger the trap by executing
the assembly instruction: int $(5 + TRAP_BASE) after first loading
%eax with the service you want. On ix86 the assembly file would be
something like:

.globl DoSomething
DoSomething:
movl $0, %eax ; index of the call in the table in eax
int $(TRAP_BASE + trapNb)
ret

If you have access to CHORUS sources you can look at how the CHORUS
libraries are built (i.e. lib/mklib or lib/mkslib).

- svTrapConnect(uint trapNb, KnHdl func) connects a trap handler taking
two arguments (thread context and interrupt number) to a the hardware
trap trapNb (trapNb is an absolute value in this case). The assembly
code to generate the trap would be similar to the code mentioned
for svCallConnect for ix86 architectures. On other architectures you can
either look at how kernel libraries are built if you have access to the
source code, otherwise look at the processor reference manual or try
disassemble a kernel library.

4.2. Supported Microprocessors
-------------------------
Various versions of the CHORUS microkernel have been ported to a
variety of microprocessors, either by Chorus Systems or by its
clients:

- i386/i486/Pentium (various PC/ATs)
- mc68030/mc68360/mc68040 (MVME147S, QUADS, MVME167S)
- mc88k
- SPARC (SPARCstation SLC, SPARCstation Classic, SPARC CPU-3CE)
- transputer T425/T805/T9000
- R3000/R4000 (Sony 3410)
- PA-RISC (HP 9000/834 and 9000/720)
- YMP (Cray YMP)

4.3. Porting on various platforms
----------------------------
* Chorus on Macintosh?
The INT (Institut National des Telecommunications, Evry, France) has
ported the v3 r3 version of the CHORUS microkernel to a Macintosh II CX
(mc68030-based). CHORUS and MacOS coexist and cooperate on the same
hardware.
The paper "Cohabitation and Cooperation of Chorus and MacOS", by
Christian Bac and Edmond Garnier, was presented at the Usenix Symposium
on Microkernels and Other Kernel Architectures in Sep 93 in San Diego.
You can find the paper in the proceedings. It is available from
ftp.int-evry.fr:/pub/systeme.

In the same directory you will also find another paper on the same
subject: "ChorusToolbox : MacOS running on top of Chorus", by Christian
Bac and Hong Quang Nguyen from INT. This paper was presented at SUUG'94
in April 94 in Moscow.

* CHORUS on transputers?
Archipel, Chorus and SGS/Thomson Inmos have ported the CHORUS
microkernel and the CHORUS/MiX V.3.2 subsystem (SVR3.2 compatible) to
T425 and T805 transputers. This was done in the context of the Esprit
project "Harmony" (EC-funded R&D). Initially, a T9000 port was planned to
be available by now. Due to a delay in the availability of the T9000,
the CHORUS port (which is underway now), has shifted as well.
Inmos and Chorus have been working together in order to assure that
CHORUS/MiX (i.e. UNIX) will run in an optimal manner on the T9000.

* CHORUS on 64-bit architecture?
CHORUS has been ported to DEC's Alpha, Cray Research's YMP and
MIPS' R4000.

* Port of CHORUS on HP-PA?
On December 1st Jon Inouye <jin...@cse.ogi.edu> wrote:

Prof. Jonathan Walpole supervised a port of the CHORUS v3.3
nucleus to the Hewlett-Packard 9000/834 workstation from late
1990 to mid-1991. This was part of a funded research project
to evaluate the CHORUS operating system with respect to the
Hewlett-Packard PA-RISC architecture. The nucleus did not
support any disk/network drivers and performed all console/
keyboard I/O though IODC (PROM) routines. A CHORUS/MiX V.3.2
Process Manager (PM) port was partially completed to the point
where UNIX shells and certain system calls were supported ...
but not a UNIX file system.

Since then, I have been porting Chorus/MiX V.3.2 (with the v3.4
nucleus) to the HP 9000/720. Since I am performing this port in
my spare time it is not progressing very fast. The v3.4 nucleus
runs along with a serial driver. It lacks other device drivers,
FP emulation support (though basic FP operations are supported)
and still uses the old HP-UX PDIR structure rather than the more
recent HPT. The Ethernet driver is still being debugged as is an
ancient version of the MiX V.3.2 PM. The port is being used for
virtual memory experiments.

Both ports use a considerable amount (over 40,000 lines combined)
of HP-UX source code for the assembly language utilities, boot up,
I/O initialization, and device drivers. The 834 port uses a Tut
(HP-UX 2.0 modified to run Mach 2.0) base and the 720 port uses
a HP-UX 8.0 base. For this reason, we have not been able to release
anything because of all the legal implications ... HP, Chorus, USL
copyrights.

The evaluation is available as a series of OGI technical reports
which can be obtained via anonymous ftp from cse.ogi.edu (129.95.20.2)
in the directory /pub/tech-reports or via the URL:
"http://www.cse.ogi.edu/DISC/projects/pa-chorus/pa-chorus.html".

* Are PCI-bus devices supported on ix86?
PCI devices, like video and IDE, whose I/O mode is compliant with ISA,
are supported; they are just seen as ISA adapters.
PCI devices which are not ISA compliant (e.g. the SCSI controller
and/or the Ethernet controller on some COMPAQs) are not supported;
supporting them would require modifications in the driver code (and
possibly also in the CHORUS microkernel code).

4.4. Scheduling and real-time
------------------------
* Scheduling mechanisms and scheduling policies
The CHORUS microkernel makes a distinction between scheduling mechanism
and scheduling policies. The core scheduler within the microkernel does
pure preemptive scheduling (SCHED_FIFO in POSIX RT terms). On top of
that, different scheduling policies can be implemented in the form of
scheduling classes; each class communicates with the core scheduler and
can make its own scheduling decisions within that class based upon
attributes (priorities, deadlines, etc) and behaviour (time-slicing,
SCHED_RR, ...).
Today, 4 scheduling classes are provided: a default class and the 3
UNIX SVR4 classes (SVR4_TS, SVR4_RT and SVR4_SYS). Work is in progress
for additional classes (deadline, fair-share, etc) cf the work done
by Olivier Gaultier and Olivier Metais at CNAM Paris on the implementation
of an EDF (Earliest Deadline First) policy in the CHORUS kernel.

* Relative cost of context switch between user and supervisor threads?
User threads/actors have their own address spaces, and are protected
from other user address actors.
Supervisor threads/actors all share the supervisor address space,
each supervisor actor has its own "slot" in the supervisor address
space.

For comparison, let's take:
[U] a context switch between 2 user threads in different user
actors,
[S] a context switch between 2 supervisor threads in different
supervisor actors

Unlike [U], [S] does not require the saving/restoring of the memory
context, so [S] is less costly. For the CHORUS/Nucleus v3 r5.2 on
a i486/50MHz, the ratio [U]/[S] is 1.57.

* How to measure Interrupt latency?
The easiest way is to connect an interrupt handler to a hardware timer.
As soon as the handler is activated, the handler will measure the current
time and then wake-up a thread, e.g. by doing a V on a semaphore. The
thread, when returning form its P operation on the same semaphore, will
also measure the current time. The difference between these 2 time
measurements is the latency.

If you are using CHORUS/ClassiX or CHORUS/MiX V.4, you should take a
look at one of the example applications in the tutorial, named ILD
(Interrupt Latency Demo) which does exactly this work.


4.5. CHORUS on Transputers
---------------------
* On transputers, how to communicate from CHORUS to UNIX (SunOS)?
There is no standard way to do this with CHORUS. This is the kind of
things CHORUS/MiX is there for.
Specific to transputer, you can use emulated links. On your
workstation run a daemon, the "Aserver", which comunicate
with your b300 box. Together they emulate transputer virtual links
over TCP/IP. These links can then be used by transputer and Unix
applications to communicate. For details on how to do that, see
the sections on the Aserver in the CHORUS documentation (CS/TR-94-82.1
and CS/TR-94-81.1).

* Use of the INMOS RTL for the C-toolchain to work with sockets?
[Answer on Dec. 6, 1994 from B. Wipfel <r...@unislc.slc.unisys.com>]:

Guessing that you want to make socket calls from one of your actors,
and have the B300 handle them in the normal way, the trouble is that
the transputer implementation of CHORUS uses AServer, not IServer.
Since AServer communication is encapsulated in IServer MEGA_PACKETS,
the B300 never gets to see any of the socket packets and passes
everything to the host.

A real option is to write a new AServer server to provide your socket
service. In this case, all communication will go to the host, and it
will make the socket calls on behalf of your actor in the target system.
The B300 wouldn't be involved, other than maintaining normal AServer
communication with the host. This is kind of a shame, since the B300
has the necessary functionality.

A last option might be to use a second root link. Wire up two links
from the B300 to your transputer network. Boot the network via one of
the links. Configure the second link as a network "EDGE". Have your
actor connect to the edge link with one of the AServer routines;
something like cmLinkOpen("/dev/raw/00") ? Once the link is open, and
you have the channel pointers, it might be possible to attach the
socket library channels to these channels. You'll need to do
communication via CHORUS' channel I/O routines however.

* If we have made ourselves a sockgateway process, configured in
the .cfs file as:
....
interface(input fromhost, output tohost,
input formChorus,
output toChorus);

Where do we connect the input and outputs ?
[Answer on Nov. 25, 1994 from N. Stephen <ste...@osf.org>]:

I don't know what release you might have, but look up the #device
primitive in the build tool users manual. This primitive allows you
to attach native transputer processes' channels (which normally
control devices) to the CHORUS world, and does all the necessary
wiring so that these channels are accessible from the connection
manager. There may also be an example of this being done in one
of the tutorials, if you have them with your release - the CHORUS
Nucleus Tutorial (2), mixing CHORUS and Native transputer code.

4.6. Comparison with other OS
------------------------
* differences between Mach and CHORUS?
There are a lot of similarities between the concepts of the
CHORUS v3 r5 microkernel and the Mach 3.0 microkernel: IPC, threads,
memory management.

See [Dean, 92] (cf. section 2.3) for more elements of comparison
between the two kernels.

(For comparison with other kernels see [Tanenbaum, 1994],
[Tanenbaum, 1995] in section 2.3)


4.7. Performances
------------
* Is there any system for performance analysis?
As far as the CHORUS microkernel applications ("actors") are
concerned, the CHORUS/Profiler and the CHORUS benchmarks can be
used.
The CHORUS/Profiler allows one to obtain and display symbolic
call-graph profile data for actors (similar to UNIX' gprof(1)):
callers, calllees, absolute and relative time spent in different
procedures within one actor. Actors are to be compiled with the
-p option. The profiler consists of a supervisor actor (PROF)
plus 2 CHORUS/MiX utilities. Profiling be can enabled/disabled
dynamically using the CHORUS/MiX utility profctl(1). profctl(1)
stores the raw profiling data in a UNIX file, which can then be
exploited by the report generator profrpg(1) in order to produce
a human-readable profile report. See ftp.chorus.fr:/pub/chorus-
datasheets/Profiler_v3_r4.{ascii,ps.Z}.
CHORUS benchmarks allow you to get performance figures for
individual microkernel system calls. For some system calls, like
ipcSend(K), you get performance figures for different cases/parameters
(small/medium/big message sizes). These basic figures can also help
you to analyse and tune the performance of your microkernel applications.

In the context of the ESPRIT project Ouverture, Alcatel, Siemens and
Chorus have designed and implemented so-called hooks for monitoring
and debugging in the CHORUS microkernel. These hooks are a clean set
of new microkernel system calls which allow monitoring and debugging
tools (e.g., PATOC, PARTAMOS) to be informed about the occurrence of
events they're interested in (context switch, message arrival, thread
creation, etc). They will be available in a future CHORUS product
release.

PATOC is a graphical tool (Motif-based) that allows to monitor
applications running on CHORUS. It is event based and is able
to display its information is various forms (diagrams, bar-charts
etc). PATOC is not a product but rather a working prototype.

4.8. Object Oriented Issues
----------------------
* How is CHORUS Object-Oriented?
The major part (>90%) of the CHORUS microkernel is written in C++.
OO techniques are used in the implementation of the microkernel, but the
API exported by the microkernel is a traditional procedure call based
interface (like UNIX).

5. OS Personalities
================
5.1. OS personalities available on top of CHORUS?
-------------------------------------------
Chorus Systems has developed the following personalties:

- SVR4.0
- SVR3.2
- SCO ODT 3.0
- BSD4.3
- object-oriented (CHORUS/COOL)
- POSIX real-time (POSIX 1003.1b/.1c, former .4/.4a)

Others have developed, or are developing, personalities for SVR4.2 MP,
UNICOS, MacOS, CHILL, ESTEREL, TINA DPE, and a number of (proprietary)
real-time OSs.

5.2. CHORUS/MiX V.3.2
----------------

* What is the link between a u_thread and a kernel thread?
A u_thread is an abstraction, created by the CHORUS/MiX V.3.2
subsystem, on top of the microkernel threads (like a UNIX process
is created on top of a CHORUS actor). Each u_thread is mapped 1-1
to a microkernel thread. A u_thread has some UNIX-specific attributes,
like signal context, which is managed at the CHORUS/MiX subsystem
level, as an added value w.r.t. a microkernel thread.

* Which synchronisation primitives are offered to u_threads?
Sempahores and mutexes.

* Do u_threads support Thread Specific Data?
Yes, through the threadsafe C library (c_threadPrivate(3CT),
c_getPrivate(3CT)). These functions are in fact built on top of the
software registers described for the kernel threads (cf 4.1).

* How are u_threads scheduled?
By the microkernel, just like any other thread.
If one want to implement N user level threads on top of 1 kernel
thread, he need a user level scheduler in some kind of run-time
library (just like an Ada run-time schedules multiple Ada tasks
within one Ada program).

* Is there a way to calculate the size of a u_thread stack?
For dynamic calculation, the best approach is probably to fill
the stack you allocate with a specific pattern, and then at
run-time (or at thread termination) control which part of the
stack still contains the pattern. This allows to calculate
which part of the initial stack has (not) been used.

To detect a stack overflow, the classical approach is to surround
the stack by some chunks of memory that are mapped read-only.

* Is it better to put the thread stack in the data segment or in
the heap area?
The only advantage of putting it on the heap is that the corresponding
memory can be allocated (and freed) dynamically, according to the
application's run-time behaviour and needs. If you allocate it as
data, the corresponding memory is always allocated, even if your
thread doesn't exist yet/anymore.

* What are the differences between an u_thread and a c_thread?
The c_threadXxx(3CT) interface is a library, built upon the
u_threadXxx(2C) interface, and is inspired by early drafts of
the POSIX pthreads interface (POSIX 1003.4a, later renamed to
.1c). It offers a higher level interface than u_threadXxx(2C),
e.g.:

- when creating a c_thread the library creates the stack
for you, while for a u_thread you have to allocate the
stack yourself,
- there is a routine allowing one c_thread to wait for the
termination of another c_thread (c_threadJoin),
- there are routines to allocate and access per c_thread
private global data.


5.3. CHORUS/COOL-ORB
---------------

* How can I write an CORBA::Any to a file and reading it back
from file without any knowledge about the type?

Reply from <cic...@chorus.fr> on July 25th:
The idea is to fill an area of memory with the any value. The
memory must be filled in the same way COOL builds its
communication messages. Once the memory image is built, you
simply have to write it. On the same idea you can read back
the any. With this scheme, you don't need to cope with the
type of the any (and you may also not have it).


I've written a small persistent generic distributed database
on top of CHORUS/COOL ORB. It uses this technique which works
very well. (This is not CORBA but... it's cool)

Here is how you could write:

CORBA_Any any = ...
long size = ::marshalSize(any);

COOL_ComBufDesc buffer(size);
buffer <<= any;

write(fd, buffer.buffer(), size);

Here is how you could read:

struct stat st;
fstat(fd, &st);

COOL_ComBufDesc buffer(st.st_size);
read(fd, buffer.buffer(), st.st_size);

CORBA_Any any;
buffer >>= any;

* Array/sequences manipulation with CHORUS/COOL.

From <cic...@chorus.chorus.fr> Mon Sep 2, 1996:
Here is the solution for COOL ORB. With COOL you can take
the address of the first element of the array and use it as the
beginning of the buffer holding the sequence. For example:

// IDL:
typedef sequence<octet> OctetSeq;

// C++
OctetSeq* seq = ...; // Passed to the server implementation

// CORBA [] operator returns a reference to the first element
CORBA_Octet& o = (*seq)[0];

// Convert to a pointer and you get the begining of the buffer
CORBA_Octet* p = &o;

You can then optimize the extraction of your data...

* list of platforms supported for CHORUS/COOL?

For an up to date list you can look at the chorus web site at
<http://www.chorus.com/> in the COOL section. The list of
platforms supported by CHORUS/COOL r3.1 is the following:

+----------------------------------------------------------------+
| System | Compiler | Type |
|----------------------------------------------------------------|
| AIX 2.3 | gcc 2.7.2 g++ | mono-threaded |
|----------------------------------------------------------------|
| ClassiX r2.3 for i386at | Dev System r1.1| multi-threaded|
|----------------------------------------------------------------|
| ClassiX r2.3 for MVME167 | Dev System r3.1| multi-threaded|
|----------------------------------------------------------------|
| ClassiX r3.0 for i386at | Dev System r4.0| multi-threaded|
|----------------------------------------------------------------|
| Fusion r2 | SCO C++ 3.1.1 | multi-threaded|
|----------------------------------------------------------------|
| Linux 1.2 | gcc 2.7.2 g++ | mono-threaded |
|----------------------------------------------------------------|
| SCO OpenDesktop 3.0 | SCO C++ 3.1.1 | mono-threaded |
| ---------------------------------|
| | gcc 2.7.2 g++ | mono-threaded |
|----------------------------------------------------------------|
| SCO OpenServer 5.0 | SCO C++ 3.1.1 | mono-threaded |
| ---------------------------------|
| | gcc 2.7.2 g++ | mono-threaded |
|----------------------------------------------------------------|
| Solaris 2.5 | Sparc C++ V4.1 | mono-threaded |
| ---------------------------------|
| | Sparc C++ V4.1 | multi-threaded|
| ---------------------------------|
| | gcc 2.7.2 g++ | mono-threaded |
|----------------------------------------------------------------|
| SunOS 4.1.3 |Sparc C++ V2.0.1| mono-threaded |
| ---------------------------------|
| | gcc 2.7.2 g++ | mono-threaded |
| ---------------------------------|
| |Sparc C++ V4.0.1| mono-threaded |
|----------------------------------------------------------------|
|Windows NT, Windows 95 | Visual C++ 4.0 | mono-threaded |
| ---------------------------------|
| | Visual C++ 4.0 | multi-threaded|
+----------------------------------------------------------------+

* Implementation of COOL_Mutex and COOL_Sem?

Reply from <cic...@chorus.fr> on April 7, 1997:
COOL_Mutex/COOL_Sem are based on the underlying operating system
primitives. That is: mutexGet/mutexRel/semP/semV on CHORUS/OS,
mutex_lock/mutex_unlock/sema_wait/sema_post on Solaris 2.5, and others
on Windows etc...

* How to compile the demo examples of CHORUS/COOL-ORB r4.1 for
debugging purposes?

You must use: make CXXDEBUGFLAGS="-g -O"

* We are using Orbix 2.2 on NT 4.0, and want to create many CORBA objects
per process (at least several thousands to tens of thousands).
From our tests it seems that the time it takes to allocate such objects
is in linear relation to the number of objects.
Has anyone tackled this problem successfully ? Do other ORBs have a
more efficient solution to this problem ?

<From cic...@dimba.chorus.fr Fri Aug 29, 1997>:
In COOL ORB, the registration depends on the OA that you are using.
The standard OA proposed by COOL uses a hash table for this. This scales
quite well. You can imagine to provide a new OA that registers in a binary
tree (balanced tree would be even better).

To support billions of objects, you should have a look at the Variable
Sized Object Reference feature that COOL ORB supports. A single servant
can be used by many objects: the object reference always refers to the
same servant BUT it also contains additional data which is specific to
the object. Have a look at the 'simpleTree' demo which illustrates a
binary tree and only one servant for referencing all the nodes. Your
tree can contain billions of nodes, you will always have a single servant.

In the next release, COOL ORB will propose a new OA that supports compounds
of servants. This will allow you to register many servants (any type) in
a single registration call to the OA.

Note that beside the performance aspect that you are facing, there is a
memory problem too. Each time you register a servant, the OA needs to
allocate some memory to record it. If you want to support billions of
servants, you must consider this. Having a single servant for implementing
many objects is a first way to reduce the memory usage. Using the
compounds OA is another way.


5.4. CHORUS/ClassiX
---------------

* I am trying to write an experimental network protocol on top of
CHORUS/Classix and found that I get Segmentation fault...

<From ma...@crf.canon.fr Tue Sep 30, 1997>:
Wrong Imakefile: the ndm library is missing in the libs part of the
ClassiXSupProgramTarget macro.
As the actor is a relocatable supervisor actor, the ndmGetMajMin routine
is left undefined in the binary, leading to the segmentation fault.

In you Imakefile you should have:

SRCS = hello.c

LIBS = $(MERGEDIR)/lib/ndmlib/ndmlib.s.a ClassiXSupLibs
ClassiXSupProgramTarget(hello, hello.o, , $(LIBS), ClassiXReloc)
DependTarget()

6. Other software
================

* We are looking for a ISAM file library or a lightweight database
(in terms of storage, runtime overhead and price!) running under CHORUS
(or under BSD UNIX 4.2 if the source code is available).
So far, I found two candidate libraries. The first one is the famous
C-ISAM; However Informix doesn't sell this product anymore (at least not
in Germany). The second one is called CQL++ of Machine Independent
Software Corporation, Scottsdale, AZ. Has anyone heard of it or even
used it in a software project, respectively?

<From scr...@ix.netcom.com, Wed Aug 27, 1997>:
Mix Software (Richardson, Texas) also sells for *cheap* an ISAM
database library using b+tree indexing. Source is available,
and the package includes a nice manual describing the library.

See http://www.mixsoftware.com/product/database.htm


Reply all
Reply to author
Forward
0 new messages