laverman@cs.rug.nl (Bert Laverman) (11/06/90)
I received the following message from Richard Smith, and post it on his request. Bert Laverman laverman@cs.rug.nl ----------Cut here---------- I'm posting this note to find out if there is anyone interested in real-time extensions to MINIX. I have been working on this project for about a year. I am mainly interested in real-time support for computer music or animation purposes but real-time systems are certainly not restricted to these applications. I started with MINIX 1.3 and applied the patches so graciously provided by Bruce Evans (Thanks Bruce). Turns out that his tty driver modifications ARE fast enough to support MIDI. The system is quite stable now and I have been mainly writing small applications for it to demonstrate its abilities. The following is a VERY brief outline of what I have done: - vitually no chages to fs - virtually no changes to mm - no changes to commands - additional file server is provided (rfs) for realtime access to disk and serial line (yes I used a standard serial port for MIDI on an IBM PC... I just had to run a couple of extra wires so that I could get the 1Mhz signal from an external box to the IBM serail chip 1Mhz/32 = 31250 = MIDI baudrate) - new sheduling queue was added which runs at a priority higher than tasks. This queue was EDD - message buffering was implemented. This was essentail for realtime processes or blocking problems result. It is interesting to note that this change did not noticeably increase overhead as it was the first change I made and the time to re-compile the file system remained unchanged with or without the message buffering. - some code in fs (ie E_LOCKED) was removed, also the signal stuff was cleaned up because the fear of mm not being ready to receive was eliminated. - realtime task added for timing calls and updateing the priority of tasks I also wrote a Musical Score Editor or sequencer for this system. For my musical score editor I also nexternaleeded a windowing system and none were available so I wrote a small one. Outline: - multiple sessions, ansi terminals inside of windows. Cosole driver for these windows was ported from original MINIX console driver. - window manager, you can move, size, kill, or rearrange the front to back order of windows - various gadgets, buttons, sliders, text edit fields, pop up menus etc. - window manager is a user program - graphics library is implemented by a server process similar to fs - stores all images in ram. 64K limits number of windows, but updating is very fast. Also no update events. - serial mouse support. Note that the graphics stuff is not my main area of concern, it is the realtime processing which is my main area. I'm not sure if the graphics stuff can be used without the real-time stuff, it may depend on message buffering...but maybe not. I don't think that this window manager is great, but it does get the job done. Ideally I would like to see X for MINIX. The music editor I have written can record MIDI information from a keyboard in real time. You could then play it back in real time while recording another track. All this can be done while you are compiling in another window. This program is actually quite nice and has an interface similar to a MacIntosh text editor. You can cut and paste sections of the song, scroll around, use menus, press buttons... etc. I was also able to write a small program which could display a 128 * 128 mono- chrome image at 30 frames per second. This program reads data from disk to display on the screen. With my 8800 block realtime file partition, I can get just over 2 minutes of bitmapped animation. Note that this animation occurs with as many other non-realtime things going as you desire without any jerking of the image. All in all the system tries very hard to maintain the design principles of MINIX and does not introduce too many changes. There is also no reason why the code should not port to other platforms under which MINIX runs (although shadow memory might become a problem on the 68000 without memory management) By the way, I have a 10 Mhz PC-AT with a mono card but the code will run on a PC, XT, or AT with mono or CGA cards. A hard drive is of course essential. 640K or more ram is also nice since the two extra servers eat about 200K. I have 2Mb and a 600K ram disk. Well I hope this message is not a waste of net bandwidth. Richard Smith smithrs@wc4.wnre.aecl.ca