• [original] KVM QEMU analysis of Linux Virtualization (2) armv8 virtualization


    background Read the fucking source code!–By Lu Xun A picture is worth a thousand words.–By Gorky explain: KVM version: 5.9.1 QEMU version: 5.0.0 Tools: source insight 3.5, Visio 1. Overview KVM virtualization is inseparable from the support of underlying hardware. This paper will introduce the support of armv8 architecture processor for virtualization, including memory virtualization, […]

  • Beauty of concurrent programming (basic) – Notes


    catalog The first chapter is the thread foundation of concurrent programming What is thread Creation and running of thread Waiting and notification of threads Methods in threads Thread context switch thread deadlock Guardian thread and user thread ThreadLocal InheritableThreadLocal Chapter 2 other basic knowledge of concurrent programming What is multithreading concurrent programming Thread safety in […]

  • Linux kernel learning notes (6) — timer and time management


    timers and time management Time can be divided into relative and absolute time. When a process runs after 5 seconds, the current time of day (i.e. wall time) is absolute time. The absolute time is usually used when interacting with users. The system timer goes off (often called hitting or popping) at a preprogrammed frequency, […]

  • Talking about interruption mechanism


    What is interruption Interrupt is actually a kind of “interrupt” event. What does interrupt mean? We need to consider its locationContextandReference objectWho is it? Considering the event, we can simply abstract the interrupt into such a model When we analyze an interruption event, we need to clarify these four objects Interrupt source Who is the […]

  • Promise from two eyes to double eyes (4) – several key problems of promise (2)


    How promise connects multiple operation tasks Promise’s then() returns a new promise, which connects multiple synchronous / asynchronous tasks through the chain call of then new Promise((resolve, reject) => { setTimeout(() => { console.log (execute task 1 (asynchronous) resolve(1) }, 1000); }).then( value => { console.log (‘result of task 1:’, value) console.log (‘execute task 2 […]

  • How do Ajax, fetch and Axios interrupt requests?


    First of all, let’s talk about the actual scenario of “interrupt request”. When there are multiple tab tabs on the page, data will be requested every time the tab is switched. If the tab A is switched to tab B, the request for tab A is completely unnecessary. At this time, the request can be […]

  • Complete interpretation of futuretask source code


    1 Introduction In the last blog “Introduction to asynchronous task service”, futuretask was briefly introduced and analyzed. Here is a further analysis of futuretask (based on JDK1.8). Futuretask implements the future and runnable interfaces at the same time, so it can be handed over to the executor executor to execute the run method directly by […]

  • Interrupt mode queue


    Using queues in interrupt service routines, Select to fill the queue with interrupt mode in the interrupt callback function, API xQueueSendToFrontFromISR(); xQueueSendToBackFromISR(); xQueueReceiveFromISR(); Dedicated to interrupt service routines Semaphores are used for event communication, while queues can be used not only for event communication, but also for passing data. Parameters, queue handle, message pointer, whether […]

  • Post reading of “react Technology: ideas”


    This article is the summary of < react technology disclosure – concept chapter >. React concept: building fast response large-scale web application How to understand the concept of react? A. FastCompared with Vue, Vue uses template syntax, so the parts that need to be changed can be found at the compile time. However, react uses […]

  • Research on the content of index No.10 in GDT table under Windows 10 x64 environment


    Background   When writing a program to view the windows kernel resources, I found that index No. 10 is neither a segment descriptor nor a gate descriptor, and the content has been changing. Therefore, I want to know what content is saved in it. Environment Description: Windows 10 x64 1903 The item marked with the […]

  • Android power consumption (9) — Analysis of MTK power consumption


    1. Find wake up source <7>[ 129.680310] -(0)[913:system_server][name:mt_sleep&][SLP] @@@[email protected]@@ <4>[ 129.680310] -(0)[913:system_server][name:mt_spm_internal&][SPM] wake up ……………………. <7>[ 129.690364] .(0)[913:system_server][name:mt_sleep&][SLP] @@@[email protected]@@ The channel that generates EINT is recorded in EINT_ In the sta status register, this is the same for all platforms. As long as you know the value of this status register, you can know which […]

  • The use of UART in STM32 Hal Library


    initialization Let’s start with UART initialization1. Declare the initialization structure of UART and assign a value2. MX generated code will call Hal_ UART_ Mspinit(); to initialize UART. Of course, this code is also generated automatically. However, users can add operations they want to add in this function, including NVIC_ Configuration,DMA_ You can also add some […]