The underlying implementation of Kernel synchronization mechanism

Atomic operationUsually, a = a + 1 in our code contains three instructions after being translated into assembly:ldr x0, &a add x0,x0,#1 str x0,&aNamely (1) Read a variable from memory to X0 register (2)X0 register plus 1 (3) Write X0 to memory aSince there are three instructions, they may be concurrent, which means that the returned ...

Posted by gabe on Fri, 04 Mar 2022 09:52:54 +0100

Fundamentals in Java

1. Notes Comments will not be executed. They are for those who write code. Writing comments is a good habit. We must pay attention to standardization when writing code at ordinary times. There are three types of annotations in Java A single line annotation can only annotate one line of text// Multiline annotation can annotate a paragraph of ...

Posted by abionifade on Fri, 04 Mar 2022 09:34:31 +0100

JDK1. 8 source code analysis of concurrenthashmap

JDK1. 8 source code analysis of concurrenthashmap jdk1.8 container initialization Source code analysis There are five construction methods in the ConcurrentHashMap of jdk8. None of the four construction methods initialize the internal array, but deal with the initial values of some variablesThe array initialization of concurrent HashMap of j ...

Posted by reapfyre on Fri, 04 Mar 2022 09:25:47 +0100

MongoDB from entry to actual combat: security authentication (fragment cluster)

The security authentication in the fragmented cluster environment is basically the same as that in the replica set environment. However, the server environment and architecture of the partitioned cluster are relatively complex. It is recommended to directly add security authentication and authentication between servers when building the partiti ...

Posted by adige72 on Fri, 04 Mar 2022 09:24:10 +0100

Application case of mermaid

introduce About mermaid Mermaid allows you to create charts and visualizations using text and code. It is a Javascript based chart and chart tool that presents Markdown inspired text definitions to dynamically create and modify charts. Reference address: https://mermaid-js.github.io/mermaid/#/ Icon type flow chart graph TD; A-- ...

Posted by Mike521 on Fri, 04 Mar 2022 09:22:55 +0100

Debian 11 configuration optimization guide

Original address: Debian 11 configuration optimization guide - WindSpiritIT 0x00 introduction This article applies only to configuring Debian 11 Bullseye The article includes both Gnome desktop and KDE desktop configurations, most of which are the same, and the differences are listed separately The update of Gnome desktop related configurat ...

Posted by beemzet on Fri, 04 Mar 2022 09:10:15 +0100

Implementation and analysis of LZW codec algorithm

This paper mainly explains the code and clarifies the code structure and ideas 1, Experimental purpose Master the basic principle of dictionary coding, program LZW decoder with C/C + + language, and analyze the encoding and decoding algorithm. 2, Experimental principle 1. Code (1) Code 0-255 is used to store the characters with Ascii c ...

Posted by intergroove on Fri, 04 Mar 2022 08:56:14 +0100

Electronic + Vue custom Click to maximize, minimize and close window events

First, let's briefly understand the process types of Electron - rendering process and main process Main process: Electron runs package JSON's main script process. Rendering process: a process that runs on a web page. An Electron application has and has only one main process. The script running in the main process presents the user interface by ...

Posted by ianhull on Fri, 04 Mar 2022 08:50:26 +0100

Gitlab upload folder (multi branch, single branch)

Install git https://git-scm.com/downloadsgitlab/github should have a project (or create a new one) 1. Download the project on gitlab server Find our project, click the clone icon in the upper right corner, select http, and then copy the address. Just find a folder and create a new folder to store the project files that will be pulled d ...

Posted by Tezread on Fri, 04 Mar 2022 08:45:04 +0100

Android View event system

View event system Although View does not belong to the four components, its role is comparable to the four components, and even more important than Receiver and Provider. In Android development, Activity undertakes this visualization function. At the same time, Android system provides many basic controls, such as Button, Textview, CheckBox, et ...

Posted by Kevin3374 on Fri, 04 Mar 2022 08:42:13 +0100