UOS Technical Specification
Preface
This document is intended to briefly list the UOS features which have not yet been (completely) implemented. The UOS documentation can be referred to for those features which have been implemented. It is less of a specification and more of a general guideline for features of UOS. The OpenVMS documentation provides the specification from which UOS is being developed.
1 Goals
The goals of UOS are as follows:
1) An operating system where the basic components are free and freely available.
2) Well documented for general users, programmers, and system administrators.
3) Reliable.
4) Secure.
5) Portable across diverse hardware platforms.
6) Able to run popular software under emulators.
7) Multi-user, multi-tasking.
8) Component architecture.
9) Scalable.
Other desried specific features:
1) Easily customizable by the end user.
2 Introduction
UOS is a public-domain general-purpose, multi-user, multi-tasking, multi-
threading, resource-sharing operating system. The design of the operating
system is one of interchangable components. The kernel is the one unchanging
piece. Components may be connected to the kernel to customize the system.
However, the MMC (memory manager) and SHMC can only be changed at startup time.
The kernel provides a consistent environment regardless of the customizations.
The following are the components and sub-components of UOS:
3 Architecture
UOS consists of several layers of software, each one abstracting above the
lower levels. The lowest level is the Hardware Abstraction layer and
consists of the hardware interface. The Executive (Operating System proper)
sits on top of the Hardware Abstraction layer. The Executive consists of
the Kernel, which interfaces the Hardware Abstraction layer to the OS
components, and the components themselves. The Kernel also coordinates the
activities of the various components.
4 Hardware Abstraction Layer
The Hardware Abstraction Layer (HAL) is a series of objects which encapsulate
the various hardware functions. A pointer to the HAL object is passed to the
Kernel by the Initializer at system startup. The Kernel can then request
handles to the other objects and use them as desired. See the HAL document for
details.
5 Memory and MMU
The MMU is used to allocate and manage memory. It is used by drivers and
other parts of the O/S. When something requests a buffer, the MMU can refuse,
in which case the caller can try again (after deleting other buffers) or abort.
I/O Buffers:
Drivers only request I/O buffers for unsolicited input. Solicited input always
provides a buffer address. Solicited input is that which is requested via an
I/O request. Unsolicited input is an asynchronus event (key click, mouse
movement, etc).
Each I/O buffer has an ID and flags to synchronize multi-processor access.
The ID is 0 if the buffer is not being accessed. It is the processor ID
otherwise. Flags indicate how other processors can access the buffer:
Flag bit | Meaning |
---|---|
1 | Read allowed |
2 | Write allowed |
4-128 | reserved |
6 Interrupts
In order to provide emulation capabilities for other operating systems,
the Kernel provides interrupt redirection. A process may associate any
interrupt with a call-back routine. It may also set the interrupt to be
used for accessing the UOS Kernel.
Interrupt Services:
function Set_OS_Interrupt( integer ) : integer
Sets the interrupt this process will use to
access the Kernel. Returns 0 if success, an
error code otherwise. Errors can occur if
the requested interrupt is reserved for
hardware. Only one Kernel interrupt can be
set at a time, so this overrides any previous
call. Only affects the calling process.
function Set_Interrupt( integer, procedure ) : integer
Sets the specified interrupt to call back to
the specified procedure. Returns 0 if success,
an error code otherwise. Errors can occur if
the requested interrupt is reserved for
hardware. Only affects the calling process.
procedure Clear_Interrupt( integer )
Unmaps the specified interrupt from any
associated callback for this process.
7 Timers
The kernel timer routines provide ways to time events. Drivers can call
the timer routines to time-out I/O requests. Timers may be one-shot or
repeating.
8 Multiprocessing
The kernel supports two types of multiprocessing:
Network - uncoupled processors |
Coupled - Two types: - Loose (like VAX Cluster) - Tight (multiple CPUs) |
9 System Startup
UOS startup has three distinct steps.
1. Bootstrap execution. The bootstrap program is written to the media when
a bootable device is desired. The bootstrap is responsible for loading the
UOS initializer and the File System component into memory. The File System
component must be compatible with the file system on the boot media. The
Kernel and File System component must be on the media, and must be
contiguous. The bootstrap is written to the media with the logical block of
the start of the Kernel and File System component, and the length of them,
in bytes. The bootstrap loads these components into the lowest available
memory address, writes the starting address of the File System component to
a known memory address, which the initializer will then use to marshall the
File System Component. This address will immediately follow the last
address of the Initializer. The bootstrap also writes the last used address
to a known memory location. Then the bootstrap transfers control to the
initializer.
2. Initialization. The initializer has a standard version of all of the
components built in, except for the File System. The Initializer does the
following steps:
10 The System Console
The first unit of the first physical terminal controller (TermA0:) is, by
definition, the system hardware console (SHC). Any type of terminal device
can be designated as the System Console. Unless otherwise defined, the SHC is the
system console. If a designated system console becomes disabled or stalls long
enough to fill its output buffer, it is unassigned as the system console and
the SHC is used as the system console. All system messages are directed to the
system console.
11 Data Integrity
Data integrity is provided with the following options:
- Verify on read
- Verify on write
- Verify on read and write
- No verification
Verification can be set at the following levels:
- System
- User
- Process
- File
- Disk
12 Files
There are three types of files: Persistent, Permanent, and Temporary.
Persistent files are those on a volume which are created by the user.
Permanent files are those which are open only for the duration of a process.
Standard permanent files are INPUT, OUTPUT, ERROR, etc. Temporary files are
those which are deleted when the image runs down.
13 Statistics
Four types of statistics are kept by the system:
Kernel | statistics by service (CPU time, call count, etc) |
Process | Statistics for the process (paging, I/O, CPU, etc.) |
Image | Statistics for a run of an executable (paging, I/O, CPU, etc.) |
I/O | Statistics for I/O operations (max simultaneous users, locks,
caching, opens, reads, writes, etc). Two categories: File - Statistics for individual files Overall - For the system as a whole since last startup |
14 Command-line processor
The default command-line processor (shell) is called UCL.
A single colon (":") can be used to reference the last directory/file
specification that was used in UCL.
15 System Utilities
The following standard utilities are provided with UOS:
Name | Synopsis |
---|---|
ALLOCATE | Allocate device access |
APPEND | Concatenate files together |
ARCHIVE | Invokes file compressor/archiver |
ATTACH | Attach to detached process |
Backup | File backup/restore. |
BASIC | BASIC interpreter. |
Batch | Batch queues. |
BROADCAST | Send message to terminal(s) |
Browser | Internet browser (WWW, FTP, Gopher). |
CDD | Common Data Dictionary. |
CREATE | Create an empty file |
Debug | Symbolic debugger (shell). |
DELETE | File deletion |
DETACH | Detach from process |
DEALLOCATE | Deallocate device |
DEPOSIT | Write to virtual memory. UCL command. Only if current image <= current privilege. |
DIR | Directory listing |
DISMOUNT | Dismount a device |
DUMP | Output contents of file or device in hex and decimal |
EXAMINE | Examine virtual memory. UCL command. Only if current image <= current privilege. |
FORMAT | Format media and/or hook a bootstrap to it. |
FTP | FTP utility |
Link | Executable linker. |
Electronic mail (web and local). | |
Media | Media player. |
MOUNT | Mount a device |
MOVE | File move |
Phone | Multi-user communication (VOIP, IM, Chat). |
Printer queues. | |
PURGE | Removes old versions/backups of files |
QUE | Invokes the print/batch queue manager |
RENAME | Rename a file |
REQUEST | Send request to system operator |
Search | Text search (simple, regular expression) |
SET | Set user preferences or file/device settings |
SHOW | Show user preferences or file/device settings |
Sort | File sort. |
SPAWN | Spawn a process |
SUBMIT | Submit a batch file to queue |
SYNCHRONIZE | Pause process until another process completes |
SVM | Sirius Virtual Machine. |
SysConfig | System configuration. |
Task | Task manager. |
TYPE | Output contents of file |
UEU | File Editor. |
UDB | Basic relational database. |
USS | Simple spreadsheet. |
WAIT | Pause process for a specific amount of time |
Name | Synopsis |
---|---|
JOB | Marks start of job |
16 I/O Processing
Kernel I/O routines are routed through the File Processor. The general
procedure for an I/O operation is as follows:
17 File Processor
The File Processor handles all file and device operations for the O/S. It
can connect to multiple file systems and/or devices. A file system is a driver
which is associated with one or more device drivers. The File Processor also
allows direct device access from applications, but only when mounted in NFS
(Non-file-structured) mode.
At open time, file access is determined. Files can have the following
access modes:
Single user | Only first user to open can access. | ||||
Mutli-Stream | Only a single process can open, but multiple streams can simultaneously access it. | ||||
Multi-User | There are two types, based on locking:
|
Function | Description |
---|---|
Append | Appends to a file. |
Compare WC | Compares a string and a wildcard and returns true/false if a match. Always false if string contains any wildcard characters. |
Close | Closes a file or device. |
Create Directory | Creates a directory. |
Create File | Creates a file. |
Delete Directory | Deletes a directory. |
Delete File | Deletes a file. |
Delete Record | Deletes a record from a file. |
Extend | Extends the file length. |
Flush | Flush data to file or device. |
Locate | Locates a record by key (indexed files only). |
Lock | Locks records in a file. This can be write locks (others can still read) or complete locks (only this process can access). |
Open | Opens a file or device. |
Read | Reads from a file or device. For files, the read can specify whether and how to lock. It can Wait-For-Locks which will wait until a lock on the requested record is released and then read it (a potential deadlock situation). A time-out for the read operation to complete is allowed. |
Rename | Changes name of file. If file is renamed across devices, the file is copied first, then the old copy is deleted. |
Reset | Initializes file or device access. |
Translate WC | Given a string and a wildcard, returns the string translated via the wildcard. |
Truncate | Truncates a file. |
Unlock | Unlocks records in a file. |
Update | Updates a record in a file. |
Property name | Description |
---|---|
$COMMAND | File specification of Command completion interface. When a shell command is associated with this file, this is the program which provides command completion for the shell. |
$COMMENTS | User comments associated with file. |
$CONVERTER | (List of) file specification(s) of program(s) used to convert file to another format (see Data Converters). |
$DATA | The file's contents. |
$DEFAULT | (List of ) file specification(s) of file(s) with default properties for this file. If desired property is not defined for this file, the files in this list will be used, in order, to find the property. When found, that property value is used for this file. |
$DELETE | File specification of program called to delete file. One standard program is File_Erase which overwrites all data and properties when deleting the file. |
$EDIT | File specification of program used to open the file for editing. |
$FILE_SYSTEM | File specification of program used to interface to this file as a self-contained file-system. |
$HELP | File specification of help file for this file. |
$NAME | The file's full name (not including path). |
$OPEN | File specification of program that provides a file interface to the file (non-raw access) for other programs. |
$SEARCH | File specification of program used to search this file for text. |
18 Locking
Locking of file records and other resources is accomplished by the Lock
Database Manager. It also detects deadlocks. File record locking has the
following modes:
None (Explicit) | user must specifically lock/unlock each record |
Implicit (default) | Current record is write-locked for other
processes/streams. Any read operation causes this lock (unless
read specifies otherwise - read regardless). An implicit
lock is released on any of the following conditions:
|
19 File Systems
A file system is a collection of files, directories, etc. on a device. A
device may be a physical device (disk), or a logical device (partition, file,
etc.) An executable may be associated with a file system so that it is
executed when the device is booted from. Only physical devices may be
booted. A file system on a logical device with a "boot" executable can be
executed as any executable file, in which case the associated executable file
is executed. Thus, a package of one or more executables and files may be
placed into a file system file, resulting in a single file for installation.
Files have version numbers. If a directory has a 0-version limit
(the default), then files have no versions and utilities create
.BAK files when changes are made.
19.1 File System Drivers
A File System is defined by a File System driver and an associated device.
The following defines the procedures and functions required for a UOS File
System driver:
function Driver_Version : word ;
This indicates the version of this device driver. Drivers
conforming to this specification must return 0.
function Get_Capabilities : longint ;
Returns flags indicating the capabilities of this file
system:
FSCapable_Indexed Capable of Indexed I/O.
FSCapable_Records Capable of record I/O.
function Append : longint ;
Appends to a file. Returns 0 for success or error code.
procedure Close( Handle : longint ) ;
Closes the specified file.
function Create_Directory( Path : string ) : longint ;
Creates the specified directory. Returns 0 for success or
error code.
function Create_File( Name : string ; var Handle : longint ) : longint ;
Creates a file with the specified name (including path).
Returns 0 for success or error code. Handle is ignored when
passed, and the file handle on return, if successful. If the
file already exists, it is deleted before the file is
recreated.
function Delete_File( Path : string ) : longint ;
Deletes the specified file or directory. Returns 0 for
success or error code.
function Delete_Record( Handle : longint ) : longint ;
Deletes the current record from the specified indexed file.
Returns 0 for success or error code.
function Extend( Path : string ; Size : longint ) : longint ;
Extends the specified file to the specified length. Returns 0
for success or error code. If the file is already larger than
the requested size, nothing happens.
function Get_Attributes( Path : string ;
var Result : tDirectory_Entry ) : longint ;
Returns the attributes for the specified file, in Result.
Returns 0 for success or error code.
function Get_Handle_Attributes( Handle : longint ;
var Result : tDirectory_Entry ) : longint ;
Returns the attributes for the specified file, in Result.
Returns 0 for success or error code.
function Get_Position( Handle : longint ; var Position : longint ) :
longint ;
Returns the current position, in the specified file, in
Position. Returns 0 for success or error code.
function Locate( Handle : longint ; var Key ) : longint ;
Locates a record in the specified indexed file by the
specified key. Returns 0 for success or error code.
function Open( Name : string ; var Handle : longint ;
Flags, Mode : longint ) : longint ;
Opens the specified file. Returns 0 for success or error code.
If successful, the file handle is returned. Modes:
Value Meaning
----- -------
OpenMode_Output Delete existing file, if any, and
create new one.
OpenMode_Input Open existing file. Error if it
does not exist.
OpenMode_Normal Open existing file. If it doesn't
exist, create a new one.
Flags:
Value Meaning
----- -------
OpenF_Append Opens file in append mode.
function Read( Handle : longint ; var Buffer ; Size : longint ;
Flags : longint ) : longint ;
Reads from the current position in the specified file into the
specified buffer with the specified length. Returns 0 for
success or error code.
function Rename( Old, New : string ) : longint ;
Changes name of the specified file. Returns 0 for success or
error code. Files may be renamed across directories.
procedure Reset( Handle : longint ) ;
Initializes access for the specified file.
function Set_Attributes( Path : string ; Values : tDirectory_Entry ) :
longint ;
Sets the attributes for the specified file. Certain fields
and flags may be ignored, or may result in error. Returns 0
for success or error code.
function Set_Position( Handle, Position : longint ) : longint ;
Sets the current position, in the specified file, to
Position. Returns 0 for success or error code.
function Truncate( Name : string ; Size : longint ) : longint ;
Truncates the specified file to the specified length. Returns
0 for success or error code. If the file is smaller than
the specified size, nothing happens.
function Update( Handle : longint ) : longint ;
Updates the current record in the specified indexed file.
Returns 0 for success or error code.
function Wildcard_Lookup( var Path : string ; var Context : longint ) : longint ;
Perform wildcard lookup. Returns 0 for success or error code.
If Context is 0, the wildcard passed in Path is looked up.
Path is set to the path and name of the located file and
context is set to an internal non-zero value. For the same
set of lookups, the context should be set to zero for the
first call and unmodified by the user for subsequent calls.
On subsequent calls, the passed Path is ignored and contains
the next matching wildcard on return.
function Write( Handle : longint ; var Buffer ; Size : longint ;
Flags : longint ) : longint ;
Writes to the current position of the specified file from the
specified buffer with the specified size. Returns 0 for
success or error code.
20 Devices
All devices have a software driver (see Device Drivers) through which the
O/S accesses them. A device may be referred to with the construct:
<drivername><ID><unit>
where
A device can be opened as a file by specifying the above identifier. A
controller can be opened by leaving the unit number off, in which case direct
access to the controller functions is allowed.
Standard devices include disks, tapes, terminals, psuedo-terminals, virtual
terminals, network interfaces, printers, and virtual disks. Disks may be
R/W, RO, or WORM.
21 Processes
Processes are the minimum unit of resource allocation. All processes are
owned either by another process, or directly or indirectly by a task. Each
process has a numeric ID (PID) unique to the OS. This ID is combined with
the system ID to create a cluster-wide PID, or CPID.
Only one process may be attached to a physical device at a time. Thus, when
spawning, the device is reattached to the spawned process (unless otherwise
requested by the user). If the only process of a task is detached, then the
task becomes detached. A detached task can run in the following modes,
depending on user privileges, and detachment mode:
22 Security Management Component
Security is implemented as protections on objects and privileges for the
processes which access them. Objects for which security is managed:
23 Programming Services
Programming services are system services provided to ease programming and
provide a consistent set of functions.
EBCDIC to ASCII
ASCII to EBCDIC
CRC computation
BNF compiler
24 Process Management Component
The smallest atomic unit of processor execution allocation is the Thread. A
Thread is any given stream of instructions executed on a processor. Threads
can only execute on a single processor without being swapped out and back in.
Each thread is owned by a Process. Except for co-processing, there is a
one-to-one correspondance. Although a thread can only have a single parent
process, a process can have multiple threads. Each process is owned by a task
or a parent process. A task associates all of its processes, and their threads,
with a user for purposes of privilege, protection, resource logging, etc. A
process can only have one associated task, but a task can have multiple
processes. Threads and processes have IDs, which are long integers. Processes
have the high bit set (negative values), whereas threads do not. Tasks also
have a long integer ID. These IDs are unique across the system.
Some of the differences between tasks, processes, and threads:
Task | Process | Thread | |
---|---|---|---|
Processor | Owned by OS | Owned by task or parent process. | Assigned to a specific processor. |
Memory | n/a | Separate address space for each. | Shares code and data with process. Owns separate stack. |
Other | Can send/receive data to/from other threads. | ||
Lifetime | Until deleted. | Until deleted or task deleted. | Until termination or Process deleted. |
Termination | all resources released. | All threads terminated and all memory released. | Stack space released. If this is the only thread of the process, then if the process is attached to a terminal or screen, a new thread is started for the shell. Otherwise, the terminal/screen is attached to the root thread of the process. |
Exceptions | n/a | n/a | Exceptions are reported to the thread to which they apply. If a terminating exception occurs, then if this is a co-thread, the exception is reported to the first thread of the process. If the process terminates due to a terminating exception in its only thread, the exception is reported to the first process of the task. |
Spawn_Thread | Spawns a thread and returns its ID. Returns a negative value if failure. |
Get_First_Task( context ) | Returns ID of first task in system. |
Get_Next_Task( context ) | Returns ID of next task in the system for this context. |
Get_First_Thread( Process, context ) | Returns the ID of the first thread for the specified process. |
Get_Next_Thread( context ) | Returns the next thread ID for the context. |
25 Errors
Text for errors is kept in a file called UOS_ERRORS.TXT, which is always
open. The Kernel supplies a routine which will return the text for an
error code. If the requested code does not exist, the service returns
"ERROR #n" as text. The Kernel startup code opens this file on the boot
device.
Errors which occur as a result of OS overhead (not assignable to a
specific user or process) are logged in the Error Log file. Any error which
occurs during error logging results in a fatal bugcheck (system reboot).
26 I/O Filters
Filters can be attached to a terminal in order to convert input or output.
27 Users
The O/S manages resources based on user identifiers (or simply, "users"),
their privileges, and resource protections. User names (identifiers) are 1 to
127 alphanumeric characters. Each user is a part of one or more groups.
When a user is deleted from the user database, all references to that
user on all mounted devices are removed, including mail, ALCs (local disks
only), etc. Files owned by the deleted user are set to ownership by the
user who deleted the old user.
28 Symbols
The Kernel provides named storage in memory for processes called symbols.
Using a symbol, followed by a colon, in a file specification causes that
symbol name to be replaced with its associated text. Thus, if a symbol named
"Sym" had a value of "X:\Y\", and a file specification was passed to the O/S
as "Sym:A.B", the file referenced would actually be "X:\Y\A.B". Symbol case
is insignificant.
A special case is the executable symbol which has the executable flag set
and whose value is a program which is executed when the symbol is referenced.
The program's return value is used as the translation value for the symbol.
When a symbol needs to be translated, the Kernel looks at the process table,
and if not found, proceeds to the task (top-level parent process) table, and
so on up to the system table (shared with all processes on the system). To
specify which table to use, a symbol can include an override. Format:
name{[override {,override...} ]}
where "override" is the override specifier. More than one override can be
specified; the tables are searched in the order specified. For example, to
refer to the symbol "Sym" in the system table, use "Sym[A]". When a user
belongs to multiple groups, the group-level table for the task (and all
sub-processes) becomes the union of all group tables: The group table is built
for the task starting with the first group and moving to the last (listed),
ignoring duplicates.
The following standard symbols are provided:
Symbol Name | Type | Description |
---|---|---|
SYS$CURRENT | Process | Current directory path. |
SYS$SHUTDOWN | System | Contains the date and time of the next scheduled shutdown (if one in progress). Null if none. |
SYS$PERFORMANCE | System | Contains the MIPs rating of the fastest (or only) available processor in the CPU. |
29 System Services
System services are POSIX compliant. Additional system services can be
loaded by the user.
30 Groups
Groups provide a way of assigning privileges to users. A user can be
assigned to one or more groups. A group may descend from another group.
Descendant groups receive the privileges and restrictions of their parent.
Each group can add to the privileges or restrictions it inherits from its
parent. A user can belong to multiple groups, in which case their access is
based on the maxmium of all groups they belong to.
All groups descend from the System group, which grants all privileges.
System Administrators usually have user names associated with this group.
The "General" group descends from the System group and grants no privileges.
Most users are associated with the General group.
31 Logicals
While O/S initializing builds a list of devices, it also creates logicals
of the form: <class><unit>
For example: TAPE0
Valid classes: TERMINAL
DISK
PRINTER
SOUND
TAPE
NULL
32 System Parameters
The following are system parameters that are changable by users of sufficient
privilege:
Parameter Name | Type | Description |
---|---|---|
BATCHLIMIT | long | Default batch job limit (number of batch jobs simultaneously running on system). |
CPU_QUOTA | long | Default CPU seconds allowed for a process before the system terminates it. 0 (default) means unlimited. |
DATACHECK | special | Verify data from random-access devices on: Read Write Both None (off) |
DEFPRIORITY | long | Default priority for processes. |
DEFPROTECTION | special | Default protection for newly created files. |
DEFQUEPRIORITY | long | Default queue priority. Default value is 65,536. |
DIRCACHE | long | Amount of memory to reserve for directory caching. 0 (default) indicates to use whatever memory is available. |
DISK_QUOTA | long | Default diskquota upon logout, in bytes. 0 (default) means unlimited. |
DORMANT | long | Number of seconds to wait until a blocked process can be swapped out. |
EXTRA_CPU | long | Number of CPU seconds allowed a task for exiting when it is terminated due to exceeding CPU limit (CPU_QUOTA). |
EXTRA_DISK | long | Disk overdraft (DISK_QUOTA + EXTRA_DISK = absolute disk quota). Default is 0. |
MAP_CACHE | long | Amount of memory to reserve for disk map caching. 0 (default) indicates to cache entire disk map for all devices. |
MAXQUEPRIORITY | long | Maximum queue priority for non-privileged users. Default is 16,777,215. |
MEMORY_QUOTA | long | Default maximum virtual memory allowed for a process. 0 (default) means unlimited. |
MEMORY_SIZE | long | Maximum physical memory. 0 means autoconfigure. |
REBOOT | boolean | True to reboot on a bugcheck crash (default). False to halt on bugcheck crash. |
REBOOT_WAIT | long | Number of seconds to wait for a console response when rebooting before continuing 0 (default) means infinite. |
TASK_LIMIT | long | Maximum number of top-level processes allowed at one time. |
TASK_QUOTA | long | Default user task quota (number of top-level processes belonging to a given user simultaneously). 0 (default) means unlimited. |
TERM_LOGIN | long | Number of times a user can try to login before hangup or evasive action. |
TERM_LIMIT | long | Number of seconds terminal is disabled when evasive action occurs. |
TERM_WIDTH | long | Default terminal width. Default value is 80. |
TYPE_AHEAD | long | Size of terminal type-ahead buffers. |
33 Device Drivers
Device Drivers are the lowest level software and are in direct control of the
hardware. Driver API functions are described in the following text. Function
vectors which are inappropriate to a specific device must be 0. Unless
otherwise stated, if a function is used for a specific device type, that
function must exist for a driver for that device type. Access to driver
functions is through a vector table at the beginning of the driver. The
vector for each function is shown at the right margin after the function
definition.
function Driver_Version : word ; 0
This indicates the version of this device driver. Drivers
conforming to this description should return 0.
function Max_Units : word ; 1
Returns the maximum number of units for this controller.
For single-device controllers, this is 1.
procedure Set_Status( Unit : byte ; Status, Error, Density : longint ) ;
2
Sets the device status. See Get_Status for details.
function Get_Status( Unit : byte ; Status, Error, Density : longint )
: longint ; 3
Returns the current device status, error code, and density.
Density is the tape drive density (in bpi); it is ignored for
other devices and for tapes which cannot change density.
Density should be 0 for devices which cannot change density.
Error is an error code (see Errors). Status is standardized
status-code used by the operating system, consisting of the
following bit flags (items with asterisk cannot be set with
Set_Status):
Status_AGC | AGC is on for microphone input on sound card. |
Status_AllowInterupts | Interrupts are allowed by the device. |
*Status_BOT | At beginning of tape. |
Status_Break | Break received. |
Status_CorrectedError | A corrected error occurred. |
Status_DataCheck | A non-correctable CRC error occurred (parity error on character devices). |
Status_DoorLocked | Door is locked on CDROM. |
*Status_DualAccess | Device is in dual/multi-access mode. |
*Status_EOT | At end of tape. |
Status_FrameError | Frame error (character devices only). |
Status_Graphics | Video device is in graphics mode (otherwise in text mode). |
Status_InputFilter | Use input filter for sound card. |
Status_Interlace | Interlaced display. |
*Status_LEOT | At/past the Logical End Of Tape. |
Status_Loaded | Heads/tape loaded. |
Status_Missed | Transfer missed due to prior error. |
Status_NoECC | Don't perform error correction. |
Status_NoPaper | No paper in printer. |
*Status_Open | Cover/door is currently open. |
Status_OnLine | Device is on-line. |
Status_OutputFilter | Use output filter for sound card. |
*Status_Overrun | Data overrun. |
*Status_Random | Device is random-access (sequential-access otherwise). |
*Status_Read | Reads are allowed. |
*Status_Ready | Device is ready (on-line and not busy). |
*Status_Retrace | Vertical retrace is ocurring. |
*Status_SeekError | Seek to invalid sector. |
Status_SmoothScroll | Smooth video scrolling. |
Status_SpeakerOn | Speaker is on. |
*Status_SplitSpeed | Different Input and Output speeds are allowed for this character device. |
Status_Stereo | Input is stereo. |
Status_Timeout | Device timed out. |
*Status_Unloadable | Device can be unloaded. |
Status_Verify | Verify writes. |
*Status_Write | Writes are allowed. |
Value | Meaning |
---|---|
0 | Replace |
1 | AND |
2 | OR |
3 | XOR |
Parameter | Value |
---|---|
Size | Total number of voices |
Stop | Number of polyphonic voices |
Parity | Number of percussion voices |
Input | Input sampling rate |
Output | Output sampling rate |
byte | description |
---|---|
0 | Red value |
1 | Green value (or monochrome gray level) |
2 | Blue value |
3 | reserved |
33.1 Standard Device Error Codes
Bad_Format
Bad_Gap
Bad_Head
Bad_Sector
Bad_Track
Clock_Loss
Controller_Parity
Controller_Timeout
CRC_Error
Crease
Data_Late
Density_Mismatch
Drive_Check
Drive_Not_Found
Drive_Select_Error
Exceeded_Limit
Failed_To_See_Home
Failesafe
Head_Current_Error
Header_Comparison
Hopper_Check
Index_Error
Invalid_Function
Invalid_Sector
Multiple_BOTs
No_Data
No_Header
No_Preamble
No_Write
Not_Loaded
Not_Ready
Off_Cylinder
Off_Line
Off_Track
Operation_Incomplete
Parity_Error
Past_BOT
Past_EOT
Plug_Missing
Power_Loss
Read_Only
Rotation_Speed
Seek_Failed
Seek_Timeout
Self_Check
Spin_Speed_Fault
Temperature
Timing_Error
Unsafe
Velocity
Write_Check
Write_Only
Write_Overrun
34 Common Operating Environment
UOS supports a Common Operating Environment that allows programs in many
different languages to work cohesively. Participation is optional and
applications must be flagged as COE-compliant to receive all of the benefits.
These include the ability to pass string parameters in different formats, full
debugger support, and other benefits.
35 Standard utilties
BASIC | BASIC interpreter |
BROWSE | Internet browser |
Email (local and internet) |
36 Programmer Services
There are various programmer services offered by the kernel and various
components. Also programmer libraries are provided to ease development. The
libraries support a mix of standard API calls and also COM objects, depending
on the circumstances. The libraries are:
COMLIB | Support for Common Object Model, the Common Operating Environment, and multiple string formats (including conversion to/from UNICODE). |
GRFLIB | Support for graphics and other screen-oriented processes. |
MTHLIB | Support for mathematical and vector processing, and numeric-format conversion. |
SYSLIB | Support for kernel and other system-level access, I/O, and threads. |
APPLIB | General program support, including HTML and XML parsing. |
Glossary
CID | Cluster ID. Unique ID for a cluster. |
Cluster | A tightly coupled group of computers. |
JID | Job ID. A numeric ID for a job, unique to the OS. |
Job | The unit of execution in a spooler (batch or printer). |
MMU | Memory Management Unit. |
PID | Process ID. A numeric ID for a process, unique to the OS. |
Process | Child processing unit of a task. |
Psuedo-terminal | A sofware device that appears to UOS as a physical terminal, but whose I/O is controlled by another task. |
Task | Processing unit which matches processes to a user. |
Terminal | A user I/O interface. It may be physical, virtual, or pseudo. |
TID | Task ID. A numeric ID for a task, unique to the OS. |
User | A set of authorized access specifications protected by password. |
Virtual terminal | A terminal session operating remotely, such as through telnet. |