The main issue facing any high-level language used in a kernel is predictable memory usage. Ref counting garbage collectors (like the one in Perl) are more predictable than mark-and-sweep style (like the JVM), but problems remain. When you declare a new variable, Perl may be able to use some memory on hand, but maybe it will need to ask the system for more (and never give it back!).

If you're looking at doing this as an academic exercise, then by all means, go ahead. Lots of toy OSen get written like that. But I don't think such an OS will ever become widely accepted.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

I think that the problem is moot, since I will probably end up using a nanokernel such as the MIT exokernel, which means at least initially that the Perl interpreter will have a back-end heap available which is small and fast. Other than that, I guess that not having some more-than-adequate GC algorithms available is not a problem - the code will still run until such time as a better Perl GC gets written.