A summary of the tree from two forks tree--Two forks search tree--balance binary tree--red black tree->b tree and B + Tree

Source: Internet
Author: User
Tags epoll

The definition and nature of the binary tree, including the various operations of the source code in this blog here: two fork Tree

The definition of binary search tree and the source code implementation in this blog here: two forks search tree

Balanced binary tree (AVL tree), is a fully binary tree (PS: About full two fork tree with complete binary tree can be seen in the heap sorting definition), its nature and the implementation of the source code in this blog here: Balanced binary Tree

Red black tree, is to take the longest time to understand a thing, only understand the principle, its application of the most classic in time this blog before the Apache and Nginx said the difference between the Epoll,epoll is the use of red and black tree thought to achieve, here a little mention of the red and black trees used in epoll where.

Epoll is initialized by the kernel (operating system boot), and will open up epoll own kernel high-speed cache area for each socket we want to monitor, these sockets will be in the form of red-black tree in the kernel cache, to support the quick Find, insert, delete. This kernel high-speed cache area, is to establish a continuous physical memory page, and then build on the slab layer, simply, is physically allocated the size of the memory object you want, each use is the use of idle allocated objects.

Definition of red-black tree and its insert delete operation in this blog here: Red black tree

B-Tree and + + trees, which already do not belong to the range of binary trees, one root can have multiple branches, these are mainly used in databases (such as Oracle's database using B + Tree implementation) and file systems (such as ext2, can look at the following figure ext2 layout) implementation. Some understanding of B-Tree vs. B-tree in this blog here: B-plus + Tree

Binary search tree, balanced binary tree, red and black tree->b tree and B + Tree ">

The above is just a number of species, in fact, there are classic best binary tree (that is, in the information theory has been mentioned in the Huffman code, also known as Hoffman) is mainly used for data compression coding.

There are b* trees, lsm trees, kd trees, VP, R-Trees, r* trees, r+ trees, X-trees, M-Trees, line-segment trees, Hilbert R-trees, priority R-trees, and many more. Feel good tired, let me quietly first ~ or meet the actual application scenario, need to use what to study it ~


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.