1.0 MachTen CodeBuilder

1.1 The CodeBuilder Desktop
1.1.1 CodeBuilder's Traditional Desktop
1.1.2 CodeBuilder's AfterStep Desktop
1.2 The CodeBuilder "UNIX Virtual Machine"
1.3 The CodeBuilder Architecture
1.3.1 Dynamic Memory Configuration
1.3.2 Dynamically Linked, Shared Libraries
1.3.3 Memory Mapped File Access
1.3.4 Integrated Software Development Tools
1.3.5 Native Fast File System

1.0 MachTen CodeBuilder

A Powerful Macintosh Software Development Tool Suite


Welcome to CodeBuilder, a powerful and unique Macintosh development tool suite for porting existing applications or developing new, advanced applications on Power Macs and Power Mac clones.

MachTen CodeBuilder is a Power Macintosh application that includes a complete suite of C, C++, Objective-C, Fortran, Ada and Java development tools. CodeBuilder can be used in combination with standard Macintosh editors and compilers to develop UNIX applications, X applications, and Macintosh applications or to develop hybrid Macintosh/UNIX applications. CodeBuilder's PowerPC compiler suite can be used to recompile existing UNIX applications or to develop new UNIX applications. And the resultant applications can be turned into clickable Macintosh applications.

This unique toolset from Tenon gives developers the ability to create an application with a single source base not only for Power Macs under a native Apple operating system, but also for Silicon Graphics machines, SUNs, NeXT, or HP workstations. CodeBuilder gives developers the freedom to take advantage of time-tested UNIX development tools and to experiment with Java or Ada tasking, without giving up the features of their favorite Macintosh editors or compilers. CodeBuilder is a new standard in PowerPC software development.

CodeBuilder's development environment includes the GNU compiler for Ada95, the first internationally standardized object-oriented language. CodeBuilder's Macintosh Toolbox bindings let you use Ada 95 to produce native Macintosh applications. In addition, CodeBuilder includes the latest GNU compilers for C, C++, Objective-C and Fortran, and the latest GNU internet programming tools, such as Perl, tcl/tk, and expect. The Kaffe Java virtual machine lets you run your newly developed Java bytecode. Because all CodeBuilder compilers generate standard Power PC binary formats, CodeBuilder can be used in combination with any standard Macintosh compiler and debugger. And, just in case you prefer Macintosh tools, we've included such favorites as MacPerl, Alpha and BBEditLite.


1.1 The CodeBuilder Desktop

The Macintosh "desktop" is created and maintained by a Macintosh system application called Finder. When CodeBuilder is installed on your Macintosh, you still have the Finder desktop available, and you can easily switch from Macintosh applications to CodeBuilder. CodeBuilder and MacOS essentially operate as co-resident operating systems, sharing the processor and being enriched by each other's environment. Using CodeBuilder will enable you to work with Macintosh and UNIX development environments. CodeBuilder provides two styles of desktop environments.


1.1.1 CodeBuilder's Traditional Desktop

CodeBuilder's traditional desktop displays a customizable set of independent command windows. Figure 1 shows a possible CodeBuilder desktop display.

Figure 1: CodeBuilder's Traditional Desktop


1.1.2 CodeBuilder's AfterStep Desktop

CodeBuilder's alternate desktop is based on AfterStep which displays a NeXT-like desktop. This desktop requires the installation of CodeBuilder's optional X Windows software (see 2.1.1 Optional Installations). To invoke this desktop environment after X Windows has been installed, login as "cbnext" with no password.

Figure 2: CodeBuilder's AfterStep Desktop


1.2 The CodeBuilder "UNIX Virtual Machine"

CodeBuilder is based on the University of California, Berkeley UNIX built on a Carnegie Mellon Mach kernel. The Mach kernel replaces many of the Berkeley UNIX internals and provides a number of new features not available in traditional UNIX systems. CodeBuilder both refines and extends the capabilities of the native Macintosh Operating System by providing a pre-emptive multitasking UNIX environment that coexists with the MacOS cooperative sharing execution environment. With CodeBuilder, Macintosh applications, UNIX applications, Mach applications and X applications run simultaneously. CodeBuilder represents the confluence of the best features of the Macintosh and the systematic power and elegance of a UNIX development environment.

Tenon's MachTen technology is an extension to MacOS. Using standard Macintosh shared libraries and code fragments, Tenon's MachTen extends MacOS to create a UNIX virtual machine. The UNIX Virtual Machine (UVM) is implemented within the context of a standard Macintosh application program. Therefore, other existing Macintosh applications run in parallel with the UVM in a highly compatible fashion. The UVM, in turn, implements a standard UNIX API (POSIX) for a large family of traditional UNIX commands and utilities. The UVM also implements a fully pre-emptive execution environment for its applications. Since each UNIX application program is implemented as a Macintosh code fragment, UNIX applications are essentially "UNIX plug-ins". So, MachTen CodeBuilder is a highly-portable UNIX Virtual Machine that implements it's applications as UNIX plug-ins running within a Macintosh application context.


1.3 The CodeBuilder Architecture

Figure 3 shows the basic system architecture. MachTen CodeBuilder consists of a family of shared libraries. MachTen is a collection of shared libraries, the traditional UNIX libraries (libc, libm, etc.) are each a shared library, and every UNIX application is also shared. This organization takes advantage of the shared library, dynamic linking and memory mapped file access features of the MacOS and maximizes memory savings, as each software component is loaded into memory only once. Tenon's native fast file system (FFS) gives the CodeBuilder development tools access to UNIX-level performance and features.


1.3.1 Dynamic Memory Configuration

CodeBuilder dynamically scales its memory requirements while the system is running. As more applications are initiated, the system brings in the necessary support so that the memory consumption grows as user requirements demand.

This memory configuration occurs along two axes: first, the system adjusts its memory data tables as each new application is initiated, with more applications requiring more memory; second, the system configures itself functionally, with each new application potentially requiring system components to be brought into memory. This continuous reconfiguration results in improved utilization of memory and processor resources and supports a range of application needs.


Figure 3: CodeBuilder System Architecture


1.3.2 Dynamically Linked, Shared Libraries

The PowerPC Executable Format (PEF) is based on the concept of dynamically loadable, shared libraries. In this architecture, software is composed of a private space and calls to shared libraries. When an application is created, a definition library is used to satisfy compiler header call definition requirements. When an application is executed, a runtime version of the library is used to satisfy library calls. If that library has already been loaded into memory, access is obtained to the runtime library through a dynamic linkage process. Otherwise, the library is loaded into memory and then dynamic linkage occurs. When the last client of a shared library has completed processing, the library is deallocated and its memory is reclaimed.

Compared to static linking used in traditional UNIX systems, dynamic linking results in much smaller binary images, reducing both system memory requirements and disk footprints.


1.3.3 Memory Mapped File Access

The Power Macintosh Memory Manager provides file mapped memory access for programs. Allocation of application instruction memory is deferred until an actual reference to a specific 'page' of instructions is made by the application. Only then is memory allocated and the specific 'page' of instructions copied into memory from disk. This is a significant benefit for large libraries that are only used a little-at-a-time.


1.3.4 Integrated Software Development Tools

MachTen CodeBuilder creates binary PEF files that integrate directly with other Macintosh development tools. Software produced by development systems from Apple, Metrowerks and others may be freely intermixed with the output of the CodeBuilder development system. With CodeBuilder, UNIX software development tools can be used to generate Macintosh applications and Macintosh software development tools can be used to generate UNIX applications. This enables developers to build hybrid applications that make both MacOS and CodeBuilder system requests. Such hybrid applications will be able to simultaneously take advantage of the power of the MacOS and UNIX.


1.3.5 Native Fast File System

MachTen CodeBuilder uses a derivative of Berkeley's BSD Fast File System to dramatically increase speed and save space. The Fast File System circumvents the limitations imposed by the Macintosh Hierarchical File System. More information about the Fast File System (FFS) is available in section "6.3 CodeBuilder FFS".


[Top of Page ][ 2.0 A Roadmap to the CodeBuilder CD ][ Table of Contents ]