|
|
|
## Liens sur les interruptions
|
|
|
|
|
|
|
|
|
|
|
|
- [Simple Multicore Core to Core Communication Using FreeRTOS Message
|
|
|
|
Buffers -
|
|
|
|
FreeRTOS](https://www.freertos.org/2020/02/simple-multicore-core-to-core-communication-using-freertos-message-buffers.html
|
|
|
|
)
|
|
|
|
|
|
|
|
- [How do interrupts work on multicore ARM cpu - Stack
|
|
|
|
Overflow](https://stackoverflow.com/questions/11811276/how-do-interrupts-work-on-multicore-arm-cpu
|
|
|
|
)
|
|
|
|
|
|
|
|
- [ARM CoreLink GIC-500 Generic Interrupt Controller Technical Reference
|
|
|
|
Manual
|
|
|
|
r1p1](https://developer.arm.com/documentation/ddi0516/e/functional-description/operation/interrupt-types
|
|
|
|
)
|
|
|
|
|
|
|
|
## Une introduction fournie par ChatGPT
|
|
|
|
|
|
|
|
```
|
|
|
|
In ARM architectures, such as ARMv8-A, which is commonly used in modern
|
|
|
|
smartphones, tablets, and other devices, communication between cores
|
|
|
|
typically occurs through shared memory and synchronization mechanisms.
|
|
|
|
These architectures often consist of multiple cores (usually two or
|
|
|
|
more) that can work together to perform parallel processing tasks.
|
|
|
|
Here's a high-level overview of how communication between cores in ARM
|
|
|
|
architecture can be achieved:
|
|
|
|
|
|
|
|
1. Shared Memory:
|
|
|
|
ARM cores can access a shared region of memory. This shared memory can
|
|
|
|
be used to exchange data and communicate between different cores. It is
|
|
|
|
essential to ensure that data consistency is maintained during
|
|
|
|
communication, especially when multiple cores can read and write to the
|
|
|
|
shared memory concurrently.
|
|
|
|
|
|
|
|
2. Synchronization Mechanisms:
|
|
|
|
To avoid data races and ensure proper coordination between cores,
|
|
|
|
synchronization mechanisms are used. Common synchronization primitives
|
|
|
|
in ARM architectures include:
|
|
|
|
|
|
|
|
- Spin Locks: Spin locks are used to protect critical sections of
|
|
|
|
code that can be executed by only one core at a time. If a core
|
|
|
|
attempts to acquire a spin lock that is already held by another core,
|
|
|
|
it will repeatedly check (spin) until the lock is released.
|
|
|
|
|
|
|
|
- Semaphores: Semaphores are used to control access to shared
|
|
|
|
resources. A semaphore is a variable that keeps track of the number of
|
|
|
|
available resources. When a core wants to access a resource, it checks
|
|
|
|
the semaphore, and if the resource is available, the core decrements
|
|
|
|
the semaphore count and proceeds. Otherwise, it waits until the
|
|
|
|
resource becomes available.
|
|
|
|
|
|
|
|
- Barrier: Barriers are used to ensure that all cores have reached a
|
|
|
|
certain point in the code before proceeding further. This is helpful
|
|
|
|
when you want to synchronize the execution of specific tasks across
|
|
|
|
multiple cores.
|
|
|
|
|
|
|
|
- Mutexes: Mutexes (short for "mutual exclusion") are similar to
|
|
|
|
spin locks but are typically more efficient in cases where waiting for
|
|
|
|
the lock is expected to be a relatively long-duration event.
|
|
|
|
|
|
|
|
3. Inter-Processor Interrupts (IPIs):
|
|
|
|
Inter-processor interrupts are used to signal events or trigger actions
|
|
|
|
on other cores. One core can send an interrupt signal to another core,
|
|
|
|
and the receiving core can handle the interrupt by executing a specific
|
|
|
|
interrupt handler.
|
|
|
|
|
|
|
|
It's important to note that the exact communication methods and
|
|
|
|
synchronization primitives available might vary depending on the
|
|
|
|
specific ARM architecture and the operating system running on the
|
|
|
|
device.
|
|
|
|
|
|
|
|
When developing parallel code for ARM architectures, it's crucial to
|
|
|
|
ensure proper synchronization and avoid data hazards and race
|
|
|
|
conditions to achieve correct and efficient multi-core processing. It's
|
|
|
|
often helpful to use high-level synchronization libraries or APIs
|
|
|
|
provided by the operating system to handle core communication and
|
|
|
|
synchronization tasks effectively.
|
|
|
|
``` |
|
|
\ No newline at end of file |