128

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 ...


80

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 ...


61

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 ...


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;


42

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....


39

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 ...


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: ...


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 ...


28

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] ...


25

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 ...


24

No, because a good kernel wipes the contents of memory before it is issued to a process to protect against exactly the kind of attack you propose. On Unixy systems, memory is allocated to processes by extending what's called the program break, which is the limit of virtually-addressable space a process can use. A process tells the kernel it wants to extend ...


24

Although this is opinion-based, I think it's just another historical artifact. Early OSes used a simple file system design for performance that was reasonably strongly tied to the characteristics of the hardware available at the time, and it's been the same way ever since. It's difficult to change the old file read/write APIs for more transactional query/...


22

Determination of the terminating character is up to the compiler for literals and the implementation of the standard library for strings in general. It isn't determined by the operating system. The convention of NUL termination goes back to pre-standard C, and in 30+ years, I can't say I've run into an environment that does anything else. This behavior ...


20

I'd say that Fortran, even of pre-C times, abstracts the programmer from hardware details too much. No pointer support. If you want to pass large amounts of data between subroutines, you use a COMMON block, and you don't control its allocation. Pointer arithmetic and structure allocation control are hard to non-existent. Data types are numeric-oriented. ...


19

Yes, it's theoretically possible to read another process' released memory. It was the source of a number of privilege escalation attacks back in the day. Because of that, operating systems nowadays effectively zero out memory if it was previously allocated by another process. The reason you don't always see zeroed out memory is because it is more ...


18

For 80x86 there are 4 options - "nothing", segmentation only, paging only, and both segmentation and paging. For "nothing" (no segmentation or paging) you end up with no easy way to protect a process from itself, no easy way to protect processes from each other, no way to handle things like physical address space fragmentation, no way to avoid position ...


17

Is the compiler doing anything OS specific when compiling this? Probably. At some point during the compiling and linking process, your code is turned into an OS-specific binary and linked with any required libraries. Your program has to be saved in a format that the operating system expects so that the OS can load the program and start executing it. ...


16

"Malware" is just short for "malicious software". Software is malicious if it was written with malicious intent, which is intent to cause harm. (Technically it doesn't even need to succeed at causing harm, or even have the capability of doing so, it just needs to have the intent of causing harm.) Therefore, by definition, if the machine that you are using ...


16

There are a number of good reasons for this. Today's low-level language was yesterday's high-level language Yes, believe it or not, once upon a time even C was viewed as a high-level language. Even ~20 years ago it was common enough to see it described as a "mid-level" language. This was a time before OO was as popular as it is today, Java didn't exist, ...


15

At least for free software on Linux, you usually use some builder like make. You could use some other builder program, like scons or omake For some (mostly historical) reasons, the Makefile may be generated by utilities like autoconf or cmake; these generators also deal with configuration issues (e.g. they disable some features of the software if a ...


15

Since you're not talking about booting, your answer is actually that the concept of "executable," or even "files" is rather irrelevant. The concept of files is an OS concept. Without an OS, all you have is a harddrive, with some bits on it. It is the OS that gives structure to that information that makes it meaningful to think of the data as a file. For ...


15

On Windows, OS X and Linux, we can only use C Language to post system calls. Actually, this is wrong, at least for Linux. The real system call does not use the same calling convention than C, as defined in the ABI. Details are of course processor specific (so let's focus on x86-64). (I am not exactly sure of all the details here, you need to check; I've ...


15

On Linux (and 1980s era Unixes), a storage device (quite often a disk partition on some hard disk, or on some SSD) is a block device (see this) so is a [sub-]sequence of blocks (which is the basic unit of physical I/O). The physical block size depends on the hardware (old IDE disks had a block size of 512 bytes, new large SATA disks have a block size of ...


15

It's what we call kernel or system "trap", which triggers a kernel mode switch to execute the system call. As to why that word was used, I haven't found definitive proof yet, so my current assumption is that it comes from either or both of these 2 options: We used to say sometimes that the code "fell" into a different mode instead of &...


14

I'm rather stunned that in all the time since this question was posted that nobody has mentioned the origins of segmented memory architectures and the true power that they can afford. The original system which either invented, or refined into useful form, all the features surrounding the design and use of segmented paged virtual memory systems (along with ...


14

From experience I can tell that live as a software developer varies widely based on the size of the company you're working in. Smaller shops tend to require more multi-tasking and taking on multiple roles, while large companies usually have very strictly described role for each person. One extreme being a one-man-show, where you (obviously) have to do all ...


14

Http.sys is not the only kernel-mode web server available: under Linux there is also tux. As you have correctly identified, security is a concern with these kinds of servers, which has lead to tux not being included in the mainline linux kernel (and I believe not updated for more recent kernel versions). A better solution would be the use of an operating ...


14

The book you are reading was published in 2007. The C++ API for managing threads wasn't standardised until 2011. At the time, on different systems you had to use entirely different platform-specific libraries (pthreads, win32 threads, etc). Now, this is no longer true. Your book is out of date.


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