Tag:queue

  • Remnant of IOS interview – exorcism sword spectrum

    Time:2021-10-24

    How does GCD work? Included in this article:https://juejin.cn/post/6976878024566243335 1.Serial queue, synchronous operation, no new thread will be created, and the operation will be executed in sequence;Serial queue, asynchronous operation, new thread will be created, and the operation will be carried out in sequence,Usage scenario:Operations that do not affect the main thread and need to be […]

  • Data structure — one-way linked list

    Time:2021-10-24

    A go language implementation of unidirectional linked list package main import “fmt” type Node struct { no int name string next *Node } //Insert a node into the linked list at the end of the implementation (an implementation of queue push) func InsertTail(head *Node, newNode *Node){ //First find the last node of the linked list. […]

  • How does deep decryption epoll work?

    Time:2021-10-24

    Epoll is a unique implementation of multiplexing io on Linux platform. Compared with the traditional select, epoll has a great improvement in performance. This article mainly explains the implementation principle of epoll, and for the use of epoll, you can refer to relevant books or articles.Relevant video recommendationsDuring the interview, I was serious about the […]

  • Priority process scheduling in C + + preemption

    Time:2021-10-23

    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; […]

  • Question 41: please describe the JavaScript event loop mechanism?

    Time:2021-10-23

    Event cycle mechanism In the event cycle, each cycle operation is called a tick. The task processing of each tick is complex, but the key steps are as follows: Execute a macro task (get it from the event queue if it is not in the stack) If a micro task is encountered during execution, it […]

  • An API hang analysis of a cloud procurement platform based on. Net

    Time:2021-10-22

    1: Background 1. Tell a story I haven’t written a blog for about two months. My friends who pay attention to me should know that I have recently spent my energy on the planet. In the past two months, there have been friends asking for help on how to analyze dump. Some friends are too […]

  • 02select listening server

    Time:2021-10-22

    # can_ read, can_ write, _ = Select. Select (inputs, outputs, none, none) ## the first parameter is that we need to listen for a readable socket, the second parameter is that we need to listen for a writable socket, the third parameter is that we need to listen for an abnormal socket, and the […]

  • Data structure — queue (linked list implementation)

    Time:2021-10-22

    A simple implementation of a linked list of queues package main import “fmt” type Queue struct { id int name string next *Queue } //Push func Push(head, node *Queue){ node.next = head.next head.next = node } //Pop func Pop(head *Queue) (node *Queue){ temp := head for { if temp.next == nil{ return }else if temp.next.next […]

  • Go group friends asked: how much goroutine quantity is appropriate, which will affect GC and scheduling?

    Time:2021-10-22

    If you have any questions or suggestions, you are welcome to communicate and collide in time. My official account is “fish in my brain”. GitHub address:https://github.com/eddycjy。 Hello, I’m fried fish. A few days ago, I saw a small partner in the reader exchange group and sent out a fatal question, that is:“How many goroutines are […]

  • [redis basic] client

    Time:2021-10-20

    Redis uses a single thread to handle the access of multiple clients. Therefore, as redis development, operation and maintenance personnel, they need to understand the communication protocol between redis server and client, as well as the use method of redis client in mainstream programming language. At the same time, they also need to understand the […]

  • How to configure thread pool rejection policy in spring boot to properly handle overflow tasks

    Time:2021-10-18

    Through the previous three blog posts on the implementation of spring boot asynchronous tasks, we learnedCreate asynchronous task with @ Async、Configure thread pools for asynchronous tasks、Use multiple thread pools to isolate different asynchronous tasks。 Today, we continue to improve and optimize the above knowledge! If you have read the above articles and have mastered them, […]

  • Search depth first / breadth first for basic data structure and algorithm diagram of manual golang

    Time:2021-10-17

    origin Recently read < < my first algorithm book > > ([Japan] Ishida Baohui; Miyazaki Xiuyi)This series of notes is intended to use golang exercises Graph search Graph search refers to starting from a vertex of the graph, Reaching different vertices through edges, The process of finally finding the target vertex. Depending on the order […]