`
`91
`LENGTH: STRINGintrinsic that returns the dy-
`namic data length of a STRING variable.
`MARK:Used to mark the current top of the heap in
`dynamic data memoryallocation.
`MEMAVAIL: Returns number of words between
`heap and stack in data memory.
`MOVELEFT:Low-levelintrinsic for moving mass
`amounts of bytes.
`MOVERIGHT:Low-levelintrinsic for moving mass
`amounts ofbytes.
`POS: STRINGintrinsic returning the position of a
`pattern in a string variable.
`REWRITE:Procedure for opening a newfile.
`RESET:Procedure for opening an existingfile.
`RELEASE:Intrinsic used to release memory occu-
`pied by variables dynamically allocated in the
`heap.
`SEEK:Used for random accessing of records within
`a file.
`SIZEOF: Function returning the number of bytes
`allocated to a variable.
`STR: Procedure to convert long integerto string.
`IMM Service
`Routines: Set of over 50 procedures that provide
`access to 1/O and management services.
`An example of a segmented program is the program
`development system itself. The root segment of the
`program development system simply displays a choice
`menu on the program development system terminal and
`then accepts a selection from the keyboard. This results
`in a segment procedure to be loaded from disk that
`implements the choice (i.e., editor, filer, etc.)
`A disadvantage of segmented programs is that its
`loaded code cannot be shared among a number ofusers,
`as the instantaneous state of each user’s code spaceis
`not constant but depends upon the particular state of
`each program's segment overlay. For example, as pro-
`gram development system is an overlayed program,
`every program development system user who logs-on
`causes a new copy of the program development system
`code to be loaded into memory. If, on the other hand, a
`number of identical applications use a non-segmented
`program,
`then only one copy of the program code
`would actually exist in each general purpose processor
`942, 944. The individual virtual machines created for
`each instance of the application would mapthe virtual
`machine code space to the single copy of code andshare
`it.
`
`un
`
`A
`
`92
`procedure internal to a module with a procedure sup-
`plied at link-time. This allows a new ortest version of a
`procedure or function to be globally replaced without
`recompiling each module.
`A link stage is required for programsthatrun outside
`the program development system environment and
`which use the ideal machine monitor service routines
`for the following reasons. First, most of the extensions
`to standard Pascal are implemented as functions and
`procedures called from the user program. Someofthese
`calls are satisfied intrinsically by the ideal machine in-
`terpreter—an example of this is any of the character
`string functions. When compiled,a call to one of these
`functions generates a single P-codeinstructions (with an
`argument) that performs the requested function in one
`P-codeinstruction execution cycle. These functions are
`effectively micro-coded into the ideal machine's in-
`structionset.
`internal program
`However, other extensions call
`development system procedures implemented as P-code
`routines. When a program is being run under the pro-
`gram development system (by typing EXECUTEfrom
`the program developmentsystem terminal) manyof the
`extensions used in a program are serviced by the pro-
`gram development system itself. Examples of this are
`the GET & PUT intrinsics—using these standardintrin-
`sics actually generates calls to routines in the program
`development system that drive lower level I/O func-
`tions. Such a user program is referred to as a Level 4
`process with the program development system provid-
`ing a Level 3 operating environment which divorces
`the Level 4 application program from the underlying
`architecture of the ideal machine and system 100. This
`is the environment that the editor operates in, and a user
`would normally test subsections of his application by
`using the program development system execute func-
`tion.
`Eventually, however, an application program oper-
`ates in a stand alone environment, andis initiated not
`from a terminal command under program development
`system, but by the JSAM. Therefore, any procedural
`routines normally supplied by the program develop-
`ment system to implementintrinsics and extensions(i.e.,
`GET and PUT) must be linked with the application
`before it can operate independent of the program devel-
`opment system.
`The second requirementfor a link stage relates to the
`low-level ideal machine monitor service routines. Once
`again, a subset of these calls trap directly to micro-
`coded routines in the ideal machine monitor—typically
`those that call REX functions directly (for example,
`Send a Packet). Other routines require a P-code “front-
`end” to map a higher level call into a specific set of
`primitive ideal machine monitor calls—for example,
`one ideal machine monitor service routine reads the
`memoin an indexed dataset via a sequenceofbasic ideal
`machine monitor intrinsic calls. These P-code drivers
`must be linked into the users application.
`Note that these procedures, when linked to the user
`porgram, reduce by a small amount the code-space
`available for the application, as they reside in the same
`64K-byte address space available in a single ideal ma-
`chine. However, the amount of space taken by exten-
`sion, intrinsic and ideal machine monitor service rou-
`tines is not great—typically less than 2K-bytes.
`When a program is running under the program devel-
`opment system after an EXECUTE command,the ap-
`plication code is co-resident with program development
`
`A more rational way to organize large multiuser
`applications is to design a system using a number of 50
`cooperating, memory-resident processes. This brings
`two advantages:
`(1) Better response due to no segment-loading over-
`head.
`(2) Reduction in real memory space taken with multi-
`ple users due to code-sharing of the nonsegmented com-
`ponents of the application system.
`I. Pascal Linker
`The Pascal linker allows precompiled procedures to
`be linked to form an object codefile that can be loaded
`and run in an ideal machine. A reference to an external
`procedure or function can be made within a separately
`compiled module, provided that the referenced proce-
`dure has been declared as external. Thelinker attempts
`to resolve references between a set of modules submit-
`ted to it, or by selecting named precompiled procedures
`from within a library of code modules,if one is supplied.
`It is also possible to specifically replace all calls to a
`
`oA
`
`0075
`0075
`
`Facebook Ex. 1014
`Facebook Ex. 1014
`Part 2
` U.S. Pat. 8,995,433
`U.S. Pat. 8,995,433
`
`
`
`4,625,081
`
`93
`system in the same virtual machine, and hence the
`amount of space available for the application is less than
`64 K-bytes (program development system takes approx-
`imately 16K-bytes). Normally,
`the various segments
`and procedures of an application are tested in this envi- 5
`ronment.
`
`94
`The ideal machine monitor subsystem is a collection
`of SPM processesresident in a general purpose proces-
`sors high-speed program memory. Two main processes
`(i.e., processes with an allocated scratchpad context,
`and a system process ID (SPID)of0) can be identified:
`ideal machine monitor subprocess driver (IMMS) and
`general purpose processor resource manager.
`All requests for ideal machines are sent as create
`process requests to IMMS by JSAM,specifying a P-
`code Program ID. Ideal machine monitors creates a
`subprocess within its own main context for each such
`request. The shared program code for this subprocess
`provides two functions:
`(1) ideal machine monitor interpreter driver (IMMI),
`and
`(2) ideal machine interpreter (IMI).
`The IMMIfunction of the subprocess generates a
`request to the general purpose processor resource man-
`ager to load the program specified by the request into
`data memory and return to IMMIthe data and code
`segment register contents needed to map outthe loaded
`code in memory. If the P-code is already loaded, the
`existing copy is pointed to. IMMItheninitiates running
`of an ideal machinebystarting the ideal machineinter-
`preter (IMI) decoding and executing the P-codes con-
`tained in the code space now pointed to by the mapping
`registers.
`IMMIprovides intrinsic services on behalf of IMI
`during process execution, including interfacing to REX
`functions. IMMIalso deallocates resources used by the
`ideal machine when the P-code process terminates by
`calling the general purpose processor resource man-
`ager.
`IMMIand IMI functions are provided by a single
`wubprocess and use the suspend option when waiting
`for the completion of REX functions (I/O, Event Man-
`agement, etc.)
`Every P-code process running in its ideal machine
`employs an IMMI/IMI subprocess to implement the
`basic machine emulation. However, due to SPM code
`sharing, the only SPM program-code required to be
`resident
`in the general purpose processor program
`memory are single copies of ideal machine monitors,
`IMMI and IMI. The general purpose processor re-
`source manager is a P-code process running in system
`ideal machine.
`Major kernel system processes implemented in Pascal
`use a main process invocation of IMMI/IMI. As each
`main process has its own scratchpad context, it can be
`assigned a unique system bus ID (SBID) by JSAM. This
`is necessary for those Level 2 system processes (for
`example, SYSDEV) requiring an instant global address
`(SBID) to which any process can send a packet. (When
`an IMMI/IMIprocess runs as a subprocess under ideal
`machine monitors, the subprocess identity cannot be
`pre-established, thus such subprocesses cannot be as-
`signed global addresses.) In certain cases, SBIDs are
`also assigned dynamically to permit use of the packet
`reroutingfacilities provided by the inter processor com-
`munications system to implement fault tolerant dual
`processing schemes.
`Finally, this approach provides a system ideal ma-
`chine with its own scratchpad context, reducing the
`process context-switching overhead to a minimum.In
`contrast, a normal ideal machine operating as a subproc-
`ess must save its operating context in a shadow context
`in data memory, to permit sharing of the ideal machine
`monitors main context.
`
`-_0
`
`J. Program Testing
`The program development system, as an interactive
`single-user system, does not provide any specific testing
`tools for SPM programs. As the program development
`system resides in an ideal machine which executes P-
`codes, SPM code cannot be checked outin the program
`development system environmentitself. To test SPM
`code, two facilities are available:
`(1) Monitor functions from a system programmer’s 15
`console for in-system testing
`(2) Use of an auxiliary extension board for in-system
`and stand-alonetesting.
`For Pascal programs, a high degree ofstatic checking
`is carried out by the Pascal compiler, which not only 20
`checks for syntactic and semantic errors, but also pro-
`vides extensive type-checking of variables across as-
`signments, procedure calls, etc. A successfully com-
`piled Pascal program will mostly contain only logical
`errors at run-time. As these programsare, by the nature 25
`of the Pascal language, of a modular design, individual
`sections can be tested by executing them under the
`program development system with run-time errors re-
`ported to the program development system console.
`For execution tracing, the module can be seeded with 30
`READs and WRITEs which will
`interact with the
`program development system terminal as the program
`runs. The Hex Dumputility can also be used to print
`diagnostic lists of data files generated by the program as
`an alternative source of trace information. This latter 35
`methodis then available for producing dumps oftrace
`files generated by the complete application system run-
`ning outside the supervision of program development
`system. The interactive nature of the editor and com-
`piler ensures a fast error correction cycle to eliminate 40
`logical operation problems.
`Privileged programmers use the program develop-
`ment system to generate SPM programs to berun in the
`host space of the system 100. SPM programs are neces-
`sary when a new device handler, a hardware-specific 45
`transient, a time-critical transient or a time-critical job
`supervisor is required.
`Authorized personnel using a system programmer’s
`terminal 270 can load and run programs for test pur-
`poses, interacting with the processor environment in 50
`which the program is loaded. From a system program-
`mer’s terminal 270, the program, scratchpad and data
`memory of any processor can be displayed and altered.
`Packets can be sent to, and received from, the process
`using the test program, and dumptables can bespecified 55
`in the event of the process trapping the processor. As a
`system programmer also has accessto all of the func-
`tions available to a system operator, the system log can
`be used to collect run-time trace packets sent from the
`test program, and the verified program can then be 60
`installed in a program library. All of these functions can
`occur during normal system operation,
`K. Ideal Machine Implementation
`The implementation of the ideal machine software in
`a general purpose processoris presented herefor inter- 65
`est only. Except for any desired application program,
`no user programming is required in a general purpose
`processor.
`
`0076
`0076
`
`
`
`95
`
`4,625,081
`
`0
`
`15
`
`25
`
`35
`
`96
`The resident executive provides this management.
`RESIDENT EXECUTIVE (REX)
`Eachprocessor,of the five different types that can exist
`A. Overview
`in a Delta 2 system, has up to 32K-words of program
`The resident executive (REX) is a firmware subsys-
`memory, 12K of which is read-only memory used to
`house a copy of the REX program code. Each contains
`tem integral to each system 100 processor. It provides
`an identical copy of the basic REX codeandhas its own
`the resources management which software processes
`personal extension to REX that manages the hardware
`require to effectively use the hardware facilities of the
`resources specific to that processor type. This extension
`standard processor module 500 (SPM), commonto all
`is referred to as EXREXandis housed in an additional
`processors. Software processes executing in a processor
`4K-words of read-only memory.
`perform under the management of REX, which can
`Because REX provides a set of fixed, well-defined
`support the operation of multiple, concurrent software
`user functions and is in integral part of the basic hard-
`processes. REX’s responsibilities include the following
`service areas:
`ware of a standard processor module 500,it is consid-
`ered to be as mucha primitive componentofa standard
`(1) Logical initialization of the standard processor
`processor module 500 as are the instruction set, memo-
`module 500 on power-up.
`ries, registers, and basic logic of the boarditself. Thus
`(2) Loading of programsinto the standard processor
`the standard processor module 500 processoris a self-
`module 500 on request.
`managed hardware system providingareliable environ-
`(3) Allocation of memory resources to processes.
`mentin which to host multiple concurrentprocesses,all
`(4) Scheduling and dispatching of processes.
`20
`contending for the use of the processor's fixed re-
`(5) Process suspension and event management.
`sources. A user process executes compiled basic ma-
`(6) Input/output and packet transfer services.
`chineinstructions to achieve its specific goal butcalls
`(7) Inter-processorutilities and subroutine calls.
`on a REX function to communication with other pro-
`(8) Timer utilities.
`cesses, acquire additional machine resources,use timers,
`(9) List processing utilities.
`or perform other general activities. REX management
`(10) Interrupt handling.
`notonly provides the applications programmerfreedom
`(11) Diagnostics.
`from concern with many hardware-specific operations,
`In the system 100 each process contains an identical
`but greatly increases the overall reliability of the system
`coph of REX, combined with a processor-specific ex-
`since most of the more complex activities needed by the
`tension to REX (called generically, EXREX). EXREX
`user, and normally callable by basic machine instruc-
`manages the particular hardware extension of the stan-
`tions, are provided by mature, well-tried REX routines.
`dard processor module 500 which, together with the
`Additionally, it reduces the problem of resource and
`standard processor module 500 form one of the five
`activity contention by concurrent processesin a single
`different system 100 processor types.
`processorby allowing for a structured, disciplined way
`Communications between REX and an active resi-
`to handleallocation of processor resources to processes.
`dent process is via subroutine calls. Communications
`Thus the low-level program visibility of a processor
`between a specific processor’s REX and a process in
`presented to a programmeris both the standard proces-
`another processor is vis packets transmitted over the
`sor module 500 instruction set and the set of REX-calla-
`ble functions.
`inter-process communications (IPC) network. There is
`a close relationship between the multiple copies of REX
`Thelife-cycle of a process within the system 100 is
`and the kernel system managementprocess, JSAM (job
`used as an example of the kinds of services REX pro-
`scheduling, allocation and monitoring subsystem man-
`vides within each processor.
`ager). Each REXis periodically requested by JSAM to
`A process is the basic unit of work from which sys-
`report the status of its resources and this informationis
`tem-wide jobs are built. To execute, a process needs a
`used to allocate required resources to the dynamically
`processor with the available resources necessary to host
`changing workload imposed on the system.
`the associated program (memory, attached channels,
`An understanding of REX services is important to
`execution time, etc.). Processes are initiated by a com-
`users of ideal machines for applications programmedin
`ponent of the kernel system called the job scheduling.
`Pascal, although such applications programs do not
`Allocation,
`and monitoring
`subsystem manager
`interface with REX directly. Ideal machines created in
`(JSAM), which bases its decision as to which processor
`general purpose processors 942, 944 (GAPs) provide a
`should host a process by comparing the quantity and
`logically separated and hardware fence protected envi-
`types of resources required with those available in the
`ronment for Level 3 application systems. Nonetheless,
`system's processors. JSAM maintains current resource
`most of the image machine monitor services routines
`inventories by a regular background dialogue with the
`called via Pascal program procedures make direct and
`REX of each live processor in the system. (Process
`obvioususe of the underlying REX callable subroutines
`requests can be sent to JSAM by anyactive process in
`of the host general purpose processor.
`any processorin the system.)
`A system 100 consists of a collection of independent,
`Having chosen a suitable host for the requested pro-
`tightly-coupled processors, each with its own central
`cess, JSAM sends to the REX of that processor a re-
`processing unit, program, scratchpad, and data memo-
`questto initiate the process. If the program code needed
`ries. Although working cooperatively with other pro-
`by the processis not already in program memory, REX
`cesses in the system, each within itself is an autonomous
`loads the code fromadisk-resident program library and
`processing unit. At a system-wide level, each provides a
`creates the process. Once running, the process acquires
`useable resource to which work, in the form of software
`from REX whatever resources are necessary to perform
`its task.
`processes, is allocated. At the processorlevel, this allo-
`cated workload together with its hardware must be
`REX caninitiate and manage a large numberofpro-
`managed by the processoritself, free of any higher-level
`cesses, suspending those awaiting resources or an event
`system-wide organizational structure.
`and scheduling the execution of those currently dis-
`
`40
`
`60
`
`65
`
`0077
`0077
`
`
`
`4,625,081
`
`97
`patchable. When a process is running, it can make sub-
`routinecalls to REX to request a wide range of services
`including:
`(1) Dynamicallocation of scratchpad and data mem-
`ory.
`(2) Management of and access to user-defined lists
`allowing a process to efficiently maintain a variety of
`single and multi-thread queues and stack structures.
`(3) Communications with other processors in either
`the sameordifferent processors.
`(4) Management of any number of general purpose
`timers on behalf of the process.
`(5) Semaphore services for user-defined resource
`sharing and activity synchronization.
`(6) Management of hardwareinterrupts.
`(7) A set of general purpose I/O services allowing
`data transfer to be performed between and among de-
`vices, datasets, and processes owned by the requesting
`process, regardless of whereit is located in the system.
`(8) A large number of general purpose utility and
`computational routines designed to ease the burden of
`user-programming of standard processor module pro-
`cesses.
`
`During process activation, REX manages the inter-
`face between the process and any outside events related
`to it (for example, the receipt of packets destined forit).
`A process can be suspended, and thus become dormant
`for a number of reasons: waiting for a response to a
`communication, a timer to fire, or a resource to become
`free. When a process is suspended, REX enqueues the
`process until the event occurs, and dispatches which-
`ever process has become the next-most-eligible to use
`the machine.
`Whena process terminates, REX returnsall interpro-
`cessor resources used back to the general pool, and
`notifies JSAM of termination.
`REX also manages hardware interrupts and provides
`a utility routine for each possible external
`interrupt
`condition. Many interrupts relate to the detection of
`hardware errors within the processor. REX manages
`the trapped error-condition allowaing inspection from a
`system terminal and diagnostic processing.
`When a processoris first powered-up, REX takes the
`hardware through a predefined series of initialization
`and diagnostic routines. After successful completion,
`REXreports to JSAM that the host processoris avail-
`able for workallocation.
`B. Memory Management
`Scratchpad management provides all resident pro-
`grams in a standard processor module 500 including
`REX, with an orderly way of using the scratchpad
`memory resource. Order is preserved by requiring that
`all allocations and decallocations be accomplished using
`REX’s scratchpad routines exclusively.
`Each processor contains 4096 16-bit words of high-
`speed scratchpad memory, organized as 32 pages of 128
`words each. Each page is arranged as eight packets of
`16 words each (the structure of a scratchpad andinter-
`processor packet are obviously similar and logically
`equivalent).
`The first page of scratchpad memory, page zero, is
`reserved for common use. Information which must be
`inaccessible to all resident processes in the host proces-
`sor, such as the date andtime, is maintained here. REX
`uses page one as its own private scratchpad area or
`context. The remaining 30 pages are available for allo-
`cation by REX either for user-process contexts or dy-
`namic working storage.
`
`98
`A contextis an area of scratchpad memory allocated
`by REX atthe time each process is created. The number
`of scratchpad packetsallocated is specified to REX in
`the create process request. This is generally kept to a
`minimum since context packetsare allocated for thelife
`of the process and provide “registers” for system con-
`tro] information as well as a static working area of stor-
`age used by the process as it desires.
`Theinitial context allocation to a process may not
`meet all of the processes’ lifetime requirements for
`scratchpad memory. This may occur because the size of
`the context is physically limited, or because it is waste-
`ful for a process to request long-term allocation for
`waht are often short-term needs. REX satisfies such
`requirements for dynamic working storage by allocat-
`ing and deallocating packets to each process on de-
`mand. Such requests are made on an individual packet
`basis. The amount of scratchpad allocated can thus
`expand and contract as necessary to meet the changing
`demandsof the process during its lifetime.
`Since a context must be allocated to each main pro-
`cess in a processor, the number of main processes is
`limited to the numberof contexts. To keep this number
`as large as possible, REX allocates dynamically from
`those pages from which a context has already been
`allocated and maintainsall spare packets available from
`previously allocated contexts on the available packet
`queue. Each time a context is allocated, packets not
`requested from the context’s eight packets are placed on
`this queue. Because REX prefers to have as manyfull-
`page contexts as possible, each time a context is deal-
`located, spare packets from the same page are removed
`from the available packet queue. If the packets are con-
`tiguous with the deallocated context, they extent it. If
`not, they are placed on a free packet stack to await the
`return of the rest of the packets in the page. The free
`packet stack is composed entirely of packets which
`were once on the available packet queue,but have since
`been removed because the context from the page of
`which they were a part is no longerallocated. The free
`packet stack is maintained as a single-linked stack, using
`REX’s standard scratchpad list facilities. When the
`remaining context packets are returned, they are all
`removed from the free packetlist and used to extend the
`unused context back into a full page. REX will not
`allocate from the free packet stack unless the available
`packet list is empty. In this way, REX reconsolidates
`complete context pages.
`The page consolidation function is performed by
`REXIDLE (REX’s permanent background process
`which continually scans the available packet queue.
`Besides managing scratchpad memory as a resource,
`REX also provides a set of functions for maintaining
`lists of individual packets on single-linked stacks or
`queues for user-defined operations.
`Data memory managementprovides all resident pro-
`cesses in a processor, including REX, with an orderly
`way of using the data memory resource.
`Each processor contains 64K 22-Bit words of data
`memory. Each word consists of 16 bits and six error
`correcting code (ECC)bits. The ECCbits permit detec-
`tion ofall 2-bit errors and correction ofall 1-bit errors.
`Initially, a minimal work area of 4K-words is as-
`signed to REX. All remaining available memory is as-
`signed to extension board REX (EXREX),the needs of
`which vary depending on processor type. If, during
`initialization, EXREX determines that this assignment
`
`15
`
`20
`
`25
`
`30
`
`55
`
`65
`
`0078
`0078
`
`
`
`4,625,081
`
`99
`is excessive the surplus memory blocksare transferred
`back to REX.
`Whatever the size of the area initially assigned to
`REX,it mayat times exhaustits supply of data memory.
`EXREX can aid REX by providing temporary exten-
`sion blocks on these occasions. During physicalinitial-
`ization, EXREX informs REX of the addresses ofits
`allocation and deallocation routines, its data memory
`area, and the maximum length of the extension blocks it
`can provide. Then whenever REX requires additional
`data memory, it requests a block from EXREX and
`later, after the need for a block passes,it is returned to
`EXREX.
`The data memory managementroutines used by REX
`and available to all processes implement a buddy system
`of storage management. Blocks of any length up to the
`maximum may be requested by a process. However,
`available data memoryis maintained only in blocks of4,
`8, 16, up to 32,768 words, that is, the lengths of all
`available blocks are in powers of two and in the range
`2? to 215 inclusive. A request for a block of any other
`length is satisfied by allocation from the next-larger
`available block,
`successively smaller power-of-two
`blocks until the request is satisfied with a total alloca-
`tion which exceeds the requested size of the least possi-
`ble amount. Since the smallest available block is four
`words in length, up to three extra words may beallo-
`cated to satisfy a request. The unused memory remain-
`ing after request allocation is retained as a number of
`smaller available blocks.
`Duringallocation,it is possible that an available next-
`larger block does not exist from which to allocate the
`request. In this case,a still larger available block can be
`successively split into two “buddies” of equal size until
`a block of the next-larger size is obtained. Since the
`length of each available block is a power of two, the
`length of each buddy thus obtained is also a power of
`two.
`
`When a previously assigned block id deallocated,
`unless its original length was a power of two,the block
`cannot be made directly available.
`Instead, smaller
`blocks,
`the lengths of which are each successively
`larger powers of two, are split off from the deallocated
`block until the length of the remainderis also a power
`of two. It can then be madeavailable.
`Eachtime a new available blockis created, either by
`deallocationoras a result ofsplitting, all other available
`blocks of the same length are examined to determineif
`the buddy ofthat block is also available. Since theori-
`gin in data memory of each block is a multiple ofits
`length, the address of the buddy may be easily deter-
`mined.If the buddyis available, both blocks are recom-
`bined to form a new available block of the next-larger
`size. Recombinatio is performed by REX’s background
`process, REXIDLE.
`Program memory in each processor consists of at
`least three blocks of 4096 16-bit word ROM and up to
`65,536 16-bit word RAM for REX and EXREX. Both
`ROM and RAM are 50 nanosecond memories. Since
`only RAM can be loaded dynamically, one might ex-
`pect REX to consider only RAM as a manageablere-
`source and to accept ROM as a non-alterable preas-
`signed resource. This is not the case, however. REX
`treats all program memory, both RAM and ROM,asa
`manageable resource and wherever possible does not
`differentiate between the two. This uniformity oftreat-
`ment presents a number of important advantages, par-
`ticularly in the area of program loading.
`
`100
`A request to load a program into program memory
`can be accepted regardless of the memory type of the
`target area. Programs cannot actuqlly be loaded into
`ROM,but part of the loading operationis to verify that
`the expected checksum which accompanies the pro-
`gram being “loaded” matches the actual checksum
`computed from the data in memory. Thus a program on
`disk can be “loaded” into ROM to verify that the two
`are identical.
`Another advantage of treating memory uniformly is
`that, as long as loads are requested for all programs,
`RAM and ROM can beinterchanged withoutaltering
`any code.If the target area is RAM,the area written to
`is changed. If the target area is ROM, it is not. This
`flexibility greatly facilitates testing and debugging.
`REX allocates blocks of program memory in lengths
`of up to 4K-words. Blocks can be requested by length
`alone, or by both address and length. Each block of
`available program memory (whether RAM or ROM)is
`described by a program memory element (PME), an
`internal data structure maintained in a queue by REX in
`its own data memoryarea.
`When a block is requested by length, REX searches
`the program memory queuefor a block ofsufficient size
`from whichtosatisfy the request. The searchis begun at
`the head of the queue, and the first block of sufficient
`size encountered is selected.
`If a block is selected from which to makethealloca-
`tion,
`the program memory element for the block is
`changed(the length and addressso thatit then describes
`only that portion of the original block which remains
`after the allocation is made). If no residual exists, the
`program memory element is instead deleted from the
`queue and returned to available data memory. On the
`other hand,if the allocation cannot be made because a
`block of sufficient size does not exist,
`the request is
`rejected and an error return to the calling processis
`made.
`When a user requests that a previously allocated
`block be returned to available program memory, an
`attempt is made to recombine the returned block with
`any existing unassigned blocks oneitherside ofit in the
`program memory address space.
`A program can consist of from one to nine relocata-
`ble load modules, each limited to a maximum length of
`4K-words, and up to 32 overlay modules. Load mod-
`ules can be either two types: primary or secondary.
`Primary are program-related,
`that is, only one re-
`entrant copy need exist in memory no matter how many
`processes share its use. Secondary are process-related
`and a separate copy of each must exist for each active
`process. Overlay modules are loaded by explicit request
`and may overlay primary or secondary modules. (Gen-
`erally, overlay modu