What is bootstrapping?

后端 未结 13 1458
醉话见心
醉话见心 2020-11-29 14:09

I keep seeing \"bootstrapping\" mentioned in discussions of application development. It seems both widespread and important, but I\'ve yet to come across even a poor explan

相关标签:
13条回答
  • 2020-11-29 15:02

    The term "bootstrapping" usually applies to a situation where a system depends on itself to start, sort of a chicken and egg problem.

    For instance:

    • How do you compile a C compiler written in C?
    • How do you start an OS initialization process if you don't have the OS running yet?
    • How do you start a distributed (peer-to-peer) system where the clients depend on their currently known peers to find out about new peers in the system?

    In that case, bootstrapping refers to a way of breaking the circular dependency, usually with the help of an external entity, e.g.

    • You can use another C compiler to compile (bootstrap) your own compiler, and then you can use it to recompile itself
    • You use a separate piece of code that sets up the initial process without depending on any functions provided by the OS
    • You use a hard-coded list of initial peers or a hard-coded tracker URL that supplies the peer list

    etc.

    0 讨论(0)
  • 2020-11-29 15:05

    In terms of it in regards to using the popular Twitter Bootstrap I feel like this type of bootstrapping is the action of integrating a modular component into a Web application without the Web application having to even acknowledge the modular component exists until it needs it or references it.

    The developer can seamlessly integrate a default copy of the CSS Twitter Bootstrap theme by simply loading (referencing) it into the Web application. Vuola! Then you may need to override some of these changes, but you can do so in such a way that the resource/component is untouched and completely reusable.

    This same concept is how Web Devs implement jQuery APIs and so on, but it's not really expressed by Devs as bootstrapping per se. What it does is it improves flexibility and reusability while allowing the isolation of different components/resources of an app to reside freely either on the same server/s or possibly on a CDN.

    NOTE: In computing bootstrapping deals with the MBR and in UNIX it requires a special bootloader or manager which is a small program in ROM that loads the OS into RAM. If you think about it the same concept takes places in the action of the bootstrap loader checking the MBR and loading the OS based on this table which occurs without the OS having any idea that this takes place.

    0 讨论(0)
  • 2020-11-29 15:06

    I belong to the generation who flipped switches to enter a boot program. In the early 1980s, I worked on a microcomputer called Micro-78, developed by Electronics Corporation of India Ltd (ECIL). It was a sort of clone of Altair 8800. I distinctly remember what happens when a small boot program was entered using the toggle switches and executed by pressing a button. The program reads a second boot program contained in the 1st track of the floppy disk and overwrites it on itself in such a way that the second boot program starts executing to load a disk operating system. I think the term "bootstrap" refers to this process of the first boot program reading and overwriting the second boot program on itself, in a way "pulling itself up" with the additional functionality of the second boot program. That may be the origin of the original meaning of "the bootstrap program".

    0 讨论(0)
  • 2020-11-29 15:07

    IMHO there is not a better explanation than the fact about How was the first compiler written?

    These days the Operating System loading is the most common process referred as Bootstrapping

    0 讨论(0)
  • 2020-11-29 15:08

    Bootstrapping has yet another meaning in the context of reinforcement learning that may be useful to know for developers, in addition to its use in software development (most answers here, e.g. by kdgregory) and its use in statistics as discussed by Dirk Eddelbuettel.

    From Sutton and Barto:

    Widrow, Gupta, and Maitra (1973) modified the Least-Mean-Square (LMS) algorithm of Widrow and Hoff (1960) to produce a reinforcement learning rule that could learn from success and failure signals instead of from training examples. They called this form of learning “selective bootstrap adaptation” and described it as “learning with a critic” instead of “learning with a teacher.” They analyzed this rule and showed how it could learn to play blackjack. This was an isolated foray into reinforcement learning by Widrow, whose contributions to supervised learning were much more influential.

    The book describes various reinforcement algorithms where the target value is based on a previous approximation as bootstrap methods:

    Finally, we note one last special property of DP [Dynamic Programming] methods. All of them update estimates of the values of states based on estimates of the values of successor states. That is, they update estimates on the basis of other estimates. We call this general idea bootstrapping. Many reinforcement learning methods perform bootstrapping, even those that do not require, as DP requires, a complete and accurate model of the environment.

    Note that this differs from bootstrap aggregating and intelligence explosion that is mentioned on the wikipedia page on bootstrapping.

    0 讨论(0)
  • 2020-11-29 15:10

    Boot strapping the dictionary meaning is to start up with minimum resources. In the Context of an OS the OS should be able to swiftly load once the Power On Self Test (POST) determines that its safe to wake up the CPU. The boot strap code will be run from the BIOS. BIOS is a small sized ROM. Generally it is a jump instruction to the set of instructions which will load the Operating system to the RAM. The destination of the Jump is the Boot sector in the Hard Disk. Once the bios program checks it is a valid Boot sector which contains the starting address of the stored OS, ie whether it is a valid MBR (Master Boot Record) or not. If its a valid MBR the OS will be copied to the memory (RAM)from there on the OS takes care of Memory and Process management.

    0 讨论(0)
提交回复
热议问题