130 votes

What is meant by the phrase “Software can replace hardware”?

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 ...
Viktor Toth's user avatar
  • 1,000
51 votes
Accepted

Where did usage of OS signals go?

it seems like signals were the primary way to communicate between processes I'd disagree with this. Signals are/were the primary way for a "supervisor" process to control a "supervised&...
Philip Kendall's user avatar
43 votes
Accepted

Are C strings always null terminated, or does it depend on the platform?

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 ...
Simon B's user avatar
  • 9,513
42 votes

What is meant by the phrase “Software can replace hardware”?

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; ...
Robert Harvey's user avatar
32 votes

Where did usage of OS signals go?

Signals haven't gone anywhere. They do about as much now as they did in the 1970s. (A little more, but not much more.) Signals were, and are, a crude way of letting a process know that something ...
Gilles 'SO- stop being evil''s user avatar
28 votes

What is meant by the phrase “Software can replace hardware”?

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 ...
8bittree's user avatar
  • 5,637
26 votes

Why do modern operating systems *ever* have perceptible input (keyboard/mouse) lag?

As you may have noticed, there's a category of application that tries really hard to avoid input lag and only occasionally fails at doing so: games. Even then it's not uncommon for players to notice ...
pjc50's user avatar
  • 10.8k
25 votes

Why do modern operating systems *ever* have perceptible input (keyboard/mouse) lag?

I would like to answer this question from more of a high-level, marketing perspective than a more low-level, technical one. All of the current mainstream Operating Systems are so-called general ...
Jörg W Mittag's user avatar
22 votes

Are C strings always null terminated, or does it depend on the platform?

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 ...
Blrfl's user avatar
  • 20.3k
20 votes

Why do modern operating systems *ever* have perceptible input (keyboard/mouse) lag?

Why can't (or why don't) operating systems absolutely prioritise user input (and repainting thereof) in threading and process scheduling? Even if the operating system tells the application about the ...
Caleth's user avatar
  • 10.5k
17 votes
Accepted

Why system calls are limited to C language as far as I see?

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 ...
Basile Starynkevitch's user avatar
16 votes

Why (not) segmentation?

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 ...
Greg A. Woods's user avatar
16 votes

Why is it called a "trap" instruction?

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 ...
haylem's user avatar
  • 28.9k
15 votes

Does a file system "see" the storage device as a (very large) byte array?

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 ...
Basile Starynkevitch's user avatar
15 votes

Where did usage of OS signals go?

Signals were always a rather quirky. The mechanism is very simple, which is why it was created in the first place, but because the signal handler can interrupt the process in literally any point, what ...
Jan Hudec's user avatar
  • 18.3k
14 votes
Accepted

Why is threading platform-dependent?

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 ...
Jules's user avatar
  • 17.6k
13 votes
Accepted

Why are computer systems still insecure?

At its core, the problem is that software is complex. For any site, you have all of the JavaScript to make the site run. You have the server to handle requests. You have the cache to handle in flight ...
Telastyn's user avatar
  • 109k
12 votes

Would we need Docker if applications were better behaved?

A major benefit of virtual machines and containers is the way you can isolate an application from any other applications, and reason about it as being a separate entity with clear interfaces that you ...
Arseni Mourzenko's user avatar
11 votes

What is meant by the phrase “Software can replace hardware”?

Another field in which this is true is synthesisers. Early synthesizers were 100% analog hardware that generated waveforms directly then modified them via circuitry (filters, amplifiers, etc.). It ...
Joe McMahon's user avatar
11 votes

Why do modern operating systems *ever* have perceptible input (keyboard/mouse) lag?

In my experience, on most computers I have ever used, this is usually caused by inappropriate swapping to disk. Every other cause (such as operating system locks) is significantly less common. When ...
user253751's user avatar
  • 4,863
10 votes

Trying to understand on what "user.dir" property actually means?

A home directory is associated with a user (for a user MIke, this is often something like /home/mike). A working directory is associated with a running process; in a shell this is often printed as ...
Kilian Foth's user avatar
10 votes
Accepted

Threads: the difference of concurrency between many-to-one model and one-to-one model

Your textbook isn't wrong, but it is using the term 'concurrency' a bit loosely at times. Concurrency means that there is the appearance that multiple tasks are being done at the same time. True ...
Bart van Ingen Schenau's user avatar
10 votes

What is the relationship between a program and processes in the Operating System?

Although there is no single source of truth about these terms, I think we can agree about the fundamental difference between a program and a process: a program is a set of instructions intended to ...
Christophe's user avatar
  • 74.8k
9 votes

What's the point of hidden files?

On Unix they were an accident at least initially https://plus.google.com/+RobPikeTheHuman/posts/R58WgWwN9jp Second, and much worse, the idea of a "hidden" or "dot" file was ...
Yuri Schimke's user avatar
9 votes
Accepted

Relationship between the C standard libraries and Java standard libraries

Which is the relationship between the standard libraries of C language and the standard libraries of other software platforms, e.g. Java, .NET, Python? There is no relationship. Some library ...
Jörg W Mittag's user avatar
9 votes

How is a software able to read a network file faster than it appears to be possible?

A network of 100 Mbps (mega bits per seconds) conveys 12,5 MB per seconds, including payload and protocol overhead. A file of 165 MB needs at least 13,5 seconds (In fact, it would require slightly ...
Christophe's user avatar
  • 74.8k
9 votes

How does an OS limit a program capabilities, if it's working directly with the cpu?

Modern CPUs have privilege modes that are used by the operating system lock out certain instructions.  For example in user mode the instructions that modify (raise) the privilege mode or access system ...
Erik Eidt's user avatar
  • 33.4k
9 votes

Why is it called a "trap" instruction?

While we can all say that the concept of "trap on overflow", or "trap on divide by zero" makes intuitive sense – stop the program from proceeding — what I would do is look to the ...
Erik Eidt's user avatar
  • 33.4k
8 votes

how is stack and heap are assigned to each processes?

What you're fundamentally missing is that P1 and P2 each get their own stack. So the resulting pictures are much cleaner than you are imagining. You have two stacks, one for P1 and one for P2. They ...
Erik Eidt's user avatar
  • 33.4k

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