The Logicwalk Operating System
An operating system is a (large) set of computer instructions. Thus, as with any computer program, we can simulate an operating system by loading the operating system into the Logicwalk Computer I/O Simulator (CIOS). However, we are not going to use the CIOS in this course for 2 reasons:
- Operating systems are very large, complex programs that contain millions of instructions. Reading and executing each and every instruction in the program is probably the worst way to study operating systems.
- Operating systems also utilize millions of memory cells. Tracking the information stored in each and every cell of an active operating system is basically impossible.
Instead, we will use the Logicwalk Operating System Simulator (LWOSS), which simulates the computer at a higher level. Here is an example:
Like CIOS, LWOSS represents a computer as a dynamic table. However, LWOSS does not show instructions, memory cells, or the Program Counter. Instead, we can see a new property called Current Folder. We also see the shell, which is the main visual interface to LWOSS.
Locate SHELL_A and click inside the inner rectangle to highlight it. Then type pwd followed by the Enter key. Your input will cause LWOS to print the current folder to the shell.
As with the I/O simulator, we can represent the state of the LWOS as a map. Here is an example:
- Hostname: "computer_a"
- Status: "idle"
- Interrupts:
- Keyboard: false
- Pressed Key: ""
- Shell:
- User Input: ""
- Buffer: "> "
As we can see, LWOS state is substantially different from CIOS state. Instead of memory cell values, we see properties that describe various parts of the computer. The Hostname identifies the computer in a network. Status tells us what the computer is currently doing. The interrupt cells have been replaced by the Interrupts property. If a user presses a key on the keyboard, the pressed key is stored in the Pressed Key property. Shell contains keyboard input from the user and the terminal.
Some properties have child properties. For example, the Interrupts property contains a child called Keyboard, which becomes true when the keyboard interrupts the computer. For convenience, we will use the right arrow (->) to refer to child properties. For example, the Buffer property of the Shell is Shell -> Buffer.
In the example above, the hostname of the computer is "computer_a." The computer's status is "idle," which means that computer_a is currently not executing any commands. Interrupt -> Keyboard is false, Shell -> User Input is blank, and Shell -> Buffer is just the prompt ("> ").
Now, suppose that a user presses the "c" key on the keyboard. The keyboard updates Interrupts -> Keyboard to true and stores "c" in Pressed Key.
Here is the new state of the computer:
- Hostname: "computer_1"
- Status: "idle"
- Interrupts
- Keyboard: true
- Pressed Key: "c"
- Shell
- User Input: ""
- Buffer: "> "
In the next lesson, let's see what LWOS does with the pressed key.
Comments
Please log in to add comments