kdump+crash solves the spinlock deadlock problem

Table of Contents 1. Experiment purpose: use crash to solve the spinlock deadlock problem 2. Experimental steps 3. Brief description of soft lockup mechanism 4. Spinlock deadlock problem analysis 4.1. Find deadlock threads from the threads being executed by the CPU 4.2. Soft lookup mechanism determines deadlock threads 4.3. ps | grep RU to find […]

Spinlock mechanism in Linux – API usage

Operations implemented by spinlock in different scenarios 1: spin_lock function call 2: Adjust and adapt based on spin_lock according to relevant scene requirements Turn off scheduled spin lock Implementation of spinlock in SMP multi-core system Spinlock implementation under UP single-core system Turn off hard interrupt spin lock Turn off the spin lock of soft interrupt […]

deadlock, livelock, starvation, spinlock

deadlock It refers to the phenomenon that two or more processes are in a waiting state because they hold each other’s required resources, which causes the program to stop running. Simply put, in a system, if a circular dependency is formed between processes, then a deadlock will occur. Image source: https://www.scientcheasy.com/2020/08/deadlock-in-java.html/ All the codes in […]

Vector Microsar Os Spinlock module detailed design (incomplete version)

Directory 1. The concept of Spinlock 2. Properties of Spinlock 2.1 Common properties of AUTOSAR Spinlock and OPTIMIZED 2.2 Properties of AUTOSAR Spinlock 2.3 Properties of OPTIMIZED Spinlock 3. The data structure of Spinlock 3.1 Structure 3.2 Enumeration variables 3.3 A graph of data structure 4. Function design of Spinlock 4.1 Os_Api_GetSpinlock 4.2 Os_SpinlockInternalGet 4.3 […]

[Linux Kernel] Spinlock spinlock mechanism

Spinlock Note: When using spin locks, you should avoid holding locks for a long time, otherwise other threads or processes may not be able to access shared resources. Therefore, it is recommended to shorten the lock holding time as much as possible to improve the concurrent performance of the system. The spinlock mechanism in Linux […]

Linux concurrency and competition (atomic/spinlock/semaphore/mutex understanding)

1. Reasons for linux concurrency (1) Multi-threaded concurrent access, (2) Preemptive concurrent access, process scheduling can preempt the running thread at any time, so as to run other threads (3) Terminal program concurrent access (4) Concurrent access between SMP (multi-core) The consequence of concurrent access is competition. Generally, global variables and device structures must be […]