当前位置:网站首页>Byte practice surface longitude
Byte practice surface longitude
2022-07-03 14:50:00 【III VII】
The topic of facial Scripture comes from : International e-commerce
one side
1.TCP in time_wait state
From the fourth wave waiting state among the four wave states 
Why do I need to wave four times : The duration of this state is the lifetime of the message in the network *2; If the server B To receive ACK, It will send the unreceived message information to the client A Let it resend ;
2.HTTP2.0 Characteristics of
- Using binary transmission ;
- Support multiplexing , One HTTP The request can solve multiple HTTp Request transmission ;
- Support header compression , Both sides of the communication will maintain a header information table , here HTTP Just transfer the index ;
- Support server push , You can send the required content to the client in advance ;
3 HTTP Long and short connections of
If every time you launch HTTP Requests need to be re established TCP Connecting will waste resources , therefore HTTP1.1 Use the default long connection , You can set Timeout Parameter to close the connection after the connection fails to transmit data within the specified time
4 B+ The advantages of trees , Why not use a binary tree
- B+ Tree query is more efficient .B+ The tree uses a two-way list to concatenate all leaf nodes , Interval query is more efficient ( Because all the data are B+ The leaf node of the tree , Scan database Just scan the leaf nodes once ), however B The tree needs to traverse the middle order to complete the search of the query range .
- B+ Tree query efficiency is more stable .B+ The tree must query the leaf node every time to find the data , and B The tree query data may not be in the leaf node , Or maybe , This will result in the instability of the efficiency of the query
- B+ The disk reading and writing cost of the tree is less .B+ The internal node of the tree does not point to the specific information of the keyword , So its internal nodes are relative B The trees are smaller , Usually B+ Trees are shorter and fatter , Generated by highly small queries I/O less .
Binary tree is easy to degenerate into linked list query ;
N large , Deep , Disk required IO The number of times will also increase ;
5 Database transaction isolation level ? How to solve unreal reading ?

The row lock can only lock the line , Cannot lock the gap between rows , Locking the gap between rows requires GapLock To implement , But there will be problems : Affect concurrency , Lead to a deadlock ;
Two sides
1 C++ in new and malloc The difference between
new and delete Use it with ,malloc and free Use it with
- malloc It's a library function ,new Is the key word ;
- new No need to allocate memory size ,malloc need ;
- new Return when allocation fails bad_malloc;delete Return null pointer ;
- new Allocate... From free storage ,malloc Distribute... From the heap ;( Free storage is not the heap )
2. How to solve the problem of missing modifications ?
Use optimistic locks and pessimistic locks ;
3.mysql There is no primary key mysql How to deal with it
consequence : Cannot use primary key index , The query will scan the whole table
Affect data insertion performance , Inserting data requires generation ROW_ID, And the resulting ROW_ID It's globally shared , Concurrency can lead to lock contention , Affect performance
mysql Processing mode :
4.linux in ctrl c and ctrl z
ctrl c : Kill a process
ctrl z: Suspend a process ; Users can use fg/bg Operations resume executing foreground or background processes .fg The command resumes the execution of the suspended process in the foreground , You can use ctrl-z Suspend the process again ,bg Command to resume execution of the suspended process in the background , And it will not be available at this time ctrl-z Suspend the process again ;
5. The difference between user mode and kernel mode
- Kernel mode and user mode are the two operation levels of the operating system , When the program runs in 3 When the privilege level is up , It can be called running in user mode . Because it's the lowest privilege level , It's the privilege level of a normal user process , Most of the programs that users face directly run in user mode ;
- When the program runs in 0 When the privilege level is up , It can be called running in kernel state .
- Programs running in user mode cannot directly access the kernel data structure and programs of the operating system . When we execute a program in the system , Most of the time it runs in user mode , When it needs the help of the operating system to complete some work that it does not have the power and ability to complete, it will switch to the kernel state .
- The main difference between the two states is :
When executing in user mode , The memory space and objects that the process can access are limited , The processor in its possession is preemptive ;
The process in the core state execution , Can access all memory space and objects , And the occupied processor is not allowed to be preempted
6. Transport layer protocol for video and real-time voice ?
UPD, Fast , Real time ;
On three sides
Intelligent pointer
Can't
DNS analysis
First resolve the suffix , Reparse prefix ;
Use TCP, Client to DNS When the server queries the domain name , Use UDP;
The top-level domain server is responsible for the top-level domain name (.com .edu .org), The authoritative server is responsible for the address provided by the organization ;
边栏推荐
- Amazon, express, lazada, shopee, eBay, wish, Wal Mart, Alibaba international, meikeduo and other cross-border e-commerce platforms evaluate how Ziyang account can seize traffic by using products in th
- Zzuli:1059 highest score
- Yolov5进阶之九 目标追踪实例1
- mmdetection 学习率与batch_size关系
- Zzuli:1042 sum of sequence 3
- Zzuli:1057 prime number determination
- Several sentences extracted from the book "leather bag"
- Paper sharing: generating playful palettes from images
- Zzuli:1056 lucky numbers
- FPGA blocking assignment and non blocking assignment
猜你喜欢

论文分享:Generating Playful Palettes from Images

puzzle(016.3)千丝万缕

tonybot 人形机器人 红外遥控玩法 0630
![[graphics] hair simulation in tressfx](/img/41/cef55811463d3a25a29ddab5278af0.jpg)
[graphics] hair simulation in tressfx

Bucket sorting in C language

PS tips - draw green earth with a brush

dllexport和dllimport

tonybot 人形机器人 定距移动 代码编写玩法

Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块

Adobe Premiere Pro 15.4 has been released. It natively supports Apple M1 and adds the function of speech to text
随机推荐
Detailed explanation of four modes of distributed transaction (Seata)
Zzuli:1048 factorial table
To improve efficiency or increase costs, how should developers understand pair programming?
Common shortcut keys in PCB
Awvs batch operation script
Zzuli:1052 sum of sequence 4
puzzle(016.4)多米诺效应
The picture quality has been improved! LR enhancement details_ Lightroom turns on AI photo detail enhancement: picture clarity increases by 30%
Protobuf and grpc
tonybot 人形机器人 红外遥控玩法 0630
Zzuli:1044 failure rate
Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块
Happy capital new dual currency fund nearly 4billion yuan completed its first account closing
[graphics] real shading in Unreal Engine 4
1017 a divided by B (20 points)
Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things
零拷贝底层剖析
[graphics] adaptive shadow map
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?
556. The next larger element III: simple construction simulation questions