linux - 求科普:TCP/IP协议栈,技术栈,函数栈等等各种栈到底是在说什么?
PHP中文网
PHP中文网 2017-04-17 16:30:14
0
4
952

以下是摘抄的例句:
“每当声明了一个函数,它就产生了一个闭包域(可以解释为每个函数都有自己的函数栈)”
“七层负载均衡工作在OSI模型的应用层,因为它需要解析应用层流量,所以七层负载均衡在接到客户端的流量以后,还需要一个完整的TCP/IP协议栈。”
……
我在看一些技术文章的时候经常会被这些词语搞懵圈,还请诸位师兄们帮我科普一下。

这些文章里面所说的各种栈,应该不是指数据结构里面的栈和计算机内存里面的栈内存,还来个后进先出吧?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(4)
阿神

Explain one by one

TCP/IP protocol stack refers to the four-layer protocol stack in TCP/IP, just like the OSI seven-layer model in computer network courses. For details, please refer to Baidu.

The technology stack refers to a series of technology systems (a collection of technology products in the field of programming) used in a project. For example, Baidu uses LNMP a lot, Sina Weibo uses PHP, redis and other technologies a lot, and Taobao uses a lot of them. It is JAVA that is used the most.

The function stack refers to starting from the main function and calling various modules step by step. Various modules call other dependent modules, nested calls layer by layer. Finally, after the call is completed, return to main layer by layer. Function, this execution process if represented graphically is very similar to the stack structure in the data structure.

These three stacks have different meanings. It is recommended to consult Xinhua Dictionary for more details.

Ty80

For example, the required technology stack in the recruitment requirements, the full stack, I think the "stack" mentioned here is a bit similar to Doraemon's pocket. There are many good things in it, and you can use them when you take them out.

阿神

The function stack refers to the stack of stack memory. .
Others are stacks of abstract meanings, meaning layer by layer. . .

PHPzhong

Function stack means that the local variables inside the function are stored in memory as a stack data structure. This data structure will be destroyed after the function is called.
Variable storage within programming languages ​​is roughly divided into two data types, heap memory and stack memory. The function stack is an example of the use of stack memory. There are other examples of using stacks, such as each thread having a dedicated stack space.
The TCP/IP protocol stack has nothing to do with memory. This stack can be understood as a stack that refers to a collection, similar to what we often call a technology stack, which is the same truth.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!