Dobin 0x10_IntelArchitecture.pdf

Dobin 0x10_IntelArchitecture.pdf

Dobin 0x10_IntelArchitecture.pdf


Set of flashcards Details

Flashcards 11
Language English
Category Computer Science
Level University
Created / Updated 21.06.2019 / 27.06.2020
Weblink
https://card2brain.ch/box/20190621_dobin_0x10intelarchitecture_pdf
Embed
<iframe src="https://card2brain.ch/box/20190621_dobin_0x10intelarchitecture_pdf/embed" width="780" height="150" scrolling="no" frameborder="0"></iframe>

What are registers?

Registers are the "variables" on the CPU

Immnediate acces for the CPU

Cannot write Memory -> Memory

  • Aways: Memory -> Register -> Memory

What can be held in registers?

Register can hold:

  • Data (numbers)
  • Addresses (also numbers, but with a different meaning)

What can registers be used for?

Registers can be used to:

  • Perform computations
  • Read / Write memory
  • Execute instructions

Name some registers in a 32 bit system and their function.

  • EAX -> Adding stuff
  • EBX -> Referencing stuff
  • ECX -> Counting stuff
  • EDX -> Data stuff
  • ESI -> Points to a source
  • EDI -> Points to a destination

Name the 3 registars that contain instruction pointer, stack pointer and base Pointer. (32 bit)

  • EIP -> Instruction Pointer -> Next instruction to be executed
  • ESP -> Stack Pointer -> Top of Stack
  • EBP -> Base Pointer -> Current Stack Frame (Bottom)

How does a CPU interpret instructions?

A CPU looks at bytes, and then decides what to execute based on them.

What is the difference between big and little endian?

Big endian: The most significant byte of the data is placed at the byte with the lowest address.

Little endian: The least significant byte of the data is placed at the byte with the lowest address.

What are the 2 most important rings in the ring modle and what are their characteristics?

Ring 0: Kernel (Kernelspace)

  • Can be intercated with by using "syscalls"

Ring 3: Userspace

  • Where all programs run

How to transit from userspace to kernelspace?

  • System Calls (syscall)

Why can 32 bit processes only utilize 4GB of memory?

  • 32 bit register size in Intel CPU
  • Registers are used to address memory
  • 2^32 = 4 billion = 4 gigabyte

There is only one CPU, how can:

  • Mutliple programs run at the same time?
  • The OS and the programs run at the same time?

Solution: Interrupts

  • Timer interrupts
  • In terrupts are handled by the kernel
    • Time / clock
    • Network interface
    • USB devices
  • Kernel schedules the different processes

What are the pros and cons of 64 bit systems?

64 bit pros:

  • Can address more than 4 gb of memory per computer
    • up to 4 Petabytes of ram
  • 64 bit calculations are maybe a bit faster

64 bit cons:

  • Programs use more space
    • Because pointers and data-types (integer) are twice as big
    • On disk, memory and most importantly: cache