Question about the communication between hardware, programs, OS, etc. via /r/learnprogramming


Question about the communication between hardware, programs, OS, etc.

This image shows my question much better than I can in words

Basically, the book is explaining that only the OS directly communicates to the hardware, and the hardware ONLY communicates to the OS. And that programs communicate to the OS (and vice versa) which then communicates to the hardware. It says that this way, the hardware manufacturers need to only make sure their hardware can communicate with one thing (an OS) instead of every program, and vice versa.

But then it says nowadays there's an additional 'layer' between most programs and the OS (interpreters). Why don't other programs need this additional 'layer'? What exactly is the specific difference that requires the extra 'layer' or not?

Bonus question: The book I'm using mentions that a code like this >> 3 + 4 contains the operator '/', the operands '3' and '4', and the entire thing is an expression. But does an expression have to contain only operands and operators? Or is everything on a single line always an expression (ex. is >> print ('hello world') also an expression)

Submitted July 11, 2017 at 09:36PM by AbCzar
via reddit http://ift.tt/2vaANXO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s