the SPIN paper, which we're reading for 712 (grad OS), drinks the PL koolaid:

"Our decision to use Modula-3 was made with some care. Originally, we had intended to define and implement a compiler for a safe subset of C. All of us, being C programmers, were certain that it was infeasible to build an efficient operating system without using a language having the syntax, semantics and performance of C. As the design of our safe subset proceeded, we faced the difficult issues that typically arise in any language design or redesign. For each major issue that we considered in the context of a safe version of C (type semantics, objects, storage management, naming, etc.), we found the issue already satisfactorily addressed by Modula-3. Moreover, we understood that the definition of our service interfaces was more important than the language with which we implemented them.

"Ultimately, we decided to use Modula-3 for both the system and its extensions. Early on we found evidence to abandon our two main prejudices about the language: that programs written in it are slow and large, and that C programmers could not be effective using another language. In terms of performance, we have found nothing remarkable about the language's code size or execution time, as shown in the previous section. In terms of programmer effectiveness, we have found that it takes less than a day for a competent C programmer to learn the syntax and more obvious semantics of Modula-3, and another few days to become proficient with its more advanced features. Although anecdotal, our experience has been that the portions of the SPIN kernel written in Modula-3 are much more robust and easier to understand than those portions written in C."

Date: 2010-02-15 06:57 pm (UTC)From: [identity profile]
so I have heard of this general idea, and some things confuse me:

how 'safe' exactly does writing in a language like this really force you to be? can you prove there are no race conditions, or only that there are no "oops, i overstepped this array boundary" bugs?

will the innermost guts (context switcher, etc) still have to be written in asm, or does the language provide facilities for it?

Date: 2010-02-16 06:02 am (UTC)From: [identity profile]
When I was an undergrad, one of my research projects under Greg Morrisett was exploring doing Linux kernel modules ported into Cyclone. As background reading, he had me read the SPIN OS papers.

Coincidentally, Emin Gun Sirer, who was one of the hotshot young networking/systems guys at Cornell at the time, was the main implementor of SPIN OS while he was a UW grad student, so I talked with him about his experiences implementing it.

The choice of Modula 3 was mostly based on what was hip and suitable at the time. Gun suspected if the project began a few years later, it might have been implemented in Java or something similar.

There really were no proofs of anything involved, so any memory safety properties were contingent on the memory safety of the implementation of Modula 3 used. From the OS perspective, I believe the fact that it was a microkernel architecture was important in minimizing the TCB. SPIN either predates or was contemporary with the original TAL papers, and almost certainly did not use it.

According to Gun, the actual implementation was to some degree *nix compatible, and could do basic things like check e-mail and whatnot. An annoying performance drawback was the lags caused by the garbage collection technology available at the time.

Date: 2010-02-15 07:08 pm (UTC)From: [identity profile] demarko (from
this newsletter, I would like to subscribe to it

Date: 2010-02-16 06:08 am (UTC)From: [personal profile] ikeepaleopard
ikeepaleopard: (Default)
I'm glad there's a modula-2 webring. I thought we gave up on webrings in the ninet....oh.

Date: 2010-02-16 10:47 pm (UTC)From: [personal profile] lindseykuper
lindseykuper: A figure, wearing a pink shirt decorated with a heart, looks upward from between dark shapes that suggest buildings. (Default)
We all need to start using Modula-2, to justify the existence of Oh My! Modula-2!

Maybe next he'll come out with Oh My God! Scala!



August 2014

17181920 21 2223

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 21st, 2017 05:49 pm
Powered by Dreamwidth Studios