Computer Architecture — ISA and Microarchitecture

Yuta Fujii
3 min readMay 18, 2020

*This is a memo I took in Computer Architecture course at cousera.

Difference between Architecture(ISA) and Microarchitecture

In the lecture, “architecture” is explained as abstraction layer provided to software and it is Instruction Set Architecture(ISA).

It’s not something like how many chips to embed or how you make circuit.

It is something how theoretically computer works when it’s designed in a way.

When you think how many processors to build or how to organize, that is “microarchitecture”.

It is rather practical issues and you can’t organize without dealing with trade-offs between speed, energy or cost. In other words, how you design depends on what you prioritize to your computer.

Because both ISA and microarchitecture are a bit too conceptual, it might be better to provide some concrete questions each of which is responsible for.

ISA level matters

  • How do you access memory? (like this four patterns)

Microarchitecture level matters

  • What if the processor might have to access the memory where ISA is designed as register, register, register operation?

Practical applications

1. Java Virtual Machine (JVM)

Although stack architecture in machine model is used early in the history, that is still popular and prove itself practically useful. I mean this by the following fact.

Java Virtual Machine is built upon stack architecture.

According to wikipedia, it runs 32bit and has 65535 operands stack and same amount of local variables.

Each JVM thread also has its own call stack (called a “Java Virtual Machine stack” for clarity), which stores frames. A new frame is created each time a method is called, and the frame is destroyed when that method exits.

Each frame provides an “operand stack” and an array of “local variables”. The operand stack is used for operands to computations and for receiving the return value of a called method, while local variables serve the same purpose as registers and are also used to pass method arguments. Thus, the JVM is both a stack machine and a register machine. (wikipedia)

Cool, isn’t it? 🚀

2. Pulling Docker image

When you pull docker image, you’ll see that there is a pulldown list of ISAs.

So what ISA does my computer adopt? 🤔

Well, you can check processor type by

# ---Mac---$ system_profiler SPHardwareDataType
or
$ sysctl -a | grep machdep.cpu
# ---Linux---$ less /proc/cpuinfo
or
$ lshw -class processor

I checked the processor using in my PC and found it’s

Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz

And I look it in google and understand that:

Core i7–7700HQ is a 64-bit quad-core high-end performance x86 mobile microprocessor introduced by Intel in early 2017.
resource) https://en.wikichip.org/wiki/intel/core_i7/i7-7700hq

Thus, in DockerHub, I have to select “linux x86–64(latest)” from the dropdown list. 👍

Studies like computer science or computer architecture seem to be too conceptual thus far from what we use or see in our actual life.

As such, I want to focus on where those theoretical things lie.

Hope this post would interest you a little and make you knock the door to computer science/computer architecture.

References

--

--

Yuta Fujii

Web developer, Data analyst, Product Manager. Ex investment banker( structured finance ). Learn or Die.