vault backup: 2025-03-08 17:31:57
This commit is contained in:
parent
cdf5feb6c3
commit
414e2ab154
2 changed files with 12 additions and 12 deletions
6
.obsidian/workspace.json
vendored
6
.obsidian/workspace.json
vendored
|
@ -13,12 +13,12 @@
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Concurrent Systems/notes/Lezione1.md",
|
"file": "Concurrent Systems/notes/1 - CS Basics.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
},
|
},
|
||||||
"icon": "lucide-file",
|
"icon": "lucide-file",
|
||||||
"title": "Lezione1"
|
"title": "1 - CS Basics"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
"Concurrent Systems/notes/images/Pasted image 20250304090207.png",
|
"Concurrent Systems/notes/images/Pasted image 20250304090207.png",
|
||||||
"Concurrent Systems/notes/images/Pasted image 20250304084901.png",
|
"Concurrent Systems/notes/images/Pasted image 20250304084901.png",
|
||||||
"Concurrent Systems/notes/images/Pasted image 20250304084537.png",
|
"Concurrent Systems/notes/images/Pasted image 20250304084537.png",
|
||||||
"Concurrent Systems/notes/Lezione1.md",
|
"Concurrent Systems/notes/1 - CS Basics.md",
|
||||||
"Concurrent Systems/slides/class 1.pdf",
|
"Concurrent Systems/slides/class 1.pdf",
|
||||||
"Data and Network Security/slides/2025 - DNS - Lecture 2.pdf",
|
"Data and Network Security/slides/2025 - DNS - Lecture 2.pdf",
|
||||||
"Concurrent Systems/notes/images/Pasted image 20250303093116.png",
|
"Concurrent Systems/notes/images/Pasted image 20250303093116.png",
|
||||||
|
|
|
@ -6,26 +6,26 @@
|
||||||
- If the process follows one single control flow (i.e. one program counter) then it is a **sequential process**, or **thread**.
|
- If the process follows one single control flow (i.e. one program counter) then it is a **sequential process**, or **thread**.
|
||||||
- A set of sequential state machines that run simultaneously and interact through shared memory through a *shared medium* is called **concurrency**.
|
- A set of sequential state machines that run simultaneously and interact through shared memory through a *shared medium* is called **concurrency**.
|
||||||
|
|
||||||
In a concurrent system there must be something shared.
|
>[!note]
|
||||||
|
*"In a concurrent system there must be something shared"*
|
||||||
|
|
||||||
##### Advantages of concurrent systems:
|
#### Advantages of concurrent systems
|
||||||
- efficiency: can run different stuff in parallel
|
- efficiency: can run different stuff in parallel
|
||||||
- simplification of the logic by dividing the task in simpler tasks, running them in different processes and combining the results together.
|
- simplification of the logic by dividing the task in simpler tasks, running them in different processes and combining the results together.
|
||||||
|
|
||||||
### Features of a concurrent system
|
#### Features of a concurrent system
|
||||||
We can assume many features:
|
We can assume many features:
|
||||||
- Reliable vs Unreliable
|
- Reliable vs Unreliable
|
||||||
- Synchronous vs Asynchronous
|
- Synchronous vs Asynchronous
|
||||||
- Shared memory vs Channel-based communication
|
- Shared memory vs Channel-based communication
|
||||||
|
|
||||||
**Reliable** system: every process correctly executes its program
|
- **Reliable** system: every process correctly executes its program.
|
||||||
|
- **Asynchronous:** no timing assumption (every process has its own clock, which are independent one from the other).
|
||||||
|
- **Shared medium:** A way is through a shared memory area, another way is through message passing.
|
||||||
|
|
||||||
**Asynchronous:** no timing assumption (every process has its own clock, which are independent one from the other)
|
>[!info] For this part of the course we assume that every process has a local memory but can access a shared part of the memory. We will assume that memory is split into registers (will see later).
|
||||||
|
|
||||||
**Shared medium:** A way is through a shared memory area, another way is through message passing.
|
**For now, we will assume that processes won't fail.**
|
||||||
For this part of the course we assume that every process has a local memory but can access a shared part of the memory. We will assume that memory is split into registers (will see later).
|
|
||||||
|
|
||||||
For now, we will assume that processes won't fail.
|
|
||||||
We also assume that we have one processor per process. But actually the processor can be a shared resource (more processes than processors).
|
We also assume that we have one processor per process. But actually the processor can be a shared resource (more processes than processors).
|
||||||
|
|
||||||
### Synchronization: cooperation vs competition
|
### Synchronization: cooperation vs competition
|
Loading…
Reference in a new issue