or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
xv6, the good parts
tags:
sketchdance
Summarize what the various components of xv6 do, and what is missing, as a way to come to grips with what is needed for a minimal operating system.
What is an OS?
This is part of my larger struggle to answer for myself, what is an operating system? What belongs in the OS? How would one go about building an OS today, from scratch (or from parts). There are multiple answers to all of these questions, which is part of why I struggle with it.
Part of me would like to write my own OS. I like the idea behind STEPS of creating an OS in under 10K lines of code, although I don't agree with many of their approaches, and ultimately they failed to even leave useful artifacts behind. OSes do exist that meet the <10K criteria, including this research OS xv6, based on the ideas behind unix version 6.
On the other hand, xv6 does not contain much of what I would consider necessary for a usable OS: networking and graphics to name two biggies. Even Plan 9, which does have decent, if quirky, networking and graphics, lacks a decent web browser, something that tends to be an issue with small, artisinal OSes, given how huge and all-consuming web browsers have grown. Indeed, it seems wasteful to recreate from scratch what you can get from SDL2 (Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D), which is probably why most emulators are built on it. Even 100 Rabbits minimal VM uses SDL2. And for Unicode support I'll probably need something like IBM's components for Unicode, another substantial dependency that would be basically impossible to build on my own.
And, at least for now, targetting an emulated environment like QEMU probably makes more sense than running on hardware like a Raspberry Pi, at least until I understand the moving parts better.
Related
And the bad parts…