Today I Learned - Jack Mitchell Fordyce
← Home

Today I Learned

Translation Lookaside Buffer

The translation lookaside buffer is a small cache that sits on the CPU alongside the memory management unit and caches page table entries.

This saves a trip to memory that the MMU has to make to get a page table entry from the page table.

TLB just returns the page table entry and the MMU can directly look up the physical memory address. If it isn't there, then the MMU has to make the trip to memory for the page table, put the PTE into the TLB, and then look up the physical address.

Saving Commands

CTRL + u will delete + save everything from the cursor to the beginning of the line

CTRL + k will do the same thing but from cursor to the end of the line

Use CTRL + y to then paste + execute it


Usage:

Tyep command.

Remember you need to do something else. CTRL + u

Do something else.

CTRL + y

Deleting Words

'CTRL + W' will delete the word just before the cursor instead of having to repeatedly backspace.

Jumping Words

use option + b to jump back a word on the cmdline or option + f to jump a word

like how b and w work in vim

Instruction Set Architectures

Instruction Set Architectures (ISAs) like x86-64 are what determine the actual byte sequences a compiler outputs for the specified ISA.

Those byte sequences then map literally to instructions on the CPU.

source code -> compiler targeting an ISA -> machine-code bytes -> CPU decodes bytes and executes instructions

They are like they key that defines the values a compiler can output to map to instructions for a CPU.