Linux foundation - threads
1. Thread concept
1.1 comparison between threads and processes
Threads are similar to processes, both of which have PCB s
The underlying functions of both are the same, and both use clone
Processes can become threads
Under Linux, thread is the smallest unit of execution; process is the smallest uni ...
Added by pcwizzzz on Thu, 18 Jun 2020 08:51:58 +0300
Five communication modes between processes
Source: https://blog.csdn.net/wh_sjc/article/details/70283843
IPC (InterProcess Communication) refers to the communication or exchange of information between different processes.
IPC usually includes pipeline (including nameless pipeline and named pipeline), message queue, semaphore, shared storage, socket, Streams, etc. Soc ...
Added by ValdouaD on Mon, 18 May 2020 09:00:24 +0300
MySQL database functions
1, Date and time functions
1. Function to get the current dateIt's the same. It's different
CURDATE() : Used to get the current date of the system
CURRENT_DATE() Used by the system to get the current date
mysql> select CURDATE(),CURRENT_DATE();
2. Get function of current time
CURTIME() : Used to get the current time of the system
mysql& ...
Added by brighton on Thu, 14 May 2020 12:11:49 +0300
fork function and vfork function
fork function
In many applications, creating multiple processes is an effective method for task decomposition. For example, a network server process can create a new subprocess to process each request while listening for client requests. At the same time, the server process will continue to listen for more client connection requests. Decomposin ...
Added by vinny69 on Wed, 13 May 2020 07:56:54 +0300
centos 6.8 installation of Redis and simple use
1, Install dependency package and prepare environment.
yum install -y gcc
Depending on the package, you can install it according to the prompts at compile time. But gcc must be installed.
2, 1. Download the tar package, install and start it.
wget http://source.goyun.org:8000/source/Redis/redis-3.2.9.tar.gz
--2018- ...
Added by lnfreish on Wed, 06 May 2020 03:49:40 +0300
Use of log4j
1. Simple use
Only one jar package of log4j needs to be imported, and the log4j.properties configuration file under the src directory will be loaded by default
1. Print log to console
log4j.properties configuration file content
#Set the log level to info and output to the console
log4j.rootLogger=info,console
log4j.appender.console = org ...
Added by jay_bo on Mon, 20 Apr 2020 18:53:38 +0300
[network programming 01] basic knowledge of socket - simple network communication program
1. What is socket
Socket is simply a combination of IP address and port, which can communicate with the application of remote host. A host can be determined by IP address, and an application can be determined by port. IP + port can completely determine an application of a host. Socket originated from UNIX, similar to a special file, can be open ...
Added by munuindra on Wed, 15 Apr 2020 11:46:48 +0300
Summary of problems encountered in docker environment required for k8s deployment
Alibaba cloud's one click deployment script is used for deployment:
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
Create the required directory:
mkdir -p /etc/docker /data/docker
Then modify the configuration file of docker:
/etc/docker/daemon.json
{
"graph": "/data/docker",
"storage-driver": "overlay2",
"insecure-re ...
Added by zenag on Mon, 23 Mar 2020 11:23:01 +0200
Difference between TCP and UDP
TCP
In order to facilitate the development of network applications, Berkeley University in the United States implements a kind of communication protocol Socket on Unix, which enables programmers to access TCP/IP conveniently;
Use Socket of TCP/IP to communicate:
The server program binds a socket ...
Added by boogybren on Fri, 06 Mar 2020 07:30:09 +0200
linux file system related commands (df/du/fsck/dumpe2fs)
1, File system view command df
format
df [options] [mount point]
option
Name
Effect
-a
Display all file system information, including special file systems, such as / proc,/sysfs
-h
Display capacity in customary units, such as KB,MB or GB
-T
Show file system types
-m
Display capacity in MB
-k
Display capacity in kilobytes. The def ...
Added by seventheyejosh on Fri, 28 Feb 2020 09:52:15 +0200