mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Fix dead links
Some links do no longer exist, so I tried to find good replacements for them.
This commit is contained in:
@@ -32,7 +32,7 @@ The _heap_ is the memory area for long-lived allocations. The programmer can acc
|
|||||||
|
|
||||||
A good allocator is fast and reliable. It also effectively utilizes the available memory and keeps [fragmentation] low. Furthermore, it works well for concurrent applications and scales to any number of processors. It even optimizes the memory layout with respect to the CPU caches to improve [cache locality] and avoid [false sharing].
|
A good allocator is fast and reliable. It also effectively utilizes the available memory and keeps [fragmentation] low. Furthermore, it works well for concurrent applications and scales to any number of processors. It even optimizes the memory layout with respect to the CPU caches to improve [cache locality] and avoid [false sharing].
|
||||||
|
|
||||||
[cache locality]: http://docs.cray.com/books/S-2315-50/html-S-2315-50/qmeblljm.html
|
[cache locality]: https://www.geeksforgeeks.org/locality-of-reference-and-cache-operation-in-cache-memory/
|
||||||
[fragmentation]: https://en.wikipedia.org/wiki/Fragmentation_(computing)
|
[fragmentation]: https://en.wikipedia.org/wiki/Fragmentation_(computing)
|
||||||
[false sharing]: https://mechanical-sympathy.blogspot.de/2011/07/false-sharing.html
|
[false sharing]: https://mechanical-sympathy.blogspot.de/2011/07/false-sharing.html
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ The [first edition] required several C-tools for building:
|
|||||||
[entering long mode]: @/first-edition/posts/02-entering-longmode/index.md
|
[entering long mode]: @/first-edition/posts/02-entering-longmode/index.md
|
||||||
[`nasm`]: https://www.nasm.us/xdoc/2.13.03/html/nasmdoc1.html
|
[`nasm`]: https://www.nasm.us/xdoc/2.13.03/html/nasmdoc1.html
|
||||||
[`ld`]: https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html
|
[`ld`]: https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html
|
||||||
[linker script]: http://www.scoberlin.de/content/media/http/informatik/gcc_docs/ld_3.html
|
[linker script]: https://sourceware.org/binutils/docs/ld/Scripts.html
|
||||||
[`make`]: https://www.gnu.org/software/make/
|
[`make`]: https://www.gnu.org/software/make/
|
||||||
|
|
||||||
We got lots of feedback that this setup was difficult to get running [under macOS] and Windows. As a workaround, we [added support for docker], but that still required users to install and understand an additional dependency. So when we decided to create a second edition of the blog - originally because the order of posts led to jumps in difficulty - we thought about how we could avoid these C-dependencies.
|
We got lots of feedback that this setup was difficult to get running [under macOS] and Windows. As a workaround, we [added support for docker], but that still required users to install and understand an additional dependency. So when we decided to create a second edition of the blog - originally because the order of posts led to jumps in difficulty - we thought about how we could avoid these C-dependencies.
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ The [`eh_personality` language item] marks a function that is used for implement
|
|||||||
[`eh_personality` language item]: https://github.com/rust-lang/rust/blob/edb368491551a77d77a48446d4ee88b35490c565/src/libpanic_unwind/gcc.rs#L11-L45
|
[`eh_personality` language item]: https://github.com/rust-lang/rust/blob/edb368491551a77d77a48446d4ee88b35490c565/src/libpanic_unwind/gcc.rs#L11-L45
|
||||||
[stack unwinding]: https://www.bogotobogo.com/cplusplus/stackunwinding.php
|
[stack unwinding]: https://www.bogotobogo.com/cplusplus/stackunwinding.php
|
||||||
[libunwind]: https://www.nongnu.org/libunwind/
|
[libunwind]: https://www.nongnu.org/libunwind/
|
||||||
[structured exception handling]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680657(v=vs.85).aspx
|
[structured exception handling]: https://docs.microsoft.com/de-de/windows/win32/debug/structured-exception-handling
|
||||||
|
|
||||||
### Disabling Unwinding
|
### Disabling Unwinding
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ fn panic(_info: &PanicInfo) -> ! {
|
|||||||
|
|
||||||
我们可以自己实现语言项,但这是下下策:目前来看,语言项是高度不稳定的语言细节实现,它们不会经过编译期类型检查(所以编译器甚至不确保它们的参数类型是否正确)。幸运的是,我们有更稳定的方式,来修复上面的语言项错误。
|
我们可以自己实现语言项,但这是下下策:目前来看,语言项是高度不稳定的语言细节实现,它们不会经过编译期类型检查(所以编译器甚至不确保它们的参数类型是否正确)。幸运的是,我们有更稳定的方式,来修复上面的语言项错误。
|
||||||
|
|
||||||
`eh_personality` 语言项标记的函数,将被用于实现**栈展开**([stack unwinding](https://www.bogotobogo.com/cplusplus/stackunwinding.php))。在使用标准库的情况下,当 panic 发生时,Rust 将使用栈展开,来运行在栈上所有活跃的变量的**析构函数**(destructor)——这确保了所有使用的内存都被释放,允许调用程序的**父进程**(parent thread)捕获 panic,处理并继续运行。但是,栈展开是一个复杂的过程,如 Linux 的 [libunwind](https://www.nongnu.org/libunwind/) 或 Windows 的**结构化异常处理**([structured exception handling, SEH](https://msdn.microsoft.com/en-us/library/windows/desktop/ms680657(v=vs.85).aspx)),通常需要依赖于操作系统的库;所以我们不在自己编写的操作系统中使用它。
|
`eh_personality` 语言项标记的函数,将被用于实现**栈展开**([stack unwinding](https://www.bogotobogo.com/cplusplus/stackunwinding.php))。在使用标准库的情况下,当 panic 发生时,Rust 将使用栈展开,来运行在栈上所有活跃的变量的**析构函数**(destructor)——这确保了所有使用的内存都被释放,允许调用程序的**父进程**(parent thread)捕获 panic,处理并继续运行。但是,栈展开是一个复杂的过程,如 Linux 的 [libunwind](https://www.nongnu.org/libunwind/) 或 Windows 的**结构化异常处理**([structured exception handling, SEH](https://docs.microsoft.com/de-de/windows/win32/debug/structured-exception-handling)),通常需要依赖于操作系统的库;所以我们不在自己编写的操作系统中使用它。
|
||||||
|
|
||||||
### 禁用栈展开
|
### 禁用栈展开
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ Language item 是一些編譯器需求的特殊函式或類型。舉例來說,
|
|||||||
|
|
||||||
[stack unwinding]: https://www.bogotobogo.com/cplusplus/stackunwinding.php
|
[stack unwinding]: https://www.bogotobogo.com/cplusplus/stackunwinding.php
|
||||||
[libunwind]: https://www.nongnu.org/libunwind/
|
[libunwind]: https://www.nongnu.org/libunwind/
|
||||||
[structured exception handling]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680657(v=vs.85).aspx
|
[structured exception handling]: https://docs.microsoft.com/de-de/windows/win32/debug/structured-exception-handling
|
||||||
|
|
||||||
### 停用回溯
|
### 停用回溯
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ The responsibility of an allocator is to manage the available heap memory. It ne
|
|||||||
|
|
||||||
Apart from correctness, there are many secondary design goals. For example, the allocator should effectively utilize the available memory and keep [_fragmentation_] low. Furthermore, it should work well for concurrent applications and scale to any number of processors. For maximal performance, it could even optimize the memory layout with respect to the CPU caches to improve [cache locality] and avoid [false sharing].
|
Apart from correctness, there are many secondary design goals. For example, the allocator should effectively utilize the available memory and keep [_fragmentation_] low. Furthermore, it should work well for concurrent applications and scale to any number of processors. For maximal performance, it could even optimize the memory layout with respect to the CPU caches to improve [cache locality] and avoid [false sharing].
|
||||||
|
|
||||||
[cache locality]: http://docs.cray.com/books/S-2315-50/html-S-2315-50/qmeblljm.html
|
[cache locality]: https://www.geeksforgeeks.org/locality-of-reference-and-cache-operation-in-cache-memory/
|
||||||
[_fragmentation_]: https://en.wikipedia.org/wiki/Fragmentation_(computing)
|
[_fragmentation_]: https://en.wikipedia.org/wiki/Fragmentation_(computing)
|
||||||
[false sharing]: https://mechanical-sympathy.blogspot.de/2011/07/false-sharing.html
|
[false sharing]: https://mechanical-sympathy.blogspot.de/2011/07/false-sharing.html
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ bootimage run -- -serial mon:stdio
|
|||||||
|
|
||||||
Instead of standard output, QEMU supports [many more target devices][QEMU -serial]. For redirecting the output to a file, the argument is:
|
Instead of standard output, QEMU supports [many more target devices][QEMU -serial]. For redirecting the output to a file, the argument is:
|
||||||
|
|
||||||
[QEMU -serial]: https://qemu.weilnetz.de/doc/qemu-doc.html#Debug_002fExpert-options
|
[QEMU -serial]: https://qemu.weilnetz.de/doc/latest/system/invocation.html#hxtool-9
|
||||||
|
|
||||||
```
|
```
|
||||||
-serial file:output-file.txt
|
-serial file:output-file.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user