GUI I/O Redirection Demo
The intended meaning for the icons is as follows:
- Piece of paper: A file
- Blocks with GUI: A program with a visual interface
- The pipe with big ends: A filter program
- 2 Sheet of Paper: A diff program
- 2 chain links: The linker program
- A pipe spilting: The splitter (see below)
- 2 pipes joining: The merge (see below)
- A terminal window: Use to link a progrm to targinal input or output
This is a proof-of-concpt demonstration that an GUI OS can handle I/O rediretion. The "programs" can be "started" normally with a double-click (nothing actually happens), or with I/O redirection. However, some programs can only be run in one mode; those that cannot be run in the current mode have a large red NO sign on them.
To enable I/O redirection, double-click on the chain-links icon. This will enable the I/O linker. Each program capable of running with I/O redirection will have two or more small boxes appear at the botto of its icon. These boxes represnt the various input and output streams. A cyan box represents output, a green box represents normal output, and a red box represnts error output.
To connect two icons, click on a box from one. A line should appear connecting that box to your mouse pointer. Then click on the box that you wish to link it to. There are limits on which links may be made. Ojnly one link may be made per box. It is not possible to link an input box to an input box, or an output box (either normal or error) to an output box. It is not possible to link a "program" to itself, or to link output and input to a file at the same time.
Some icons do not have the error box. These either represnt files or intermediary constructs that cannot fail. The two such constructs depicted here are the merger and the splitter. The merger is an I/O construct that combines two or more (technically zero or more) incoming streams into a single stream, in much the same way that more than one program can write to a pipe. The splitter duplicates the contents of the incoming input streams and sends them to each "program" it is attached to. This functionally appears not to exist for pipes, but it should, as it could be useful.
Some icons have more than one input or output box. The diff program always requires two inputs, and the merger and the spliter always have one more input oroutput box than is used. I do not know if there is a way to write a program that asumes the existance of input streams beyond the usual three, but, if not, that would be a limitation of the programming techniques, not of the OS.
While the linker is enabled, the linker icon will be replaced with two icons, a red X and a green check mark. The red X clears all links and disables the linker. The green checkmark does the same thing, but in a real OS it would set up the I/O streams and start the programs.
The terminal window is a program that could be used to get input from or show output to the user. Alternately, a "ground" of sort could be included, an all unlinked boxes could be assumed to link to/from a terminal of some sort.
This is not a full-fleged anything, and has only the features needed to demonstrate the design. Some possibilities for improvement are:
- The screen should not flicker when selecting something
- It should not be possible to redirect the contents of a file to a file
- Seperate boxes for "overwite file" and "apprend to file"
- Text by the icons, probably below
- Replace the red NO signs and selection circles with somrthing that looks good
- A way to move icons
- Putting the splitter, merger, terminal, red X, and green checkmark onto some sort of toolbar that only appeared in linker mode
- Make the I/O stream lines go in more complicated paths, so they, if possible, do not cover other things
- Prevent the user from starting more than one unconnected network of "programs" at once
- There should be some way to save and load networks
Back to applets page
Back to home page