Skip to content

Commit c171d09

Browse files
committed
Reorder sections
1 parent 75cdc7d commit c171d09

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

content/this-month/2022-07/index.md

+46-46
Original file line numberDiff line numberDiff line change
@@ -104,52 +104,6 @@ This Month, [@dvdhrm](https://github.com/dvdhrm) started an initiative to get th
104104

105105
Please reach out if you would like to help with this!
106106

107-
### Comparison between [`phip1611/simple-chunk-allocator`](https://github.com/phip1611/simple-chunk-allocator) and [`rust-osdev/linked-list-allocator`](https://github.com/rust-osdev/linked-list-allocator)
108-
109-
<span class="maintainers">(Section written by [@phip1611](https://github.com/phip1611))</span>
110-
111-
In March 2022, Philipp Schuster proposed his [`simple-chunk-allocator`](https://github.com/phip1611/simple-chunk-allocator)
112-
crate. It focuses on being a very simple-to-use general purpose allocator that "just works" for various workloads
113-
in `no_std` context. However, there are other allocators, such as [`rust-osdev/linked-list-allocator`](https://github.com/rust-osdev/linked-list-allocator).
114-
When you choose an allocator, you should not only consider the API and how to set it up, but actually the runtime
115-
characteristics. OS research has shown us that there is no perfect allocator. You can optimize an allocator for speed,
116-
memory utilization (i.e., prevent fragmentation), code simplicity, and worst case execution time. There exist different
117-
strategies to reach those goals: first-fit, next-fit, best-fit
118-
119-
Recently, Philipp benchmarked his `simple-chunk-allocator` against [`rust-osdev/linked-list-allocator`](https://github.com/rust-osdev/linked-list-allocator)
120-
to learn under which conditions which performs better. But at first, let's point out some differences. `simple-chunk-allocator` needs
121-
a static backing storage for heap and an additional static backing storage for its internal bookkeeping. `linked-list-allocator`
122-
can solve this better by organizing the heap with the heap backing memory itself. `simple-chunk-allocator` uses a slightly
123-
adjusted variant of best-fit that tries to reduce fragmentation. `linked-list-allocator` is a first-fit allocator that
124-
has a lower performance to more heap is used.
125-
126-
The relevant outcome is that `simple-chunk-allocator` always outperforms `linked-list-allocator` in median allocation time.
127-
For stress tests with a low heap consumption, thus, no long stress test with 90% and more heap usage, `simple-chunk-allocator`
128-
also outperforms `linked-list-allocator` in average allocation time. However, if the heap is full and frequent allocations
129-
happen, the average (but not the median) allocation time of `linked-list-allocator` is better. Also, `linked-list-allocator`
130-
can come close to 100% heap usage which is not the case for `simple-chunk-allocator`, because it suffers from internal
131-
fragmentation under certain circumstances. Last but not least, even small allocations always takes up a multiple of the
132-
used chunk size in `simple-chunk-allocator`.
133-
134-
In the end, there is no optimal allocator. You must choose which properties are more relevant for your scenario.
135-
For concrete measurements, please head to the README of [`simple-chunk-allocator`](https://github.com/phip1611/simple-chunk-allocator).
136-
137-
### [`nt-list`: Windows Linked Lists in idiomatic Rust](https://colinfinck.de/posts/nt-list-windows-linked-lists-in-idiomatic-rust/)
138-
139-
<span class="maintainers">(Section written by [@ColinFinck](https://github.com/ColinFinck))</span>
140-
141-
On his quest to develop a ReactOS/Windows bootloader in Rust, Colin Finck released another building block as a reusable `no_std` crate this month.
142-
After [nt-hive](https://github.com/ColinFinck/nt-hive) for reading Windows registry hive files and [ntfs](https://github.com/ColinFinck/ntfs) to access Microsoft's proprietary NTFS filesystem, the [nt-list](https://github.com/ColinFinck/nt-list) crate provides a type-safe and idiomatic Rust interface to work with Windows Linked Lists, known as [`LIST_ENTRY`](https://docs.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-list_entry) and [`SINGLE_LIST_ENTRY`](https://docs.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-single_list_entry).
143-
This is what Windows, Windows drivers, and components influenced by Windows (e.g. UEFI) have been using for a long time to uniformly handle linked lists.
144-
145-
[Colin's blog post](https://colinfinck.de/posts/nt-list-windows-linked-lists-in-idiomatic-rust/) goes into detail about some of the differences between textbook and Windows linked lists and the challenges in coming up with a safe Rust implementation.
146-
The final interface provided by nt-list is as simple to use as `Vec` while being fully compatible to the original `LIST_ENTRY`.
147-
The compatibility is proven in a WinDbg debugging session:
148-
149-
[![Using WinDbg to traverse a Windows Linked List created by the nt-list Rust crate](windbg.png "Using WinDbg to traverse a Windows Linked List created by the nt-list Rust crate")](windbg.png)
150-
151-
If you want to give it a spin, the crate is available on [crates.io](https://crates.io/crates/nt-list), and make sure to also check the [docs](https://docs.rs/nt-list/).
152-
153107
### [Theseus OS](https://github.com/theseus-os/Theseus)
154108

155109
<span class="maintainers">(Section written by [Kevin Boos](https://www.theseus-os.com/kevinaboos/) ([@kevinaboos](https://github.com/kevinaboos)))</span>
@@ -181,6 +135,52 @@ Over the past month (or two), Theseus OS made significant progress on a variety
181135

182136
Check out the [Theseus OS blog](https://www.theseus-os.com/) for the latest details.
183137

138+
### [`nt-list`: Windows Linked Lists in idiomatic Rust](https://colinfinck.de/posts/nt-list-windows-linked-lists-in-idiomatic-rust/)
139+
140+
<span class="maintainers">(Section written by [@ColinFinck](https://github.com/ColinFinck))</span>
141+
142+
On his quest to develop a ReactOS/Windows bootloader in Rust, Colin Finck released another building block as a reusable `no_std` crate this month.
143+
After [nt-hive](https://github.com/ColinFinck/nt-hive) for reading Windows registry hive files and [ntfs](https://github.com/ColinFinck/ntfs) to access Microsoft's proprietary NTFS filesystem, the [nt-list](https://github.com/ColinFinck/nt-list) crate provides a type-safe and idiomatic Rust interface to work with Windows Linked Lists, known as [`LIST_ENTRY`](https://docs.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-list_entry) and [`SINGLE_LIST_ENTRY`](https://docs.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-single_list_entry).
144+
This is what Windows, Windows drivers, and components influenced by Windows (e.g. UEFI) have been using for a long time to uniformly handle linked lists.
145+
146+
[Colin's blog post](https://colinfinck.de/posts/nt-list-windows-linked-lists-in-idiomatic-rust/) goes into detail about some of the differences between textbook and Windows linked lists and the challenges in coming up with a safe Rust implementation.
147+
The final interface provided by nt-list is as simple to use as `Vec` while being fully compatible to the original `LIST_ENTRY`.
148+
The compatibility is proven in a WinDbg debugging session:
149+
150+
[![Using WinDbg to traverse a Windows Linked List created by the nt-list Rust crate](windbg.png "Using WinDbg to traverse a Windows Linked List created by the nt-list Rust crate")](windbg.png)
151+
152+
If you want to give it a spin, the crate is available on [crates.io](https://crates.io/crates/nt-list), and make sure to also check the [docs](https://docs.rs/nt-list/).
153+
154+
### Comparison between [`phip1611/simple-chunk-allocator`](https://github.com/phip1611/simple-chunk-allocator) and [`rust-osdev/linked-list-allocator`](https://github.com/rust-osdev/linked-list-allocator)
155+
156+
<span class="maintainers">(Section written by [@phip1611](https://github.com/phip1611))</span>
157+
158+
In March 2022, Philipp Schuster proposed his [`simple-chunk-allocator`](https://github.com/phip1611/simple-chunk-allocator)
159+
crate. It focuses on being a very simple-to-use general purpose allocator that "just works" for various workloads
160+
in `no_std` context. However, there are other allocators, such as [`rust-osdev/linked-list-allocator`](https://github.com/rust-osdev/linked-list-allocator).
161+
When you choose an allocator, you should not only consider the API and how to set it up, but actually the runtime
162+
characteristics. OS research has shown us that there is no perfect allocator. You can optimize an allocator for speed,
163+
memory utilization (i.e., prevent fragmentation), code simplicity, and worst case execution time. There exist different
164+
strategies to reach those goals: first-fit, next-fit, best-fit
165+
166+
Recently, Philipp benchmarked his `simple-chunk-allocator` against [`rust-osdev/linked-list-allocator`](https://github.com/rust-osdev/linked-list-allocator)
167+
to learn under which conditions which performs better. But at first, let's point out some differences. `simple-chunk-allocator` needs
168+
a static backing storage for heap and an additional static backing storage for its internal bookkeeping. `linked-list-allocator`
169+
can solve this better by organizing the heap with the heap backing memory itself. `simple-chunk-allocator` uses a slightly
170+
adjusted variant of best-fit that tries to reduce fragmentation. `linked-list-allocator` is a first-fit allocator that
171+
has a lower performance to more heap is used.
172+
173+
The relevant outcome is that `simple-chunk-allocator` always outperforms `linked-list-allocator` in median allocation time.
174+
For stress tests with a low heap consumption, thus, no long stress test with 90% and more heap usage, `simple-chunk-allocator`
175+
also outperforms `linked-list-allocator` in average allocation time. However, if the heap is full and frequent allocations
176+
happen, the average (but not the median) allocation time of `linked-list-allocator` is better. Also, `linked-list-allocator`
177+
can come close to 100% heap usage which is not the case for `simple-chunk-allocator`, because it suffers from internal
178+
fragmentation under certain circumstances. Last but not least, even small allocations always takes up a multiple of the
179+
used chunk size in `simple-chunk-allocator`.
180+
181+
In the end, there is no optimal allocator. You must choose which properties are more relevant for your scenario.
182+
For concrete measurements, please head to the README of [`simple-chunk-allocator`](https://github.com/phip1611/simple-chunk-allocator).
183+
184184
## Join Us?
185185

186186
Are you interested in Rust-based operating system development? Our `rust-osdev` organization is always open to new members and new projects. Just let us know if you want to join! A good way for getting in touch is our [gitter channel](https://gitter.im/rust-osdev/Lobby).

0 commit comments

Comments
 (0)