diff --git a/.zk/notebook.db b/.zk/notebook.db index ff3ab26..9c5418d 100644 Binary files a/.zk/notebook.db and b/.zk/notebook.db differ diff --git a/.zk/templates/default.md b/.zk/templates/default.md index 14b57b9..4a38a02 100644 --- a/.zk/templates/default.md +++ b/.zk/templates/default.md @@ -1,5 +1,4 @@ --- -id: {{id}} title: {{title}} tags: [] created: {{format-date now "full"}} diff --git a/zk/Threads.md b/zk/Threads.md index b2a2cb3..99d1ef7 100644 --- a/zk/Threads.md +++ b/zk/Threads.md @@ -32,11 +32,11 @@ utilise threads. ## Hardware considerations -Each [processor core](./CPU_architecture.md) can only one one thread at a time +Each [processor core](./CPU_architecture.md) can only run one thread at a time so the number of cores that a device's CPU has deterimines how many threads can run at once. In practice, then, the CPU shuffles between multiple threads in -clock segments. This is known as scheduling and is managed by the process that -the thread belongs to. +[clock segments](./Clock_signals.md). This is known as scheduling and is managed +by the process that the thread belongs to. ## Related notes diff --git a/zk/Virtual_memory_and_the_MMU_in_Linux.md b/zk/Virtual_memory_and_the_MMU_in_Linux.md index c3a1a48..e3d92b3 100644 --- a/zk/Virtual_memory_and_the_MMU_in_Linux.md +++ b/zk/Virtual_memory_and_the_MMU_in_Linux.md @@ -9,23 +9,29 @@ tags: ## What is virtual memory? Virtual memory is implemented at the level of the operating system and is an -abstraction on top of 'real', physical memory (i.e the charges stored within the -actual DRAM component.). +abstraction on top of 'real', physical memory (i.e the bits stored within the +[DRAM](./Memory.md#DRAM). When virtual memory is used, the CPU handles physical memory allocation and -presents this to the kernel as an idealised representation. This means that the -kernel and, by extension, programs and processes do not need to think about -accessing the real memory blocks. This reduces complexity because often memory -will be allocated in places that are non-contiguous with similar running -processes or be located in the cache or swap memory on the disk. +presents this to the kernel as an idealised representation. -![](/img/virtual-memory-diagram.jpg) +This means that the kernel ( and, by extension, programs and processes) does not +need to think about accessing the real memory blocks. + +This reduces complexity because often memory will be allocated in places that +are non-contiguous with similar running processes and may even be located in the +cache or in swap memory on the disk, rather than the actual main memory. + +Virtual memory presents a unified abstraction to the kernel over and above these +specific memory locations. It would require considerable processing work for the kernel to be tracing these disparate memory sources at every instance. By working on an idealised (contiguous, unlimited) memory set the kernel can focus on task management and CPU sequencing as its primary task. +![](/img/virtual-memory-diagram.jpg) + The memory is idealised in that all locations are represented virtually as being contiguous (even when this is not physically the case). Secondly, quantities of available memory can be presented as much larger than is actually the case and