Bucket (computing)
In computing, the term bucket can have several meanings. It is used both as a live metaphor, and as a generally accepted technical term in some specialised areas. A bucket is most commonly a type of data buffer or a type of document in which data is divided into regions.
Various usages relate to different features. There is no usage that is consistent with every one of these features.
- The contents of a bucket are unsorted.
- A bucket has a fixed size, which is determined when it is created.
- A bucket has a limited number of states:
- It may be empty.
- It may be non-empty. Some usages further distinguish:
- It may be partly full.
- It may be full. Some usages further distinguish:
- It may be exactly full.
- It may be overflowing.
Types of bucket
- Buffers known as buckets are used:
- In the bucket sort algorithm.
- In bucket elimination algorithms.
- In the token bucket (TB) algorithm for network traffic shaping.
- In the leaky bucket (LB) algorithm for network traffic shaping.
- In bucket brigade algorithms.
Bucket sort, or bin sort, is a sorting algorithm that works by distributing the elements of an array into a number of buckets. Each bucket is then sorted individually, either using a different sorting algorithm, or by recursively applying the bucket sorting algorithm. It is a distribution sort, a generalization of pigeonhole sort, and is a cousin of radix sort in the most-to-least significant digit flavor. Bucket sort can be implemented with comparisons and therefore can also be considered a comparison sort algorithm. The computational complexity depends on the algorithm used to sort each bucket, the number of buckets to use, and whether the input is uniformly distributed.
Bucket sort works as follows:
- Set up an array of initially empty "buckets".
- Scatter: Go over the original array, putting each object in its bucket.
- Sort each non-empty bucket.
- Gather: Visit the buckets in order and put all elements back into the original array.
Traffic shaping is a bandwidth management technique used on computer networks which delays some or all datagrams to bring them into compliance with a desired traffic profile. Traffic shaping is used to optimize or guarantee performance, improve latency, or increase usable bandwidth for some kinds of packets by delaying other kinds. It is often confused with traffic policing, the distinct but related practice of packet dropping and packet marking.
The most common type of traffic shaping is application-based traffic shaping. In application-based traffic shaping, fingerprinting tools are first used to identify applications of interest, which are then subject to shaping policies. Some controversial cases of application-based traffic shaping include bandwidth throttling of peer-to-peer file sharing traffic. Many application protocols use encryption to circumvent application-based traffic shaping. Another type of traffic shaping is route-based traffic shaping. Route-based traffic shaping is conducted based on previous-hop or next-hop information.
Bit bucket
This is a humorous but common phrase. Something goes into the bit bucket when it is deleted, generally irreversibly and quite often wrongly, such as files or emails that just disappear.
It has been commonly suggested that this usage dates from the days when punched cards and/or punched tape were common. Card and paper-tape punches each had a receptacle for the chips punched from the cards or tape to create the holes (rectangular in a card, round in a paper tape), which often looked like a bucket and was known by this name. By analogy it was jokingly suggested that the CPU, which in those days was an equipment rack of similar size to a large peripheral unit, contained a similar receptacle for lost data.
Documentation bucket
A bucket is a document of no definite size to which information of interest is added with no structure. Many software packages have a README file which is a bucket containing the very latest information. In IBM culture, such a file is known as a bucket and is opened for critical fixes and fix packages.
六级/考研单词: compute, metaphor, data, buffer, usage, consistent, farther, overflow, eliminate, token, leak, array, digit, flavor, implement, thereby, scatter, desire, profile, parcel, seldom, confuse, pack, fingerprint, controversy, protocol, conduct, delete, punch, analogy, equip, rack, tentative, hardware

浙公网安备 33010602011771号