Can Somebody put Abstraction of Computer System in a simple way?

160 viewsEngineeringOther

Would appreciate it if examples are provided.

In: Engineering

3 Answers

Anonymous 0 Comments

Back in the old days of DOS, video games often included a setup program and it would ask you what kind of sound card you had, what kind of joystick you had, what kind of graphics card you had, etc. And if your computer’s hardware wasn’t on the lists or wasn’t compatible, you get no sound, no joystick, or the graphics sucked. This is because the game itself had to include all the needed code to run every variant of hardware it supported, and automatic detection was unreliable or even dangerous.

Windows largely solved that problem by taking up the job of dealing with hardware for itself. The makers of the hardware would provide Windows with software that controlled the sound card to the standard that Windows specifies. Then the games would ask Windows to use the sound card, and it would just work. It just tells windows “I want 44.1 kHz audio, 16 bit, stereo” and give it the actual sound clips to play. The game doesn’t know what kind of sound card it is beyond a text description Windows provides, and even that’s just intended so the user can pick which speakers the game audio comes out of.

Windows abstracted the sound card. The game doesn’t need to know how to interact with the actual circuit board and chips of the sound card, it just tells Windows what it wants and it’s taken care of on its behalf. Rather than having to write code for 5 different sound cards and figure out which one is right, you write code once for “Windows sound system” and no matter what audio system you have, it runs.

That’s the concept. It can be applied in tons of different ways. DirectX, and OpenGL abstract the video card for doing 3D graphics (among other things). If you use Linux or other similar systems, most command-line programs interact with files, but can also be set up to connect 2 programs directly together, one’s output is the other’s input. Or you can open a connection across the network and the two programs can be on different computers entirely. From the program’s standpoint, it’s just “send data” and “receive data” even if it doesn’t know where it’s coming from. “Send data” and “receive data” are abstract operations, doing what they sound like, but the details of how they do it don’t matter to the program as long as they work.

Anonymous 0 Comments

Ones and zeroes are abstractions. They’re actually voltages, magnetic domains, or flashes of light. But you don’t need to know their true nature in order to work with them.

Likewise, hexadecimal is ones and zeroes abstracted into a more human-friendly format. Assembly language abstracts the hex digits of computer instructions into an even more human-friendly format. And high level languages abstract away the nitty-gritty of assembly.

The great thing about abstraction is that you can stack layers upon layers without limit, and the top layers can be used by someone with no knowledge about what goes not at the bottom. Likewise, designers of the bottom layers don’t need to know what’s intended to go on top – a CPU can run any software that’s made to run on it, even if what goes into the software wasn’t even invented when the CPU was made.

Anonymous 0 Comments

Steering wheel is an abstraction for steering your car. It takes care of a lot of other processes and interacts with a lot of other parts. You just interact with the steering wheel.