Interprocess Communication Based on Linux Programming Part 3: Signals
Overview of Signals
Signals are one of the oldest methods of process communication used in UNIX. It is a simulation of interruption mechanism at the software level and an asynchronous communication mode. Signals can interact directly between user-space processes and kernel processes. Kernel processes can also use them to notify user-space proc ...
Added by sbacelic on Tue, 02 Jul 2019 01:29:22 +0300
fs file system of nodeJS
Previous remarks
The fs file system is used to read and write system files and directories. This paper will introduce the js file system in detail.
Summary
File I/O is provided by standard POSIX functions with simple encapsulation. Use this module through require('fs'). All methods have asynchronous and synchronous forms.
The asynchronou ...
Added by devang23 on Tue, 25 Jun 2019 21:01:14 +0300
Boost Compiler Installation under Linux
Boost library is a portable C++ library that provides source code. As a backup of standard library, it is one of the development engines of C++ standardization process. The Boost library is sponsored by members of the working group of the C++ Standards Committee Library. Some of its contents are expected to become the next generation of C++ St ...
Added by mimilaw123 on Fri, 21 Jun 2019 01:32:07 +0300
Serial Port Programming under Linux
I. Linux The following serial port programming and those components
1. Open the serial port
2. Serial port initialization
3. Read or write serial ports
4. Close the serial port
2. Opening of Serial Port
Since the serial port is in the linux It is regarded as a file, so it should be opened before it is operate ...
Added by The Bat on Fri, 21 Jun 2019 00:00:02 +0300
IO Concurrency Model
IO Classification
IO Classification: Blocking IO, Non-Blocking IO, IO Multiplexing, Asynchronous IO, etc.
Blocking IO
1. Definition: Block if the execution condition is not satisfied when performing an IO operation.Blocking IO is the default form of IO.
2. Efficiency: Blocking IO is a very inefficient type of IO.But because of its simplicit ...
Added by mimcris on Wed, 19 Jun 2019 20:55:11 +0300
python log module
logging module
What is logging module
Logging module is a module provided by python for logging
Why logging is needed
We can open the file by ourselves and write in the log, but these operations are repetitive and without any technical content, so python has packaged it for us. With logging, we only need to simply call the interface when record ...
Added by Omzy on Sat, 15 Jun 2019 06:04:26 +0300
Talk about Alberta Linux 32
10.6 Monitor io performance
iostat command
The iostat command is used to monitor the usage of system input and output devices and CPUs.It features a report on disk activity statistics as well as CPU usage.Like vmstat, iostat has a disadvantage that it cannot analyze a process in depth, only the overall situation of the system.
iostat -x
[ro ...
Added by TLawrence on Fri, 14 Jun 2019 19:38:11 +0300
TCP socket communication
TCP socket communication
How do processes communicate in the network?
We know that there are many ways to communicate between local processes, such as pipeline, message queue, shared memory, synchronization and mutual exclusion. These methods require that the two processes of communication are located on the same host. So how to communic ...
Added by knnakai on Mon, 10 Jun 2019 05:01:42 +0300
Using SETNX locks to prevent cached haemorrhage
SETNX is an instruction in Redis, called "Set If Not Exist", which sets value to key only when it does not exist, otherwise no operation is performed. SETNX can also be used to implement locks in Redis.
Problem introduction
Before introducing how to use SETNX to implement locks, let's consider the following question:
Suppose we now ha ...
Added by Snorkel on Mon, 10 Jun 2019 04:47:19 +0300
New Java8 features, the right posture for Data and Time
It has been a long time since Java8 was released. The new version of java has brought us a lot of exciting new features. The new API s of Date and Time bring new good news to the students who normally need to perform various complex operations on time and date. This article also starts from this point to explore the new features of Data and Tim ...
Added by cactuscake on Thu, 30 May 2019 19:27:03 +0300