407

Basically, your question is "how are computer chips, instruction sets, operating systems, languages, libraries, and applications designed and implemented?" That's a multi-billion dollar worldwide industry employing millions of people, many of whom are specialists. You might want to focus your question a bit more. That said, I can take a crack at: I can'...


261

There are plenty of websites that go through the boot process (such as How Computers Boot Up). In a nutshell, its a multi-stage process that keeps building up the system a little bit at a time until it can finally start the OS processes. It starts with the firmware on the motherboard which tries to get the CPU up and running. It then loads up the BIOS ...


173

A "bare metal" operating system doesn't run within anything. It runs the full instruction set on the physical machine, and has access to all of physical memory, all device registers and all privileged instructions, including those that control the virtual memory support hardware. (If the operating system is running on a virtual machine, it may think it is ...


171

Microkernels are the future I think Linus hit the points on monolithic kernels in his debate. Certainly some lessons learned from microkernel research was applied to monolithic kernels. Microsoft sometimes used to claim that the Win32 kernel was a microkernel architecture. It's a bit of a stretch when you look at some textbook microkernels, but the claims ...


156

Avionics For aircraft control systems, we don't speak of operating systems but of avionics, integrated avionics or computer airborne systems in general. And they are actually a combination of a multitude of independent or inter-dependent systems, for different functions (flight control, collision avoidance, weather, communications, blackboxes...). Each ...


127

I am surprised nobody mentioned yet one of the most glaring examples: software-defined radio. If you took a present-day smartphone back in time some 50 years and showed it to a competent engineer from the mid-1960s, he would be able to comprehend most of it. That a supercomputer can be reduced to something that fits in your pocket? Check. That you can have ...


78

You mention on how if the code is specific to a CPU, why must it be specific also to an OS. This is actually more of an interesting question that many of the answers here have assumed. CPU Security Model The first program run on most CPU architectures runs inside what is called the inner ring or ring 0. How a specific CPU arch implements rings varies, but ...


72

"I would really like to learn this stuff". If you are long-term serious: Go to college, specialize in software engineering. Take every compiler class you can get. Those people providing the classes are better educated and more experienced than you; its good to have their expert perspectives used to present the information to you in ways you'll never get ...


68

My main problem with your approach is that a leak detection tool (like Valgrind) will report it and you will start ignoring it. Then, some day a real leak may show up, and you'll never notice it because of all the noise.


62

In the beginning there was no power in the CPU. And the Man said "let there be power", and the CPU started to read from a given address in memory and execute the instruction that was present there. Then the next one and so on until the end of the power. This was the boot up. Its task was to load another piece of software to gain access to the environment, ...


60

Software Experts Ignored the Economics Of Hardware ...or "Moore was right and they were both wrong" The biggest thing that was overlooked in this debate was the impact of CPU manufacturing technology and economics, driven by shrinking transistor sizes as expressed in Moore's Law (not surprising as though they knew a lot about CPU hardware, these guys ...


60

Today, most database management systems (e.g. PostGreSQL, MongoDB, etc...) internally keep their data inside OS files (in the past, some DBMSs used raw disk partitions directly). On recent computers still using spinning hard disks, the disk is so slow - relative to the CPU or the RAM - that adding a few software layers is not relevant. SSD technology might ...


49

As you can see, APIs are not indicated as a part of the operating system. I think you are reading too much into the diagram. Yes, an OS will specify a binary interface for how operating system functions are called, and it will also define a file format for executables, but it will also provide an API, in the sense of providing a catalog of functions that ...


47

Take a step back. A compiler is simply a program that translates a document in one language into a document in another language. Both languages ought to be well-defined and specific. The languages do not have to be programming languages. They can be any language whose rules can be written down. You've probably seen Google Translate; that's a compiler ...


46

Here's an online book/course that you can follow called The Elements of Computing Systems: Building a Modern Computer from First Principles. Using simulators, you actually build a complete computer system from the ground up. While many commenters have stated that your question is too broad, this book actually answers it while staying very manageable. When ...


44

The things that are called "C strings" will be null-terminated on any platform. That's how the standard C library functions determine the end of a string. Within the C language, there's nothing stopping you from having an array of characters that doesn't end in a null. However you will have to use some other method to avoid running off the end of a string....


42

Microkernels are the future He got that wrong, seems everything is converging into using hybrid kernels. Linux formally still is monolithic, but adding stuff like FUSE etc. make it look bit hybrid too. x86 will die out and RISC architectures will dominate the market Ok, so x86 didn't die out. But doesn't RISC dominate the market? Billions of ...


42

Consider this circuit: It is a Flip Flop, aka a Bistable Multivibrator. It can be replaced with this code: static bool toggle; if (toggle == true) { lblTop.BackColor = Color.Black; lblBottom.back Color = Color.Red; } else { lblTop.BackColor = Color.Red; lblBottom.BackColor = Color.Black; } toggle = !toggle;


40

Once I had to implement an algorithm using deques which were allocated dynamically. I was also wondering whether I needed to deallocate all the allocated data at exit. I decided to implement the deallocation anyway and found out that the program crashed during deallocation. By analysing the crash, I found an error in the implementation of the main data ...


38

Microsoft has done some very interesting research in this direction, if you look into Singularity: http://research.microsoft.com/en-us/projects/singularity/ Also, Mothy Roscoe et al have been working on Barrelfish which uses the Eclipse constraint programming language as an OS service to sort out all kinds of OS management and resource allocation problems: ...


38

A lot depends on where you put the division between low-level and high-level languages. For example, different people tend to put a language like C++ on different sides of that divide. Regarding your questions: I don't believe there is such a difference between low-level and high-level languages, but more a difference between interpreted languages and ...


33

In my experience, yes, it is perfectly normal for developers in small companies to be expected to cover a broad range of roles. It is certainly normal for a company so small that it only has three developers to not have a specialized DBA or sysadmin. However, I would find it unusual for such a small company to use such a broad range of technologies. JSP and ...


31

With segmentation it would be, for example, possible to put each dynamically allocated object (malloc) in its own memory segment. Hardware would check segment limits automatically, and the whole class of security bugs (buffer overruns) would be eliminated. Also, since all segment offsets start at zero, all compiled code would automatically be position ...


29

A "Unix like" system may be fully compliant with the Single UNIX Specification, the collective name of standards for what qualifies as a Unix system, but at the same time Unix is a registered trademark of The Open Group and vendors of Unix like systems need to get their systems registered to officially qualify as Unix. Currently the registered UNIX 03 ...


29

Sorry to be late, but I'll describe it as such: The motherboard gets power. Timing circuits start and stabilize if necessary, based solely on their electrical characteristics. Some newer devices may actually use a very limited microprocessor or sequencer. It should be noted, alot[sic] of the things like "timing circuits start and stabilize if necessary" ...


29

It means exactly what it sounds like. A particularly famous example is the Disk II Drive designed by Steve Wozniak for the Apple II: The chief innovation was making the controller compact by using software while competitors relied on hardware. As Bill Fernandez, then an electronic technician at Apple, remembers it, "the key advantage of [Wozniak's] ...


28

Andrew Tanenbaum's Minix (see Operating Systems Design and Implementation) is intended for exactly this sort of purpose. Another (albeit quite dated) possibility is to read through Lion's Book, which covers Unix V6 (full Unix, but an old enough version that it's still simple enough for fairly easy study). The obvious disadvantages of the latter are that the ...


24

Http.sys is not so much a web server as a proxy-forwarder. Its designed to allow many web servers co-exist on a Windows box, so you can have IIS running a web site, but also several WCF services running with http/REST or SOAP interfaces, all on standard port 80. (this is why you can't run Apache on Windows without a bit of jiggling, Apache hasn't been ...


Only top voted, non community-wiki answers of a minimum length are eligible