当前位置:网站首页>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 ;
边栏推荐
- 光猫超级账号密码、宽带账号密码 获取
- C language STR function
- [engine development] rendering architecture and advanced graphics programming
- 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
- 亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
- C language dup2 function
- tonybot 人形机器人 定距移动 代码编写玩法
- To improve efficiency or increase costs, how should developers understand pair programming?
- 从书本《皮囊》摘录的几个句子
- Yolov5进阶之七目标追踪最新环境搭建(二)
猜你喜欢
Vs+qt multithreading implementation -- run and movetothread
Qt development - scrolling digital selector commonly used in embedded system
Tonybot humanoid robot infrared remote control play 0630
Introduction to opengl4.0 tutorial computing shaders
Showmebug entered Tencent conference, opening the era of professional technical interview
tonybot 人形机器人 定距移动 代码编写玩法
Happy capital new dual currency fund nearly 4billion yuan completed its first account closing
How to query the baby category of tmall on Taobao
[ue4] material and shader permutation
[ue4] HISM large scale vegetation rendering solution
随机推荐
tonybot 人形机器人 红外遥控玩法 0630
分布式事务(Seata) 四大模式详解
Zzuli:1053 sine function
FPGA blocking assignment and non blocking assignment
7-9 one way in, two ways out (25 points)
[engine development] in depth GPU and rendering optimization (basic)
pyQt界面制作(登录+跳转页面)
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?
Fundamentals of PHP deserialization
Showmebug entered Tencent conference, opening the era of professional technical interview
ASTC texture compression (adaptive scalable texture compression)
Zzuli:1046 product of odd numbers
关于敏捷的一些概念
Zzuli:1041 sum of sequence 2
Zzuli:1059 highest score
dllexport和dllimport
Zhonggan micro sprint technology innovation board: annual revenue of 240million, net loss of 17.82 million, proposed to raise 600million
[opengl] advanced chapter of texture - principle of flowmap
Pyqt interface production (login + jump page)
Container of symfony