Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New post on the "Writing an OS in Rust" blog #479

Open
phil-opp opened this issue Oct 22, 2018 · 8 comments
Open

New post on the "Writing an OS in Rust" blog #479

phil-opp opened this issue Oct 22, 2018 · 8 comments

Comments

@phil-opp
Copy link
Owner

phil-opp commented Oct 22, 2018

This issue will receive comments for each new post. You can subscribe to this issue by clicking the "Subscribe" button on the right:

Subscribe button

This only works if you're logged in. Github will then send you notifications whenever a new post is released.

(This issue is locked to ensure that only administrators can comment.)

Repository owner locked and limited conversation to collaborators Oct 22, 2018
@phil-opp
Copy link
Owner Author

There's a new post on the "Writing an OS in Rust" blog: Hardware Interrupts! It explains how to set up the programmable interrupt controller to receive interrupts from the hardware timer, and also adds support for keyboard input.

@phil-opp phil-opp changed the title Subscribe to new posts New post on the "Writing an OS in Rust" blog Oct 22, 2018
@phil-opp
Copy link
Owner Author

I just published a new post on the blog: Introduction to Paging.

The post introduces paging, a very common memory management scheme that we will also use for our operating system. It explains why memory isolation is needed, how segmentation works, what virtual memory is, and how paging solves memory fragmentation issues. It also explores the layout of multilevel page tables on the x86_64 architecture.

@phil-opp
Copy link
Owner Author

I just published a new post on the blog: Advanced Paging.

The post explains techniques to make the physical page table frames accessible to our kernel. It then uses such a technique to implement a function that translates virtual to physical addresses. It also explains how to create new mappings in the page tables.

@phil-opp
Copy link
Owner Author

I just published a new post on the blog: Paging Implementation.

The post shows how to implement paging support in our kernel. It first explores different techniques to make the physical page table frames accessible to the kernel and discusses their respective advantages and drawbacks. It then implements an address translation function and a function to create a new mapping.

For those of you who think this sounds familiar: We already published a post titled Advanced Paging with similar content at the end of January. There was some negative feedback about the implementation approach of that post, so I decided to rewrite it. The Paging Implementation post is the result of that rewrite and I think it's both better and simpler to understand than the previous post.

@phil-opp
Copy link
Owner Author

I just published a new post on the blog: Testing.

The post is a rewrite of the previous Unit Testing and Integration Tests posts. Instead of running unit tests on the host system, it sets up a custom test framework to run all tests inside QEMU.

Along with this post, a update for the Minimal Rust Kernel post landed. Combined, you can now simply use cargo xrun and cargo xtest for running/testing your kernel. This makes the project ready for the std Aware Cargo RFC. When the RFC is merged and implemented, cargo-xbuild will no longer be needed and the familiar cargo build, cargo run, and cargo test commands will just work.

@phil-opp
Copy link
Owner Author

I just published a new post on the blog: Heap Allocation.

This post adds support for heap allocation to our kernel. First, it gives an introduction to dynamic memory and shows how the borrow checker prevents common allocation errors. It then implements the basic allocation interface of Rust, creates a heap memory region, and sets up an allocator crate. At the end of this post all the allocation and collection types of the built-in alloc crate will be available to our kernel.

@phil-opp
Copy link
Owner Author

I just published a new post on the blog: Allocator Designs.

This post explains how to implement heap allocators from scratch. It presents and discusses different allocator designs, including bump allocation, linked list allocation, and fixed-size block allocation. For each of the three designs, we will create a basic implementation that can be used for our kernel.

@phil-opp
Copy link
Owner Author

Hello everyone,

after over a month of work, I finally finished a new post for the Writing an OS in Rust blog: Async/Await.

The post explores cooperative multitasking and the async/await feature of Rust. We take a detailed look how async/await works in Rust, including the design of the Future trait, the state machine transformation, and pinning. We then add basic support for async/await to our kernel by creating an asynchronous keyboard task and a basic executor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant