Linux system programming - (pthread) thread communication (mutex)

This article introduces the thread synchronization and mutex mechanism under Linux - mutex lock. When multiple threads are concurrent, multiple consumers will get data. In this case, the data needs to be protected. For example, like the train ticket system and the bus ticket system, the total number of tickets is fixed, but there are many ticke ...

Posted by Boo-urns on Tue, 11 Jan 2022 15:08:51 +0100

Linux memory management zone_sizes_init

1. Introduction stay (4) Spare memory model of Linux memory model In, we analyze bootmem_ The upper part of the init function. This time, let's go to the lower part. The lower part mainly focuses on the zone_sizes_init function expansion. Prospect review:bootmem_ The init() function code is as follows: void __init bootmem_init(void) { unsign ...

Posted by mapostel on Tue, 11 Jan 2022 12:08:30 +0100

Advanced and elegant remote operation of the server: understanding the Python module Paramiko

preface During the test process, we often encounter the need to upload local files to the remote server, or pull the files on the server to the local for operation. In the past, we often used the xftp tool. Today, let's introduce a Python library Paramiko, which can help us upload and download remote servers through code, or input operation ...

Posted by aka_bigred on Tue, 11 Jan 2022 12:07:07 +0100

Introduction, installation and deployment of Nginx based on Linux Environment

catalogue 1, Introduction to Nginx 2, Manual installation and deployment 1, Introduction to Nginx The even version of Nginx is a stable version; Odd is the development test version Nginx high-performance, safe and stable WEB server software is installed by default and only one set of websites are published. In the enterprise production en ...

Posted by pugg09 on Tue, 11 Jan 2022 12:03:12 +0100

Nginx from installation to high availability

Nginx from installation to high availability! 1, Nginx installation 1. Go to the official website http://nginx.org/ Download the corresponding nginx package. It is recommended to use a stable version 2. Upload nginx to linux system 3. Installation dependent environment (1) Install gcc environment yum install gcc-c++ (2) Installs the PCR ...

Posted by mikewooten on Tue, 11 Jan 2022 03:05:26 +0100

makefile concise tutorial

5 Makefile project management Script file: put a series of commands in a file for batch execution Name: makefile Makefile One rule: Objectives: dependencies Command (1 table indent before the command) Two functions: #The wildcard function, together with wildcards, finds all the files in the folder . c Documents src=$(wildcard ./*.c) #P ...

Posted by noise on Tue, 11 Jan 2022 01:57:15 +0100

Magedu - M46 - offline exercises

Offline exercises Chapter 11 Basic class 1. Edit a 1 Txt file, as follows cat >>1.txt <<EOF 10.0.3.1 00:0F:AF:81:19:1F 10.0.3.2 00:0F:AF:85:6C:25 10.0.3.3 00:0F:AF:85:70:42 10.0.2.20 00:0F:AF:85:55:DE 10.0.2.21 00:0F:AF:85:6C:09 10.0.2.22 00:0F:AF:85:5C:41 10.0.0.151 00:0F:AF:85:6C:F6 10.0.0.152 00:0F:AF:83:1F:65 10.0.0.153 00:0F: ...

Posted by Jona on Tue, 11 Jan 2022 01:55:44 +0100

Embedded Linux development 7 -- UART serial communication

1. Background knowledge 1.1 UART communication format    the full name of serial port is called serial interface, which is usually also called COM interface. Serial interface refers to the sequential transmission of data one by one, and the communication line is simple. Two lines can be used to realize two-way communication, one for ...

Posted by argoSquirrel on Tue, 11 Jan 2022 01:01:21 +0100

cut of Linux command -- split the string, display or delete the contents of the specified field, and merge the contents of the file

1, Command introduction The command cut can be used to split the string and display the content of the specified range. The text content can be displayed according to the specified byte range, character range and split field range. You can also merge the contents of multiple files. 2, Common options optionexplain-bDisplays the characters ...

Posted by jwstockwell on Tue, 11 Jan 2022 00:59:16 +0100

Linux combat notes - Docker data volume

1, Docker data volume management Why use data volumes? The performance of docker layered file system is poor, and the life cycle is the same as that of containerThe docker data volume is mount ed to the host, bypassing the hierarchical file system. It has the same performance as the host disk. After the container is deleted, it is still ...

Posted by aaronhall on Tue, 11 Jan 2022 00:33:52 +0100