What is bootstrapping?

后端 未结 13 1616
醉话见心
醉话见心 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.

提交回复
热议问题