[Prev][Next][Index][Thread]

New OSKit Snapshot oskit-990722



Date: Thu July 22 1999

We are making this snapshot to get out a large amount of new code for
testing before making an official release of it. Much has changed,
including some changes to how OSKit kernels should initialize themselves.
Please take a look at the example programs in examples/x86 to see what
needs to be done. As a companion to this release, there are two new
substantial demonstration kernels available from the OSKit web page; an
"fsck" kernel FreeBSD disk partitions, and a kernelized version of the
popular "rsync" program.

As before, go to http://www.cs.utah.edu/projects/flux/oskit/
and everything hangs off there; currently mostly in ftp.

A number of changes and fixes are contained in this snapshot:
	Rework of the C and POSIX libraries to remove all linktime external
	dependencies. All external interfaces are now accessed via a
	services database that is provided to the C/POSIX library when the
	kernel is initialized. The clientos library (described below) is
	responsible for setting up the services database, as well as the C
	library environment object that contains an assorted collection of
	interfaces that only the C/POSIX library are interested in (such as
	the console stream, the filesystem namespace, the memory allocator
	for malloc, the sleep interface to give up the CPU in select,
	etc.).

	Addition of a new "ClientOS" library to encapsulate and initialize
	many of the interfaces that an application program is dependent on,
	typically through the C/POSIX library. The clientos is a mandatory
	library that is responsible for initializing certain core
	interfaces, such as the memory object (lowest level allocator), the
	global registry, the C library environment object, and the default
	console stream object. See the Client Operating System
	(doc/clientos.tex) chapter in the documentation, as well as the
	example programs for the new initialization sequence (notably, the
	requirement of a call to oskit_clientos_init() in all OSKit
	kernels).

	Addition of a new Dynamic Linker/Loader (RTLD) library to allow ELF
	format OSKit kernels to dynamically load ELF format shared
	libraries (.so) files. This code is imported from the FreeBSD 3.0
	rtld-elf library, and is contained in the rtld directory. See the
	RTLD chapter in the documentation, (doc/rtld.tex) and the
	demonstration kernel in examples/dyntest.

	Lots of improvements and additions to the "startup" library.
	Although still undocumented, the startup library is intended to
	insulate the application program from the details of initializing
	many devices and subsystems, and to aid in setting up the client
	operating system. All of the example programs (sans one or two
	maybe) now use the startup library for most of their device and
	subsystem initialization. See the example programs in examples/x86.

	Completion of the "services database" COM interface and
	implementation.  The services database is a registry that maps GUID
	to COM object instantiation. Its original implementation allowed
	for a single global registry accessed by global functions. The
	implementation is now complete, and allows per-object
	instantiation. The global registry is now an instantiation of such
	an object, but for backwards compatibility, is still accessible
	through the original global function calls. See the Interface
	Registration (doc/register.tex) chapter in the documentation.

	Addition of a new filesystem namespace component. All pathname
	translation has been moved out of the POSIX library and into the
	oskit_fsnamespace component, which also encapsulates mount/unmount
	and mountpoint traversal. Also does symlink traversal. See
	oskit/fs/fsnamespace.h. In addition, a pathname cache (much like
	the "namei" cache in the unix FS) was added to prevent repeated
	entry into the driver framework to do directory lookups. This
	resulted in huge performance improvements (up to 6x) in programs
	that make heavy use of pathname translation (eg: rsync). The
	improvement was especially pronounced in multithreaded programs,
	where each entry into the driver framework results in the process
	lock being taken and released.  See the fsnamespace chapter in the
	documentation (doc/fsnamespace.tex), and the startup library
	(startup/start_fs.c) for example usage.

	Pthread library: Rework the mutex/condition code. Some general
	clean up, and now allows statically allocated and initialized
	mutexes and condition variables.  A statically allocated mutex or
	condition will be properly initialized the first time it is used if
	the program does not arrange for that to happen explicitly. Also
	added sigwait, sigwaitinfo, sigtimedwait and sigqueue to the
	multithreaded version of the signal code. Add documentation for the
	CPU Inheritance framework to the pthread chapter.

	Add small amounts of support for rsync and fsck kernels. More
	additions to the C (added stuff that was previously excluded) and
	POSIX library (some tty ioctls, getpass, lots of trivial stubs to
	allow linking).  Added asyncio I/O support to the COM pipe
	implementation since rsync uses pipes with select. Some fixes to
	the network code to make sure that connections to a server get torn
	before the oskit reboots, and to make sure a new initial segment
	value gets chosen so that the server side is not confused by a new
	connection with an old segment value.  This was causing failed
	connections from the rsync client to the rsync server when doing
	quick reboots. Much improved versions of memset, bzero, bcopy,
	memcpy, etc (from NetBSD). Make sure all open files are closed
	before the oskit reboots, so that all files are flushed to disk and
	the disk can be cleanly unmounted.

	A number of GPROF fixes and improvements when using the FreeBSD C
	library. Certain errors (such as no a.out file) no longer result in
	a partly written gmon.out file. This allows postmortem dump of the
	gprof data, rather than having it dumped out on the console. Also
	added a start_gprof() entrypoint to get the gprof code running in
	main, since it is often the case that you do not want to count the
	initialization code, or even have to worry about it. See
	examples/x86/hello.c for an example program that uses
	start_gprof().

	The memfs now understands internal vs. external links (akin to
	internal and external inode link counts in UNIX), which allows more
	precise cleanup semantics and fixes memory leaks in some usage
	patterns.  Several global variables were eliminated in favor of
	per-instantiation variables.  Stat now returns more accurate
	information about the file.

	The simple console now uses COM Stream wrappers for the console
	drivers (direct, gdb, serial).  Simplified base_console to use the
	COM wrappers and separated out initialization into
	base_console_init.c making it easier to override just the
	initialization.

	A fair amount of documentation reorganization, as well as some
	additional chapters. The OSKit web page also reflects these
	documentation changes (unlike the previous snapshot). 

	Osenv stuff. All of the "osenv" interfaces in the device library
	have been COMified, and are exported to the device driver
	libraries (Linux, Freebsd, Netbsd), which have been reworked to use
	the dynamic interfaces, rather than static linktime dependencies on
	the device library itself. These changes are not well documented
	yet, but if you stick to using the "startup" library to initialize
	your kernels, you should not have to worry about it much. Feel free
	to ask us questions though.