Debugging program bugs with gdb
1. Experimental purpose
By debugging a problematic program, proficient in using vi, mastering gcc compilation commands and gdb debugging commands Through the tracking and debugging of problematic programs, the ability to find and solve problems is further improved
2. Experimental contents
(1) Using the vi editor, enter the following code int ...
Posted by leo.bonnafe on Thu, 30 Dec 2021 17:06:58 +0100
Linux dtsi file parsing
catalogue
origin
Driver code parsing
driver loading
dtsi file content parsing
Four important analytical functions
origin
Linus Torvalds declared "this whole ARM thing is a f*cking pain in the ass" in the ARM Linux mailing list on March 17, 2011, which triggered an earthquake in the ARM Linux community, and then the AR ...
Posted by luzlin on Thu, 30 Dec 2021 13:27:26 +0100
Linux_ File permissions and access control
File and Directory Rights Management
Levels and permissions introduction
Level of files and directories
User Owner (u)Group Owner (g)Other (o)
Permissions for files and directories
Read (r)Write (w)Execution (x)
When creating a file or directory, permissions are based on two factors:
Basic privileges umask
The basic permissions a ...
Posted by TaintedBloop on Thu, 30 Dec 2021 07:29:37 +0100
Implementation of locks and atomic operations
Atomicity of operation
Ten threads perform + + on the count variable at the same time, and each thread performs + + 100000 times. The ideal result is 1 million, but the final result is less than 1 million.
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#define THREAD_COUNT 10
void *func(void *arg) {
vol ...
Posted by Cheeseweasel on Thu, 30 Dec 2021 05:31:27 +0100
RocketMQ cluster setup
preface
Record RocketMQ
Quickly build RocketMQ cluster
Machine environment
Prepare three machines, root password root; IP address:
192.168.232.128 worker1
192.168.232.129 worker2
192.168.232.130 worker3
Create user
useradd oper
passwd oper (Password entry 123 qweasd)
system configuration
Switch the oper user and generate a key ...
Posted by Cragsterboy on Thu, 30 Dec 2021 00:48:08 +0100
Getting started with Linux Programming (15) - process creation and termination
The previous two articles learned the theoretical basis related to process, and this paper began to learn process programming.
Introduction to Linux Programming (13) - process (I)
Introduction to Linux Programming (14) - process (II)
Create process
System function fork()
Linux provides a system call fork() to create a new process. Its func ...
Posted by teebo on Wed, 29 Dec 2021 17:11:07 +0100
SLUB allocator 4 for Linux memory management [slub page size calculation method]
SLUB allocator 4 for Linux memory management [slub page size calculation method]
Today, I tracked the calculation methods of object and page order in SLUB in detail and sorted them out to avoid forgetting later, mainly including:
The calculation method of page order is to apply for kmem_ How many pages should each slab apply for when caching? ...
Posted by adamdyer on Wed, 29 Dec 2021 16:56:23 +0100
Video module based on mplayer
brief introduction
Mplayer is an open source multimedia player that can run in mainstream operating systems, such as LInux, Unix like, Windows, Mac OS. Mplayer is built on the command line interface. For the use of the command line, refer to: https://www.cnblogs.com/huangpeng1990/p/4364373.html Here are some common command lines based on m ...
Posted by chuspy on Wed, 29 Dec 2021 16:40:20 +0100
Detailed explanation of common Ansible modules
Ansible common modules
At the end of 2015, there were more than 270 modules, reaching 540 in 2016, 1378 modules on January 12, 2018, 1852 modules on July 15, 2018, 2080 modules on May 25, 2019 (ansible 2.7.10), and 3387 modules on March 2, 2020
Although there are many modules, the most commonly used modules are only 2 or 30, and only 10 modul ...
Posted by adam87 on Wed, 29 Dec 2021 11:44:34 +0100
linux blocking and non blocking IO experiments
1, Blocking and non blocking IO
Blocking and non blocking IO are two common device access modes in Linux driver development. Blocking and non blocking must be considered when writing drivers.
In this chapter, we will learn about blocking and non blocking IO, how to deal with blocking and non blocking in the driver, and how to use wait que ...
Posted by interface on Wed, 29 Dec 2021 08:55:58 +0100