In the beginning of the book "Structured Computer Organization", Tanenbaum says that a typical computer have 6 architecture levels: Digital, Microarchitecture, Instruction Set, Operating System, Assembly and the Top level (not sure if this is named correctly).

Each level is suppose to add a new layer of abstraction, basically to turn programming easier and make programmers more productive.

I had a hard time understanding each level, but then in the chapter about the Assembly Level, it is said that each instruction in Assembly Language corresponds to exactly one instruction in machine code.

For what I understand, "machine code" is what the hardware can execute directly, so this would be the instructions in the Microarchitecture level. The problem is: if each Assembly instruction have a correspondent microinstruction, what is the point of the Instruction Set and Operating System levels?

I thought, for example, that there was some Assembly instructions that would be translated into more than one instruction in the OS level, but this would contradict the "one-to-one correspondence".

Can someone help me understand this?

Applications run by the operating system can't access hardware directly. Instead, they have to access it through system calls, and there is some sort of protection that prevents them from doing things like, say, writing random bytes to the hard disk or sending arbitrary signals to the ethernet device. This protection is put in place by the operating system.

For that reason, writing applications (in assembly or another language) is a level of abstraction above writing operating systems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.