Tuesday, June 20, 2017

Pat's FreeDOS story

Longtime FreeDOSers may recognize the name Pat Villani. For our newer members, Pasquale "Pat" Villani created the FreeDOS kernel, the core of the FreeDOS operating system. Sadly, Pat passed away in August 2011.

Pat and I were good friends. Although we never met in person, we chatted on the phone several times, and lots and lots of email conversations, half the time about FreeDOS and half about just anything. And since Pat isn't here to share his FreeDOS story, I thought I could attempt to retell his story as best I can.

To start, I'll quote Pat's own words from his Open Source Depot website, where he shared the history of his DOS kernel experiment, which later became the FreeDOS kernel.

DOS-C started in 1988 as an experiment in writing device drivers in C for Microsoft's MS-DOS. Both block and character device drivers were written, along with special C data structures to match the MS-DOS request packet. It was then recognized that using the same techniques, an operating system could be written that would take advantage of the C language features and would require much less time to develop than the traditional assembly language techniques. Although UNIX had proven this earlier, it was not tried with a traditional PC operating system.

At this time, a minimal operating system using the device drivers written earlier along with a new 8086 interrupt API was developed. It was called XDOS and proved to be a functional operating system. This new operating system was used to develop booting techniques and a C library SDK was developed for it.

XDOS enhancements were started in 1989 and MS-DOS was chosen as the new API. A more advanced architecture was also developed. This included the use of an IPL (intermediate program loader) to set up the operating environment prior to loading the operating system itself and reentrant system calls facilitating real-time applications. This version, know as NSS-DOS, was completed and demonstrated in 1991. As a result of these demonstrations, NSS was approached to supply source license for this operating system by a major defense contractor. The only new requirement - it had to run on 68K processors.

This presented a new challenge. Due to the MS-DOS model used for the API, NSS-DOS relied heavily on a segmented architecture. To meet this challenge, a major redesign of NSS-DOS was undertaken. New proprietary techniques were developed that allowed the same source to be compiled on a variety of hosts and with a wide range of compilers. This new version, DOS/NT, was the result of this new project. The kernel was redesigned as a micro kernel along with logical separation of the file system, memory and task managers. A new DOS API was designed along with a new DOS SDK to guarantee portability. Additionally, all processor unique code was separated from the core functions. The result is the highly portable operating system that DOS/NT represents.

After a number of successful commercial applications, DOS/NT became part of both dosemu and FreeDOS.

I'll pick it up from there, to fill in some details on how Pat's kernel became the FreeDOS kernel.

Pat wanted to contribute his kernel to an open source software project that would find it useful. I think it was late 1994 that Pat emailed the DOSEMU folks, asking if they were interested in his DOS-compatible kernel. I mentioned Pat's story briefly in a 1998 interview with Interface magazine. The DOSEMU team thought Pat's kernel was really interesting, but they also mentioned that a "Free-DOS Project" (at the time, our name still had the hyphen) had recently been started, and that project needed a kernel. The DOSEMU developers helped Pat get in touch with me.

Pat had created a DOS-like kernel that was feature-complete with earlier versions of MS-DOS, like MS-DOS 4 or 3.3. And Pat had licensed his kernel under the GNU General Public License, which meant we could include it in FreeDOS!

We immediately adopted Pat's kernel as the new FreeDOS kernel. Over time, other developers contributed to the FreeDOS kernel, including Aitor Santamaria, Arkady Belousov, Bernd Blaauwm Brian Reifsnyder, Charles Dye, Eduardo Casino, Eric Auer, Geraldo Netto, Jason Hood, Luchezar Georgiev, Ron Cemer, ror4, Steffen Kaiser, Tom Ehlert, and others. Some volunteered as kernel maintainers, including Jeremy Davis, Bart Oldeman, Jim Tabor, John Price. Among these many names, I'd like to give special kudos to Jim Tabor, who forklifted our kernel to support network redirection. Without this feature, FreeDOS would not have network and CD-ROM support.

In early 1996, Pat wrote a book about the FreeDOS kernel, describing its development and function, by way of teaching others how to create a DOS-compatible kernel. You can still find Pat's book on various booksellers, including Amazon: FreeDOS Kernel; An MS-DOS Emulator for Platform Independence and Embedded Systems Development.

No comments:

Post a Comment