On the last day of the holiday last week, I revisited “Modern Operating Systems” and posted a message praising modern operating systems on social media, which I will attach at the end. This article will be brief.
In the era of batch processing and before, programs had to be executed in order, and it was difficult for several programs running on the same machine to communicate directly. Each program monopolized a machine and could only communicate remotely with programs that were also monopolizing other machines at the same time, similar to making a phone call; one cannot call oneself because one is always busy on the line, but one can call others, provided they are online.
The modern operating system with micro time-slice round-robin scheduling creates the illusion of processes (virtual machines), bringing multiple programs into the same space-time. Each program monopolizes a process, and they can all run simultaneously on the same machine, communicating with each other at any time. From then on, everything can be a process. This is of great significance.
The fat client and thin network model of TCP/IP originates from this.
Previously queued programs can now execute “simultaneously,” allowing for intense interactions and collaborations between programs, which is also the philosophical thought behind UNIX’s combination of small programs. In the batch processing era, sending a file to an egrep program for filtering and then transmitting it over the network to another host was unimaginable.
Interactions have become numerous and complex, the host is increasingly crowded, and programs communicating externally share physical resources, creating an urgent need for a good way to schedule resources and manage the communication process for each program. This means that the network protocol stack’s endpoint is becoming fatter.
Terminals are no longer functionally fixed; they have become containers that run multiple programs simultaneously. The communication behavior of these programs when connecting to the network is unpredictable, necessitating the decoupling of the connection and communication processes. This means that at the moment of terminal access, the core of the network is unaware; in other words, communication between programs must be stateless to the network, which is the source of the thin network.
When a terminal connects, it is only assigned an IP address, and resources above the transport layer are allocated only at the moment when programs need to communicate. This is the current approach. However, initially, TCP and IP were a whole; the endpoint was not as fat as it is now, and the network side was not as thin as it is now. As systems evolved, the endpoint became increasingly complex, while the network side became increasingly unable to bear this complexity, resulting in the current fat client and thin network of TCP/IP.
I once read a paper on packet-switched networks, which stated that the idea of packet switching has existed for a long time, but it only began to develop significantly after terminals became “general-purpose computers.” The development of computer science has promoted network communication, which is roughly what it means.
From an economic perspective, public resources become cheaper as the number of users increases; cheaper means simplification. Here, the public resource is the IP network, and the users are TCP/UDP… The complexity will concentrate on the host, focusing on the management of these transport protocols.
Still, the previous point: after exceeding a certain threshold, the more things there are, the more complex the management becomes, and the greater the additional management overhead. dog250’s blog
Editor’s note: At such times, it is often necessary to redefine the problem and abstract new solutions; otherwise, it will continue to spiral inward.
Han Xin points out that the more, the better; this is not true in reality.
Imagine a brainstorming session or debate where the speaker must finish everything they want to say in one go, and once they finish, they cannot speak again. What new ideas could emerge? It is precisely the real-time interaction in the same space-time that makes these discussions interesting and beneficial. The modern operating system with time-slice round-robin scheduling grants programs the right to communicate and collide in the same space-time, while TCP/IP extends this right to every corner of the internet.
The significance of modern operating systems is very special; it feels even more important than TCP/IP. Network connections have existed for a long time, from Roman roads to 20th-century telephone lines, and up to the packet-switched networks of the 1960s, but they were not widely used until modern UNIX systems began to develop, and TCP/IP was finally “forced” into the scene. Because applications and data began to explode simultaneously, control signaling and data started to increase, urgently needing to be transmitted to another system, the network began to develop significantly. dog250’s blog
Behind all this is the multitasking time-sharing operating system, which for the first time has the capability to “do many different things at the same time.” With more interactions, there are more possibilities, and the chain reaction originates from this. The subsequent developments are well known.
dog250’s blog
Doing several different things at the same time can be done in different ways; one can finish one thing before doing another, in sequence, or one can divide each task into different steps according to their own logic and rotate through different steps of different tasks. However, none of these have modernized the system; the essence of modernization lies in “dividing each task into multiple fixed time-slice steps,” no longer based on tasks but on fixed time slices. This gave birth to the modern scheduling system, which is the root of modern operating systems. Under this mechanism, virtual memory is almost a natural progression.
dog250’s blog
In reality, time slices are not fixed, but this is not important because the scheduler has been decoupled from specific tasks. The same innovation comes from packet switching; time slice statistics can be reused. Although it is possible to enforce a fixed size for each packet to occupy a fixed time slice, in reality, packets can be of arbitrary length under maximum limits. The essence lies in decoupling packets from time, no longer associating them with connections. Therefore, in the end, TCP is indeed an inappropriate transport abstraction; it is clearly a connection. From here, one can infer that IP was originally part of TCP, and this story is the same as that of modern operating systems. dog250’s blog
Wenzhou, Zhejiang: Wet shoes do not get fat when it rains.