Autosave: 2024-07-07 19:00:04
This commit is contained in:
parent
c4045ea9a0
commit
aa16fcba7c
4 changed files with 17 additions and 12 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
id: {{id}}
|
|
||||||
title: {{title}}
|
title: {{title}}
|
||||||
tags: []
|
tags: []
|
||||||
created: {{format-date now "full"}}
|
created: {{format-date now "full"}}
|
||||||
|
|
|
@ -32,11 +32,11 @@ utilise threads.
|
||||||
|
|
||||||
## Hardware considerations
|
## 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
|
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
|
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
|
[clock segments](./Clock_signals.md). This is known as scheduling and is managed
|
||||||
the thread belongs to.
|
by the process that the thread belongs to.
|
||||||
|
|
||||||
## Related notes
|
## Related notes
|
||||||
|
|
||||||
|
|
|
@ -9,23 +9,29 @@ tags:
|
||||||
## What is virtual memory?
|
## What is virtual memory?
|
||||||
|
|
||||||
Virtual memory is implemented at the level of the operating system and is an
|
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
|
abstraction on top of 'real', physical memory (i.e the bits stored within the
|
||||||
actual DRAM component.).
|
[DRAM](./Memory.md#DRAM).
|
||||||
|
|
||||||
When virtual memory is used, the CPU handles physical memory allocation and
|
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
|
presents this to the kernel as an idealised representation.
|
||||||
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.
|
|
||||||
|
|
||||||

|
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
|
It would require considerable processing work for the kernel to be tracing these
|
||||||
disparate memory sources at every instance. By working on an idealised
|
disparate memory sources at every instance. By working on an idealised
|
||||||
(contiguous, unlimited) memory set the kernel can focus on task management and
|
(contiguous, unlimited) memory set the kernel can focus on task management and
|
||||||
CPU sequencing as its primary task.
|
CPU sequencing as its primary task.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
The memory is idealised in that all locations are represented virtually as being
|
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
|
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
|
available memory can be presented as much larger than is actually the case and
|
||||||
|
|
Loading…
Add table
Reference in a new issue