C realize read-write lock
1, Overview
Case: write a case to test the read-write lock. Requirements: create three threads to write and five threads to read to test the read-write lock.
Basic concepts of read-write lock:
Read write locks are also called share exclusive locks. When the read-write lock is locked in read mode, it is locked in shared mode; When it is locked i ...
Posted on Wed, 01 Dec 2021 07:08:33 -0500 by KirstyScott
"Linux" user management of Linux
Today, I learned Linux user management and recorded it here.
1, Significance of users and user groups
1) Meaning of user existence
System resources are limited. How to allocate system resources reasonably?
1. Identity account
2. Authorize author
3. Certification auth
The above three 'a' ar ...
Posted on Wed, 01 Dec 2021 06:47:37 -0500 by dreamline
make tool and makefile file foundation of Linux tools
Why use the make tool and makefile file
it is very simple for us to compile a helloWorld program with gcc command, because it has only one file. However, when multiple files are compiled into an executable file, the linker is required to link the target file. However, when our project is very large and there are many source files design ...
Posted on Wed, 01 Dec 2021 01:05:51 -0500 by waseembari1985
NTP network time synchronization server
1, Time zone concept
UTC(Universal Time Coordinated)
World coordinated time; The time obtained through rigorous calculation is accurate to seconds, and the error is within 0.9s, which is a more accurate world time than GMT.
GMT(Greenwich Mean Time)
gmt; Greenwich, London, UK, is defined as the place where the 0 ° longitude begins. The e ...
Posted on Wed, 01 Dec 2021 00:39:55 -0500 by teddyjas
python Programming (from introduction to practice) Chapter 1-2
Chapter 1 setting up programming environment
Installation environment
All Python exercises in this article are applicable to the python 3.6 environment. If the execution fails, you can use the python 3.6 environment.
A simple python program, hello_world.py
#cat hello_world.py
print("Hello Python world!")
Run hello_world.py
#python hello_ ...
Posted on Tue, 30 Nov 2021 22:23:10 -0500 by mobilekid
bulldog-1 target write up
0x00 environment construction
Download link https://download.vulnhub.com/bulldog/bulldog.ova
target Get root permission to read flag Operating environment Target VM virtual machine startup Attack machine kali win10 Target ip problem
(1) Set nat mode to the same network segment as kali
(2) If it is set to nat, kali can't scan the ...
Posted on Tue, 30 Nov 2021 11:04:20 -0500 by HFD
West Post Linux interest group 2019 interview questions
1. How many "=" are output?
int main()
{
for(unsigned int i=3;i>=0;i--)
putchar('=');
}
Output countless' = '.
The type defined in the loop condition is unsigned int, which is an unsigned integer and has no negative form. That is, the for loop always holds.
2. How do the following three methods of exchanging integ ...
Posted on Tue, 30 Nov 2021 10:10:59 -0500 by gt500pwr
muduo C + + Network Library Learning
1, Installation of muduo Library
1. Install dependent files
muduo uses CMake as the build system, and the installation method is as follows:
Install cmake: sudo apt get install cmake
muduo relies on Boost and is easy to install:
Install the boost library sudo apt get install libboost dev libboost test dev
muduo has three non essential dep ...
Posted on Tue, 30 Nov 2021 09:34:33 -0500 by Nico
Smart home control system based on Huawei cloud design (STM32+ESP8266)
1. Function introduction
This is a smart home control system (model) designed based on Huawei cloud Internet of things platform. The hardware adopts STM32+ESP8266 to complete the cloud combination; Through the cloud platform, you can remotely control various electrical switches at home, and remotely collect information such as home gas, natura ...
Posted on Tue, 30 Nov 2021 09:30:54 -0500 by ehmer
In depth learning of Hisilicon SDK and API from official routines
1, Basic principles of image coding and compression
Since a large number of excellent articles have talked about this on the Internet, I won't write here. The content repetition is meaningless! reference resources: http://blog.csdn.net/newchenxf/article/details/51693753
Compression and decompression is the process of mathematical operatio ...
Posted on Tue, 30 Nov 2021 08:37:34 -0500 by reeferd