Do we need an operating system?

我竟然不知道怎么组织语言了…因为我老婆总是说我前言不搭后语…不过她也说过,我的语言习惯比较符合英文的习惯,几乎全是定语从句,状语也不少,可能也比较符合中国古文,比如类似“微斯人,吾谁与归”,“谁人共我”之类…

我对操作系统还有有一番探究的(just research, not research),我也一直都想好好畅谈操作系统,然而我语言太刺,让人不悦,我也只能收着…今天突发奇想,要喷干嘛不用英文呢?我说中文都是英文的习惯(西方文化历史看多了,崇洋确实,但不媚外!),干嘛不直接用英文。

一篇英文blog,折腾了大半天,试试看(我反翻译过了,还算通顺…)。


Do we need an operating system?

Let’s consider a seemingly pointless issue.

What exactly is the meaning of an operating system? In particular, when we’re stuck with optimization problems all day, think back!

  • We optimized the spin lock,
  • We optimized the TCP/IP stack,
  • So we optimized the slab algorithm?
  • We optimize interrupt handling,
  • We’ve got interrupt threading,

God damn it! This is all about fucking the operating system!

If we know exactly what a program does, why can’t we just let it do it? Why do we have to make it run on something regrettable called an operating system? That’s a shame!

It’s creepy, it’s scary…

Well, let’s face it instead of name-calling: what does an operating system mean?

Before operating systems were given a proper name, they weren’t taken as seriously as they are now.

I don’t know any further back, starting with Ken Thompson in 1969.

At the time, UNIX contained the kind of logic that several of them needed for every application. In other words, UNIX is the largest common divisor.
Beyond this, and even more important than this, UNIX provides an abstraction of time and space:

  • time abstraction: time-sharing using CPU
  • spatial abstraction: virtual memory

That’s what operating systems are all about!

Now, who needs this? In other words, who thinks these meanings are meaningful?

Of course, the time-sharing system needs virtual memory applications.

Now, if you just want to run a Web server, who the hell do you need to share time with? The only fucking application running in your machine, you think its performance is low, this is the operating system pot!

Don’t use an operating system, just run your application, because your application doesn’t need time sharing, doesn’t need virtual memory.

All of the machine’s resources are owned by your unique application, and you don’t need the resources management services provided by the operating system. To manage these resources, you can do it yourself in your application and do it your way.


I’ve been focusing on a scene recently, which is my job, but I hate it.
We ran a quic service on our server hardware, and there were too many performance bottlenecks. When I explored it with perf, I found a lot of Linux kernel hot spots like spin_lock and memcpy…

I tried to optimize this, it took me a lot of time, I was working all night fucking, and then, I got mad.

I found that in later versions of the Linux kernel, these issues had been fixed in exactly the same way as I had. Oh, gosh!

We are all clowns juggling around the Linux kernel!

Go away, Linux kernel! All the performance problems, 90% is because of you, all the business logic, 90% do not need you!


The operating system provides convenience at the expense of performance.

Why is the TCP/IP stack implemented in the kernel?

Blame the 1970s-1990s bunch of bearded old programmers who treat TCP/IP as “function” rather than “application.” Function is the responsibility of the kernel.

In other words, everyone who started out with UNIX, from the bottom up, was a programmer, not a business logic person, much less a product manager.

Programmers don’t focus on the business, and if the suit wearers focus on UNIX during the 1070s, then the TCP/IP destined for the 1980s won’t be part of the kernel, it might just be a user base incorporated into the libc.


【下面这句用英文真不知道怎么表达,谁能告诉我,大恩不言谢!】
浙江温州皮鞋湿,下雨进水不会胖。

你可能感兴趣的:(Do we need an operating system?)