vault backup: 2025-05-02 18:57:49
This commit is contained in:
parent
73a62f4edd
commit
0553b398fc
3
.obsidian/appearance.json
vendored
3
.obsidian/appearance.json
vendored
@ -3,6 +3,7 @@
|
|||||||
"accentColor": "#efb9fd",
|
"accentColor": "#efb9fd",
|
||||||
"theme": "obsidian",
|
"theme": "obsidian",
|
||||||
"enabledCssSnippets": [
|
"enabledCssSnippets": [
|
||||||
"dark_pdf"
|
"dark_pdf",
|
||||||
|
"images"
|
||||||
]
|
]
|
||||||
}
|
}
|
9
.obsidian/snippets/images.css
vendored
Normal file
9
.obsidian/snippets/images.css
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
max-width:500px;
|
||||||
|
}
|
||||||
|
div.mermaid {
|
||||||
|
text-align: center;
|
||||||
|
}
|
32
.obsidian/workspace.json
vendored
32
.obsidian/workspace.json
vendored
@ -4,24 +4,37 @@
|
|||||||
"type": "split",
|
"type": "split",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "bc19ba9918441c67",
|
"id": "1bd3c6c2ca7655f0",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "55ce0e76102300bd",
|
"id": "46800597ab6eb156",
|
||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Operating Systems/Memory Management.md",
|
"file": "Operating Systems/Processes and Threads.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
},
|
},
|
||||||
"icon": "lucide-file",
|
"icon": "lucide-file",
|
||||||
"title": "Memory Management"
|
"title": "Processes and Threads"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "33dc0f1ebcbf4c21",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "release-notes",
|
||||||
|
"state": {
|
||||||
|
"currentVersion": "1.8.10"
|
||||||
|
},
|
||||||
|
"icon": "lucide-book-up",
|
||||||
|
"title": "Release Notes 1.8.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"currentTab": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"direction": "vertical"
|
"direction": "vertical"
|
||||||
@ -198,14 +211,15 @@
|
|||||||
"omnisearch:Omnisearch": false
|
"omnisearch:Omnisearch": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "55ce0e76102300bd",
|
"active": "33dc0f1ebcbf4c21",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Operating Systems/assets/Pasted image 20250502183523.png",
|
|
||||||
"Operating Systems/Overview.md",
|
"Operating Systems/Overview.md",
|
||||||
"Operating Systems/Processes and Threads.md",
|
"Operating Systems/Processes and Threads.md",
|
||||||
"Operating Systems/Scheduling.md",
|
"Operating Systems/Scheduling.md",
|
||||||
"Operating Systems/assets/Pasted image 20250502183221.png",
|
"Operating Systems/Inter-Process Communication.md",
|
||||||
"Operating Systems/Memory Management.md",
|
"Operating Systems/Memory Management.md",
|
||||||
|
"Operating Systems/assets/Pasted image 20250502183523.png",
|
||||||
|
"Operating Systems/assets/Pasted image 20250502183221.png",
|
||||||
"Operating Systems/assets/Pasted image 20250502183310.png",
|
"Operating Systems/assets/Pasted image 20250502183310.png",
|
||||||
"Operating Systems/assets/Pasted image 20250502183242.png",
|
"Operating Systems/assets/Pasted image 20250502183242.png",
|
||||||
"Operating Systems/assets/Pasted image 20250502183152.png",
|
"Operating Systems/assets/Pasted image 20250502183152.png",
|
||||||
@ -213,13 +227,11 @@
|
|||||||
"Operating Systems/assets/Pasted image 20250502182934.png",
|
"Operating Systems/assets/Pasted image 20250502182934.png",
|
||||||
"README.md",
|
"README.md",
|
||||||
"Pasted image 20250502182936.png",
|
"Pasted image 20250502182936.png",
|
||||||
"Operating Systems/Inter-Process Communication.md",
|
|
||||||
"Untitled.canvas",
|
"Untitled.canvas",
|
||||||
"Discrete Structures/Midterm/attempt 2.md",
|
"Discrete Structures/Midterm/attempt 2.md",
|
||||||
"Discrete Structures/Mathematical Data Structures.md",
|
"Discrete Structures/Mathematical Data Structures.md",
|
||||||
"Operating Systems/assets/image.png",
|
"Operating Systems/assets/image.png",
|
||||||
"Operating Systems/assets/Pasted image 20250502181012.png",
|
"Operating Systems/assets/Pasted image 20250502181012.png",
|
||||||
"Operating Systems/assets/Pasted image 20250502180811.png",
|
|
||||||
"unicef.org.md",
|
"unicef.org.md",
|
||||||
"Linear Algebra/Matrices.md",
|
"Linear Algebra/Matrices.md",
|
||||||
"Languages & Machines/Regular languages.md",
|
"Languages & Machines/Regular languages.md",
|
||||||
|
@ -53,7 +53,7 @@ The result depends on when context switching[^1] happens.
|
|||||||
The part of the program where shared memory is accessed is called the **Critical Section (CS)**.
|
The part of the program where shared memory is accessed is called the **Critical Section (CS)**.
|
||||||
|
|
||||||
### Critical Regions/Sections
|
### Critical Regions/Sections
|
||||||

|

|
||||||
|
|
||||||
### Avoiding race conditions
|
### Avoiding race conditions
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ It defines procedures (i.e. methods).
|
|||||||
|
|
||||||
It uses **condition variables** (often with wait and signal[^3]operations) to allow threads to wait for certain conditions to be met before proceeding.
|
It uses **condition variables** (often with wait and signal[^3]operations) to allow threads to wait for certain conditions to be met before proceeding.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ backlinks:
|
|||||||
- "[[Overview#Multitasking/Timesharing]]"
|
- "[[Overview#Multitasking/Timesharing]]"
|
||||||
---
|
---
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
(C.U. - Control Unit, does FDE and communicates with everything like ALU, registers, etc.)
|
(C.U. - Control Unit, does FDE and communicates with everything like ALU, registers, etc.)
|
||||||
|
|
||||||
@ -47,26 +47,27 @@ The first solution for memory management is segmentation.
|
|||||||
|
|
||||||
### Fragmentation
|
### Fragmentation
|
||||||
- Each process requires a contiguous block
|
- Each process requires a contiguous block
|
||||||
|
|
||||||
> [!caution] But fragmentation bad!
|
> [!caution] But fragmentation bad!
|
||||||
> It happens when the free space of the main memory is divided up into multiple parts **between** processes. It's pretty clear why that's bad.
|
> It happens when the free space of the main memory is divided up into multiple parts **between** processes. It's pretty clear why that's bad.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
### Memory Allocation Algorithms
|
### Memory Allocation Algorithms
|
||||||
Define which free segment should be allocated to a new process.
|
Define which free segment should be allocated to a new process.
|
||||||
|
|
||||||
#### Best Fit
|
#### Best Fit
|
||||||

|

|
||||||
|
|
||||||
#### Worst fit
|
#### Worst fit
|
||||||

|

|
||||||
|
|
||||||
#### First fit
|
#### First fit
|
||||||

|

|
||||||
|
|
||||||
#### Compaction
|
#### Compaction
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
>[!warning]- Issues with this
|
>[!warning]- Issues with this
|
||||||
@ -77,7 +78,7 @@ Define which free segment should be allocated to a new process.
|
|||||||
## Direct Memory Access (DMA)
|
## Direct Memory Access (DMA)
|
||||||
In order to let CPU execute process instructions while data is being transferred from disk to memory, direct memory access (DMA) is used.
|
In order to let CPU execute process instructions while data is being transferred from disk to memory, direct memory access (DMA) is used.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Fix-sized memory blocks
|
## Fix-sized memory blocks
|
||||||
In this scheme, memory is partitioned into blocks of the same size. Every block has the same number of bytes, which makes it easier for the system to keep track of which portions of memory are allocated or available.
|
In this scheme, memory is partitioned into blocks of the same size. Every block has the same number of bytes, which makes it easier for the system to keep track of which portions of memory are allocated or available.
|
||||||
|
@ -116,6 +116,7 @@ int main() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user