ArcanOS FOOL released

It may have taken a little longer than I would have initially liked, but I’m pleased to announce that, as of this evening, ArcanOS has had its first milestone release — FOOL.  As I have mentioned in the ArcanOS wiki on Google Code, I think version numbers are pretty arbitrary, so I have instead opted to make milestone releases and name them after the trump cards in a tarot deck.  The goals for FOOL are pretty apt for its name.  In a tarot deck, “the fool” is often depicted as a young man blissfully stepping off a cliff.  The goals for this release were to basically lay the groundwork for getting to the “real work.”  This meant having a coherent build process and test/debugging platform and developing a bootloader, rudimentary kernel, basic debugging tools (like logging), exception handlers, and at least one interrupt handler.  Having all these basic pieces in place means that I have something stable I can use for future development.

Currently, ArcanOS is little more than some initialization code and a spinlock.  There is a basic handler for the keyboard interrupt, but that’s it.  There’s very little to try out, as there’s no user-space and thus no programs written for it.  Still, I’m pretty pleased with it.  It’s the first personal project I’ve taken on since 2001, and most personal open-source projects don’t even make it to their first milestone release.

The next release will be ArcanOS MAGUS.  I’m currently scoping out my goals for it.  I know I want to move the memory model to a flat, paged model.  This will affect multiple parts of the code base because it’ll mean that I will be able to stop adjusting for the segmentation offset whenever I need a linear or physical address.  I suspect this alone will make paging the major effort, but I want to do some other things that will keep moving things forward.  After all, having an environment for user processes is the point at which things get really fun.

As I mention in the ArcanOS notes, I owe a debt of gratitude to Dr. Lorenzo Alvisi as well as the xv6 project over at MIT.  xv6, in an earlier iteration, was known as JOS, which Dr. Alvisi used to produce a series of operating systems lab exercises for his operating system courses.  ArcanOS started out as one of those lab exercises, and though it has changed very significantly already, it still bears much of the original bootloader code.

Inheriting Plunder

“When plunder becomes a way of life for a group of men living together in society, they create for themselves in the course of time a legal system that authorizes it and a moral code that glorifies it.”

–Frederic Bastiat

During my Christmas visit to my family, this quote came up in conversation.  The member of my family in question identifies as having a particularly conservative political perspective, but I must confess that I have never heard a coherent point of view from him, and most of his arguments seem motivated by a general and non-specific hatred of government and by anger for all those he has personally declared to be lazy.  This, of course, makes direct conversation with him difficult and is a motivating reason why I’m writing about it here, on my blog, where there is time and space to form my thoughts.  In due course of the conversation, I simply thanked him to not try to talk about politics with me again.

Having lofted out this Bastiat quote, he in short order declared that people who draw unemployment benefits beyond some arbitrary period of time (I think he said “three weeks”) are plunderers.  From a relative point of view, I suppose it’s an argument which one could make.  Unemployment benefits are paid out by the government, and the government does collect funds by force, and so you could, in a roundabout way, make the argument that the unemployed are living on the spoils collected by government thugs.  Of course, from this particular person’s point of view, it works this way– work makes value, but theft is generally easier, especially if it can be done without direct confrontation of one’s quarry.  Of course, the lazy don’t want to work and want to keep collecting their plunder, so over time, politicians seeking power learn how to offer the lazy people their plunder, and so form a society which enables and glorifies them.  Collectively, these parasites have formed the American welfare society and continue to steal from honest and hard-working productive members of society through the efforts of left-wing politicians.

The amazing thing here is that there is one thing I do agree with him over– there are lazy people in this world who don’t live from the sweat of their brows, and those people are parasites and they should be thrown out on their asses so that they have to work like the rest of us.  It’s just that, in the general continuum of parasites, someone who’s been long laid off doesn’t really rouse my attention.  I’m concerned with real plunderers.

Who are they?  The ownership class.  They’re those who do not work for their money but have instead live on the capital they have amassed.  They’re the landlords, the speculators, the heirs, and the investors.  They have absolutely had the power to structure a society to glorify their behavior, and they have, for they not only lead attractive lives but they are seen as right to do so.  They have even succeeded in inculcating a morality which glorifies them to the point that most people don’t even know how to speak about their lives with moral clarity.  We say they live on the profits of their investments and owned capital, and this sounds quite reasonable; however, it’s a platitude that hides the reality of the situation.  What they live on is plunder, and it’s a plunder that morality and the state defends.

Conventional capital-labor relationships make this perfectly clear.  You hire someone to make you widgets.  You sell the widgets for $X, you pay the laborer $Y, such that Y < X, and then you keep $X-Y for yourself as profit.  Of course, in a real modern widget-making business, you get someone to do the selling for you.  The goal of an owner is to, ultimately, maximize profit and minimize unwanted involvement in getting that profit.  This reaches its ultimate point in a corporation, where the owners of the company do little more than vote for people to hire the people who hire and manage the other laborers.  Ultimately, this means that owning a share of profits means getting money for, effectively, not doing anything.  But where does this money come from?  Well, barring artificial shortage (such as those produced via regulation or monopoly), the price of a good reflects the value of the labor used to produce it.  Goods that can be produced more cheaply, will, because consumers want to maximize utility/price ratios.  So, a good that costs $X had, from a consumer’s perspective, $X worth of labor in it.  Since the laborers were paid $Y instead, however, they have not received full compensation for their production of the product.  That skim off the top is the province of the owner(s), which they receive for doing as little as possible (and often nothing at all).  Anyone who works knows this is true and tries not to think about it.  The only reason it is accepted is because those who work don’t have the means to do otherwise, and the major arguments workers give themselves are part of a mythology of the social necessity of their work.  The latter is a plea to oneself to ignore the fact that, from the perspective of owners, virtually all workers are replaceable.

The system itself is self-feeding.  The primary argument why investors are needed is because they have the means to take risks on paying for labor which isn’t economically valuable.  Yet the primary reason this is so is because the majority of wealth is collected in the hands of relatively few people, to the point that no endeavor of any consequence can happen without the involvement of the ownership class in some fashion or another.  Once they are involved, they claim a cut of the equity of that endeavor, thus ensuring the continued concentration of that wealth, thus making their participation in society necessary.

Plunder and its inheritors, though, continue down to even smaller things in life, like the plot of land my family owns.  Land doesn’t just appear out of nowhere.  My parents bought their house from someone, who was the tail of a long chain of prior owners.  The first in that chain bought the land from the local government (the city or the county, depending on incorporation lines).  Those local governments formed as the native peoples of Florida were wiped out and deported and Europeans moved in.  In America, virtually all land was the province of one group of native people or another, and prior generations were quite happy to treat them as pests, wipe them out, and make the land suitable for re-use.  And since then, this land has been resold to others over and over and over again.  My family lives on a plot of plunder.  If you own land, you own plunder.

And that is, for better or for worse, the reality.  The heritage of America is one of plunder.  Our land was plundered from nations of people who already lived here, and they were “dealt with” so that we could bring in our own capitalistic society, one which begins with a plundering class exploiting the laboring masses and which effortlessly perpetuates itself.  Plunder is inevitable in our society, and a lazy few live well on that plunder.  And, frankly, I’m at least a little guilty myself.  I’ve owned stocks since I was eight years old, and I may well sell my portfolio to buy a house.  And like most Americans, that’s important to me…my little slice of plunder is also my ticket to having a patch of society that’s mine.

That’s the reality of plunder.

ArcanOS FOOL Feature Complete

I am pleased to announce that the current push of ArcanOS represents a completion of features for release FOOL.  The feature list won’t look very big, but remember that this is a labor of love being done in my (not very ample) spare time, and that most homebrew OS projects never even make it this far.  The list of features slated for the FOOL release are:

  • Bootloader which reads the kernel from disk
  • Protected mode operation
  • Flat memory model achieved through segmentation only
  • Identification of the major kernel’s binary sections in memory
  • Scratch space memory allocator
  • Debugging output via a console print
  • Hardware exception handlers
  • Keyboard interrupt handler

I’m opting to call feature complete at this point because ArcanOS FOOL represents a small laundry list of features necessary to build the next set of kernel features.  That is…FOOL is a kernel that doesn’t just fall completely on its face.  Issues of booting have been worked out, the memory model is understood (if primitive), the exception handlers are in place so errors don’t cause a spontaneous reset, and the keyboard interrupt handler demonstrates that the PIC is remapped and that code for creating and registering interrupt service routines works.  I don’t want to go any further on feature development at this point because I want to enable paging and use it to enforce the flat memory model, and switching to paging will mean having to deal with memory-mapped hardware (like the console) differently.  A smaller codebase is easier to convert than a larger one.

ArcanOS is going to go through a cleanup and documentation phase now.  I want to thoroughly scrub all unnecessary code from the codebase and to fully get ArcanOS off its JOS heritage so that it’ll be a consistent project moving forward.  I’ll then carve off a release and post a build so people can play with it using Bochs, and then I’ll write Wiki pages to help document my major headaches.  Then, it’ll be time to start looking forward to release MAGUS.