当前位置:网站首页>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 ;
边栏推荐
- Puzzle (016.4) domino effect
- My QT learning path -- how qdatetimeedit is empty
- Implement Gobang with C language
- 洛谷P3065 [USACO12DEC]First! G 题解
- Common shortcut keys in PCB
- Frequently asked questions: PHP LDAP_ add(): Add: Undefined attribute type in
- Zzuli:1041 sum of sequence 2
- [graphics] efficient target deformation animation based on OpenGL es 3.0
- Zzuli:1053 sine function
- Use of form text box (I) select text
猜你喜欢

Vs+qt application development, set software icon icon

提高效率 Or 增加成本,开发人员应如何理解结对编程?

基因家族特征分析 - 染色体定位分析

Paper sharing: generating playful palettes from images

分布式事务(Seata) 四大模式详解

Puzzle (016.4) domino effect

Bucket sorting in C language

dllexport和dllimport

My QT learning path -- how qdatetimeedit is empty

Zhonggan micro sprint technology innovation board: annual revenue of 240million, net loss of 17.82 million, proposed to raise 600million
随机推荐
Get permissions dynamically
NOI OPENJUDGE 1.3(06)
Happy capital new dual currency fund nearly 4billion yuan completed its first account closing
Yolov5进阶之九 目标追踪实例1
tonybot 人形机器人 查看端口并对应端口 0701
puzzle(016.4)多米诺效应
[ue4] HISM large scale vegetation rendering solution
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
How to query the baby category of tmall on Taobao
Zzuli:1048 factorial table
Use of constraintlayout
Pyqt interface production (login + jump page)
Zzuli:1043 max
Zzuli:1044 failure rate
Devaxpress: range selection control rangecontrol uses
Table of mathematical constants by q779
复合类型(自定义类型)
NOI OPENJUDGE 1.4(15)
【微信小程序】WXSS 模板样式
556. 下一个更大元素 III : 简单构造模拟题