• System programming – process – exec series function super detailed explanation (with various practical codes)


    My related blog posts: System programming process close on exec mechanism PART1 Introduction to exec series functions Exec series function debut The routine operation is to first fork a sub process, and then to call the exec series function in the sub process to execute the new target program. Although the exec series of functions […]

  • Performance competition between Apache APIs IX and envoy


    At a technology sharing meeting organized by CNCF, I heard enovy for the first time. Balabala, the guest of sharing, talked a lot and didn’t remember anything. He remembered a particularly novel concept “communication bus”. Later, Google what this thing is. I found it described on the official website: “Envoy is an L7 proxy and […]

  • Zsh Development Guide (Chapter 19 script example explanation)


    Reading guide This article will explain some simple Zsh script examples. Example 1: copy the directory structure of a directory Function: Copy a directory and all directories under it to another directory (that is, create a directory with the same name), but do not copy other types of files under the directory. example: Directory structure […]

  • Tour UNIX – APUE course notes [2]


    Preface In the last article, we implemented the simplest shell, and this shell only executes bash instructions. What should we do if we want to implement all the commands? Like ls. First, we should think of parsing parameters, because as long as we parse the parameters, we can call the exec function to execute the […]

  • Memory overflow after ThreadPoolExecutor is used (I)


    Troubleshooting In the process of obtaining data consumption from Kafka, ThreadPoolExecutor (thread pool) is used. When the amount of data is large, memory leaks and the machine is stuck;Pseudo code is: def deal_func(msg): #Processing related logic pass pool = ThreadPoolExecutor(10) #Link Kafka while True: msg = client.poll(0.1) #Call pool.submit(deal_func, msg) After calling the program, the […]

  • Distributed – theoretical basis (2) – distributed consistency protocol Paxos


    Graphical distributed consistency protocol Paxos This article is reproduced fromGraphical distributed consistency protocol Paxos Paxos protocol / algorithm is an important protocol in distributed system. How important is it? < transaction processing of distributed system >: Mike burrows, author of Google chubby, said that there is only one consistency algorithm in the world, that is […]

  • Super full finishing! Summary of Linux performance analysis tools


    Out of interest in Linux operating system and strong desire for underlying knowledge, this article is sorted out. This paper can also be used as an index to test basic knowledge. In addition, this paper covers all aspects of a system. Without perfect computer system knowledge, network knowledge and operating system knowledge, it is impossible […]

  • Installing java development tools under CentOS (2) — Tomcat


    1. Preparation downloadTomcat 2. Upload files to the virtual machine Refer to my other articleTransferring files from hyper in windows to Linux virtual machine 3. Start installation New folder – mkdir /usr/local/src/tomcat Unzip the JDK file – tar -xvf apache-tomcat-9.0.8.tar.gz Move the extracted files to the newly created folder – mv apache-tomcat-9.0.8 /usr/local/src/tomcat Start Tomcat […]

  • Seven days, write a docker with go (the third day)


    Project source code:Click to view the project source code After understanding the docker principle in the past two days, today we set up the project structure. Let’s take a general look at the project structure first The whole file calling process is as follows Our final effect is to implement the following command, which will […]

  • Priority process scheduling in C + + preemption


    First come, first served Short process first algorithm Priority scheduling (preemption) Priority scheduling #include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; struct PCB { int id; // Process ID double turnaround_ time; // Turnaround time double weighted_ turnaround_ time; // Weighted turnaround time double wait_ time; // waiting time double start_ time; […]

  • Military SELinux


    Blog reference http://www.178linux.com/48336 http://www.178linux.com/47812 http://www.178linux.com/49367 SELinux introduction SELinux history SELinux: Secure enhanced Linux is a mandatory access control security module of Linux developed by the U.S. National Security Agency and SCC. It was released as GNU GPL after 2000, and the Linux kernel was integrated into the kernel after version 2.6. DAC: free access control. […]

  • [go] go language practice – supervisor compilation, installation and operation of go version


    When the daemon needs to be implemented and the self-developed command automatically crashes and restarts, you can use the go version of supervisor, which is less dependent than the python version git clone https://github.com/ochinchina/supervisord.gitenv GOOS=linux GOARCH=amd64 go build -o supervisord_ linux_ amd64   64 bit version env GOOS=linux GOARCH=386 go build -o supervisord_ linux_ three […]