2. OVERALL SYSTEM ARCHITECTURE ------------------------------ 2.1 Layered Architecture ~~~~~~~~~~~~~~~~~~~~~~~~ HyperCP/M employs a layered architecture that separates hardware management, operating-system personalities, and application software into distinct responsibilities. The architectural layers are: Applications | v Operating-System Personality | v HyperCP/M Kernel Services | v Virtual Resource Manager (VRM) | v Physical Hardware Each layer communicates only with the layer immediately below it through well-defined interfaces. The purpose of this separation is to minimize coupling between subsystems and permit independent evolution of personalities, kernel services, and hardware implementations. 2.2 Major Components ~~~~~~~~~~~~~~~~~~~~ HyperCP/M consists of the following major architectural components. HyperCP/M Kernel The kernel is responsible for: * System initialization. * Session management. * Resource allocation. * Session execution control. * Hardware abstraction. * Kernel service dispatch. The kernel contains no personality-specific behaviour. The kernel provides Management Services through defined interfaces. Management Services expose administrative capabilities without becoming a personality-specific subsystem. Session Manager The Session Manager creates and maintains isolated execution environments. Responsibilities include: * Session creation. * Session destruction. * Session switching. * Session isolation. * Association of personalities with sessions. Each session represents an independent virtual machine. HyperCP/M shall ensure that each session maintains independent CPU state, memory state, and console state. Shared resources, including storage devices, shall have explicitly defined sharing semantics. Personality Framework The personality framework allows multiple operating-system environments to execute under HyperCP/M. Responsibilities include: * Personality registration. * Personality loading. * Personality lifecycle management. * Personality interface definition. Each personality defines the operating environment observed by applications executing within that session. Console Manager The Console Manager provides console infrastructure used by both session consoles and the Management Services Console. Responsibilities include: * Console creation. * Console switching. * Keyboard routing. * Display routing. * System hotkey processing. The Console Manager provides the mechanism by which consoles operate; it does not define the management interface itself. Storage Manager The Storage Manager provides access to storage resources. Responsibilities include: * System volume management. * Personality package loading. * Virtual drive presentation. * Storage mapping. Storage implementation details are defined by the Storage Specification. Virtual Resource Manager (VRM) The Virtual Resource Manager presents a consistent virtual hardware environment to the kernel regardless of the underlying implementation. Responsibilities include: * Memory management. * Bank switching. * Device abstraction. * Interrupt routing. * Timer services. * Storage abstraction. The VRM Specification defines these interfaces. Management Services Management Services provide kernel-level capabilities for managing and controlling HyperCP/M resources. Responsibilities include: * Session creation. * Session destruction. * Session switching. * Personality management. * System status queries. * Resource management operations. Management Services do not define a user interface. They are accessed through the Management Services Interface by authorized software components, including the Management Services Shell and HyperCP/M utilities. Debug Services Debug Services provide kernel-level facilities for observing, diagnosing, and debugging HyperCP/M during development and system maintenance. Responsibilities include: * Diagnostic logging. * Assertions. * Event tracing. * Panic reporting. * Runtime inspection of kernel state. Debug Services provide common diagnostic capabilities for kernel subsystems and authorized management software. They are intended to support system development, testing, maintenance, and fault diagnosis while remaining independent of personality-specific behavior. 2.3 Boot Overview ~~~~~~~~~~~~~~~~~ System startup proceeds through the following stages. Power On | v Boot Loader | v HyperCP/M Kernel | v Initialize Kernel Services | v Create Initial Session | v Load Default Personality | v Transfer Control to Personality The initial implementation shall load the CP/M 2.2 personality as the default operating environment. The Management Services Console shall remain available through the designated system hotkey. 2.4 Component Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The relationships between the major architectural components are illustrated below. Arrows indicate architectural relationships and service dependencies; they do not necessarily represent execution order. HyperCP/M Kernel | +---------+-----------+--------+---+----+-----------+-----------+ v v v v v v v Session Personality Console Storage VRM Management Debug Manager Framework Manager Manager | Services Services | +---+ | | | | | +------+------+ v | v | v v Physical v Sessions | Session Management Hardware Management | | Consoles Services Services v v Console Interface Operating-System | Personality v | Management Services Shell v Applications The kernel is the only component that directly interacts with the VRM. Applications execute entirely within the context of a personality. Personalities communicate with the kernel exclusively through the defined HyperCP/M service interface. Management Services provide administrative capabilities through the Management Services Interface. Management Services do not directly implement resource management operations; requests are dispatched to the appropriate kernel subsystems. No personality shall directly access kernel internals, VRM implementation details, or resources belonging to another session except through explicitly defined kernel services. ============================================================================