Why is ChromeOS considered an OS when it relies on a host OS to do the heavy lifting?

Why is ChromeOS considered an OS when it relies on a host OS to do the heavy lifting? by Jeff Nelson

Answer by Jeff Nelson:

Several people forwarded this question to me. Thank you!

I think of webtops as a new OS architecture, in the sense that a webtop is a new execution environment layered on top of a host OS, similar to how consumer OSs are layered on top of a BIOS.  The host OS is low-level, close to the bare metal, and the webtop is high-level, far away from the bare metal.  For the host OS, applications run in machine code.  For the webtop, applications run in HTML or associated web technologies.

Chrome OS is also largely kernel agnostic.  To date, it's been built on top of a number of distinct Linux kernels, but there's no reason the underlying kernel even has to be a Linux. It could be any OS that can manage the devices and provide an execution environment for Chrome.  Again, this is very similar to how a BIOS provides an execution environment for the host OS. 

The question details also mention a VM.  In a sense the browser execution environment can be considered a form of VM.  It's an interpretted VM that is comprised of an HTML interpretter and a collection of other interpretted and bytecode execution technologies.  It can be taken as a whole as one meta-VM implementing the HTTP protocol and a language for implementing web apps. 

So, I'd agree, that in a sense Chrome OS could be considered a virtual machine architecture, rather than an OS.  However, it's also hiding all the details of the underlying OS. For example, if you built Chrome OS on top of Ubuntu or SUSE, a user couldn't tell the difference, because we don't let them get any closer to the bare metal than the browser execution environment (unless they put it in dev-mode, of course).  So, it's not exactly a virtual machine, because by design, there is no lower level of access to the bare metal and it's devices.  If you want to run an app on Chrome OS, it has to be a web app.  Since that's the entire execution environment, it can be considered an "OS".

Some people have also compared Chrome OS to JavaOS.


In my view, they are apples and oranges.  They are both fruit, but they are entirely different fruit:  Java OS was based around the concept that everything would be run on a Java VM, and every application would run locally as a Java applet.  It failed, because there really weren't many Java applets and none of them were of a quality to compete head to head with Microsoft products.  Chrome OS is based on the concept that everything WON'T be run locally, instead all apps are distributed in the cloud and run as web apps (although some can be cached and synced locally for the convenience of users who go offline).  Obviously, there's plenty of web content and some of it is good enough to compete with Microsoft products, which is one of the reasons Chrome OS has been such a success.  Chrome OS also doesn't include a Java VM, so there's really no similarities with JavaOS or it's product vision.

Chrome OS is also compared frequently to the "Network Computer", which was a product of Oracle back in 1996.  Oracle's NCOS was a derivative of RISC OS, and designed to boot over the network. 


That's how it gets the name "network computer"; it's a diskless computer that boots over the network, much like PXE boot, today.  In fact, Oracle published a specification for "network computers" that was so broadly defined, it encompassed every computer – even Windows. The Oracle product, however, was  a full Unix, with the Unix architecture, and running native apps locally just like every Unix.  So, again, there's not really even a slight similarity with the webtop architecture and the "network computer" architecture.  Chrome OS is not designed to run native apps, it has a disk, and it doesn't do network boot.

The term "webtop" is also heavily overloaded.  It's been re-used as a trademark for a wide variety of products that have nothing whatsoever to do with the modern definition of a web-centric operating system delivered on a laptop.  SCO originally trademarked the term for a product they were selling, a web browser plugin that implemented a VNC viewer.  Motorola trademarked it for a smartphone docking station.  Obviously, these have nothing to do with modern webtops, either.

Why is ChromeOS considered an OS when it relies on a host OS to do the heavy lifting?


What is the equivalent of a binary executable (exe) as in Windows for Linux?

What is the equivalent of a binary executable (exe) as in Windows for Linux? by @t3nsor

Answer by Brian Bi:

Linux does not use file extensions to distinguish executable files.

When you try to execute a file, the kernel first checks whether you have permission to execute the file. This is determined by the filesystem permission bits. (Example: a file with permissions 0644 can't be executed by anybody.) If this check fails, no further processing is done.

If you really do have permission to execute the file, then the kernel searches for a handler that recognizes the executable format. All modern Linuxes will recognize the ELF executable format; some may have support for the old a.out format [1] or other, more obscure formats. Wine installs a handler that is capable of executing Windows .exe files. In addition, all Unix-like systems, including Linux, will recognize the shebang line (beginning with #!).

If there's a handler that recognizes the file, that handler parses the program headers, loads the image into memory, and so on. If not, an error is returned.

For technical details, see [2]

[1] Note that the file a.out produced by the C compiler is not necessarily in the a.out format; the name is a historical relic.
[2] http://www.linux.it/~rubini/docs…

What is the equivalent of a binary executable (exe) as in Windows for Linux?

Why are text editors more popular than IDEs with the engineers in the software industry?

Why are text editors more popular than IDEs with the engineers in the software industry? by @jeremyhoffman

Answer by Jeremy Hoffman:

This is an excellent observation and an excellent question! It is surprising.

I primarily work in C++ at Google, and my teammates and I all use emacs or vi(m). (I use emacs — the legacy of CS 107 at Stanford.) Here are some reasons I can think of for the widespread use of emacs and vi:

  1. speed — emacs and vi are bare bones, and as such they never hang. Eclipse hanging is sort of a running joke among the engineers who use it. Also emacs and vi support powerful keyboard shortcuts and commands — once you've used them a number of times, you don't need a menu bar to execute them. I don't know how quickly you can switch to another file and view it side-by-side with the file you're currently viewing, but in emacs, I hit C-x 3 C-x-b start_of_other_buffer_na[tab][enter] pretty fast.
  2. habit Most of us picked up emacs and/or vi at some point in our education or careers, got to Google, found official documentation and support for them, and got to work. Call it "inertia" or call it "laziness," but it takes a big improvement in productivity to get a programmer to change his or her tools.
  3. editing is not the hard part — IDEs make some things easier (auto-completion, auto-refactoring). But I think the hardest part of a Google engineer's job is not the code entry itself — it's deciding which libraries to use, choosing the right algorithm, making decisions about tradeoffs, and designing the data structures to be clear and capable. These are not things that an IDE can even help with.
  4. customization — Google has added some emacs libraries that perform useful IDE-like functions, and I've picked up enough emacs lisp to write a few functions to tweak some aspect of emacs. For instance, I wrote an elisp function that toggles the frame width from "wide enough for one 80 column file" to "wide enough for two 80 column files" and assigned it to F8.
  5. non-editor tools — For browsing and understanding existing code, as opposed to editing it, Google engineers have other tools. Likewise for reviewing other people's code changes — we don't do this in emacs or vi. 🙂
  6. consistent style — The entire Google code base adheres to a rather strict Style Guide. (Public version: http://google-styleguide.googlec….) So I can identify at a glance which identifiers are types, methods, local variables, member variables, and global variables. And I can almost always tell which arguments to a function are the inputs and the outputs. So we don't need an IDE for that.
  7. stability, as in constancy — emacs and vim never change. I don't have to worry that an update is going to be forced on me that's going to "move my cheese" and disrupt my workflow.

It may be that early on in the life of a programmer, the features of an IDE are very helpful, but as you get more experienced, you are better able to "run the program in your head," like Cypher in The Matrix. ("You get used to it… I don't even see the code.")

That's not to imply that engineers who use simple text editors are somehow "better" than those who use IDEs. I wish I used an IDE that was better than emacs. The most important thing, at Google or anywhere else, is that you and your team should choose the tools that make you as productive as possible.

Note that this is my personal opinion and reflects my personal experience.

Why are text editors more popular than IDEs with the engineers in the software industry?

Software Performance: What causes a PC to slow down over time?

Software Performance: What causes a PC to slow down over time? by Steven de Rooij

Answer by Steven de Rooij:

It is because Microsoft doesn’t care about you.

First, some mythbusting: many people seem to believe that the hardware itself magically slows down. I’ve heard people say “the computer is getting a bit old, it isn’t as fast as it used to be”, as if it was creaking in its transistors. That’s impossible and untrue. (Edit: I was trying to not go into this further, but as pointed out in the comments repeatedly, what CAN happen is that the fan deteriorates, the CPU overheats and then gets throttled by the BIOS. If you experience speed problems make sure you rule out real hardware problems such as this first.)

The other answers dutifully list dozens of reasons why computers appear to slow down, that’s all fair and balanced, but I’d like to be just a teeny bit less fairminded and say: in practice the experience is really tied to using Windows. Macs and Linux boxes don’t slow down in this way.

Why is Linux much better than Windows at not slowing down over time?

Why does Microsoft Windows slow down over time?

Now of course Windows does not magically slow down: there are reasons, and it’s not a single reason but a combination of attempts of other software companies to claim your attention by being as obnoxious and in your face as possible, as well as bad design decisions over at Microsoft. So it’s certainly possible to have a debate about whose responsibility this is. Is it Microsoft’s fault for allowing this to happen, or is this the user’s fault for installing too much junk on their system, or is it other people’s fault for making bloatware, spyware, viruses, too many updates and advertisements, or is it the hardware manufacturer’s fault for making slow and bulky drivers?

I’m squarely in the camp of mostly, it’s Microsoft’s fault. They have created a system that, for whatever reason, accumulates cruft over time. Of course users are going to use their system. Install stuff on it, throw it away again, replace their printer or other hardware, do stuff. But Microsoft has shown few signs that they were attempting to protect their users from cruft accumulating over time. While users got bogged down by an ever-expanding registry or a fragmented hard drive, Microsoft was busy adding a “helpful” paperclip to Word. When users upgraded to a new version of Windows that was supposed to work on their system (“awesome new features for improved performance!”), they found that while it worked somewhat after a clean install, after only a few software installs and updates they had to expand their memory or buy a new system.

(I can’t find more complete, up-to-date, and unbiased charts, sorry. It depicts memory required to run these systems, in MB. In reality, the difference is larger than shown because while windows would run on those minimum requirements, it really required at least 2GB to run smoothly.)

I don’t blame Microsoft for other people writing software to abuse their system, such as malware and viruses. But I do blame Microsoft for adding all kinds of services that slow down performance even for users who never use these services. Also, they never tried to force manufacturers to keep their drivers lean, or to refrain from installing bloatware. They were content to keep adding more and more features to their products without improving the core functionality and ensure smooth operation on any hardware (because really, 1GB of memory should be bloody well enough for an operating system to run smoothly!). Some other answers list “you waited too long to reboot your system” as a reason why it is slow! Is it a law of nature that operating systems need to reboot every week? Other OSes prove it is not.

My overall impression is that while Microsoft has always worried greatly about having a marketable user experience, they never truly prioritised leanness and resource efficiency, which is of fundamental importance for the usability of an operating system. People keep accepting it, and they will sheepishly go to the store to upgrade their hardware every two or three years, somehow convinced that they now need to have at least 4GB of RAM to run their word processor or watch a movie on Netflix.

Software Performance: What causes a PC to slow down over time?

How do you choose the programming language to use on a project?

How do you choose the programming language to use on a project? by Marcus Salzer

Answer by Marcus Salzer:

It depends on the project, you have to consider which tools are available, and which platform you want to deploy to.

Here's a chart wich shows what different languages are used for, but it's quite simplified.

EDIT 2016–12–5: As some people have found the image too blurry I'll now link the website.

Which Programming Language Should I Learn First? [Infographic]

It's a good site, check it out! But just don't take that Infographic too seriously, it doesn't really cover all kind of projects.

How do you choose the programming language to use on a project?

What will be your 10 tasks that will push you out of your comfort zone?

What will be your 10 tasks that will push you out of your comfort zone? by K.K. Tripathi

Answer by K.K. Tripathi:

Some simple things to do –

  1. No masturbation.
  2. Exercise.
  3. A good daily routine.
  4. A better planning to do your task step by step.
  5. Stay hungry to learn new things.
  6. Do whatever you are interested in or make it interesting what you do.
  7. Spend at least half hour a day alone.
  8. Cut off all distractions from your life like social media or anything else if you have.
  9. Make some friends who are a way better than you.
  10. Remove negative or hopeless friends from your friend list.

Thank you Arnig for asking this question. Good luck!

Edit: Thank you for your upvotes, I never get 43 upvotes for my any answer.

Edit 2: Wake up early and jogg. (suggestion by Anurag Gautam )

Edit 3: For #1, it’s my opinion not a law, so if you masturbate or not its up to you. Peace!

What will be your 10 tasks that will push you out of your comfort zone?

Could you give examples of programs that require more RAM and programs that require more CPU power?

Could you give examples of programs that require more RAM and programs that require more CPU power? by Joey Kim

Answer by Joey Kim:

More RAM:

int a[1000000000000000000000000000]; // congratulations, you're out of RAM

More CPU:

for(;;) { fork(); } // a fork bomb! run!

Browsers can use a lot of memory if you go onto “rich web applications”. If you run that above code from a JavaScript console, you’ve got yourself a program that uses a lot of CPU.

Editors such as Eclipse and Aptana Studio use a lot of memory. On the other hand, Notepad (the one that comes with Windows) uses an insanely small amount of memory.

Emulators, such as Bochs or QEMU use a lot of CPU, since you’re converting instructions from one form to another.

Google Chrome uses less memory than Firefox and Internet Explorer, but Firefox uses less CPU.

Hope this helps!

EDIT: Peter Ho said that “for(;;)” takes up only one core. He suggested a fork bomb. Edited to reflect his suggestion. Thanks, Peter!

Could you give examples of programs that require more RAM and programs that require more CPU power?