Patent Document ID: 8480398
Application ID: 12316719
Patent Flag: 1

Claim One:
1. A method for teaching the workings of an Operating System multiprocessing mechanism, the method comprising steps “a” through “l” of the following stepwise process of constructing and operating and educational model computer system, the steps including: (a) Building an instruction-execution driver logic-circuit that implements: (i) a timing signal generator that cyclically generates a sequence of instruction-cycle timing signals at a rate of approximately two signals per second, wherein this slow operation makes the operation of computer circuits visually traceable and verifiable at every step of the building process via LED's connected to output pins of the computer circuits; (ii) a logic circuit that fetches a RAM instruction pointed by a program counter, PC during a first signal of an instruction cycle and increments the PC during a second signal of the instruction cycle; and (iii) a logic circuit that decodes fetched RAM instruction codes ranging from 0000 to 1111 and generates a distinct instruction signal for each instruction code; (b) Building logic circuits that implements the application program instructions “increment register A”, “increment register B”, “Jump_ProgA” that jumps to the start of program A at RAM location 0010, and “Jump_ProgB” that jumps to the start of program B at RAM location 1001; (c) Reserving locations 0000-0011 of a 16×4 bit RAM for Operating System multiprocessing instructions, reserving RAM locations 0010-1000 for application program instructions of a process A, and reserving RAM locations 1001-1100 for application program instructions of a process B; (d) Configuring a buffer chip named ProgA_ptr with the value 0010, and connecting the output pins of this chip to a data transfer BUS; (e) Configuring a buffer chip named ProgB_ptr with the value 1001, and connecting the output pins of this chip to the data transfer BUS; (f) Building a hardware process-queue consisting of three 4-bit registers R 1 , R 2 , R 3 , wherein R 3 is the tail of the queue, R 2 and R 1 is the front of the queue, wherein input pins and output pins of each register connect to the data transfer BUS; (g) Building logic circuits for the following Operating System instructions that operate on the process queue of the above step “f”: (i) the instruction “Initialize” that moves the address of program A from ProgA_ptr buffer of step “d” above into R 1 of the process queue, and moves the address of program B from ProgB_ptr buffer of step “e” above into R 2 of the process queue; (ii) the instruction “Wakeup_process” that starts an execution of a process in the front of the process queue by moving the starting address of said program from R 1 of the process queue into the program counter register PC; and (iii) the instruction “Update_process_queue” that moves R 2 to R 1 and R 3 to R 2 ; (h) Building a process interrupt circuit that counts the number of instructions that a running process executes and generates a preemption interrupt signal after the tenth instruction wherein this signal preempts the running process by moving a PC value into R 3 of the process-queue of step “f” above and moves into the PC the RAM address of the Update process queue instruction of the Operating System code in step (i) below; (i) Programming the first four locations of the RAM as: Initialize, Wakeup_process, Update_process_queue, Wakeup_process; (i) Programming the RAM locations for program A reserved in step “c” above with application program instructions of step “b” above, preferably with an instruction IncA, the last instruction being “Jump_ProgA”; (k) Programming the RAM locations for program B reserved in step “c” above with application program instructions of step “b” above, preferably with an instruction IncB, the last instruction being “Jump_ProgB”; and (l) Running the computer with initial PC value of 0000 and observing the cyclic alternating execution of program A and program B, whereby running a program is preempted by Operating System hardware after running ten instructions, and the execution of the other waiting program is started by the Operating System software.