Title: 544
Tags: lec1

Q: What do systems primarily manage?
A: Resources: compute, memory, storage, and network

Q: what does a compiler do?
A: translate high level code (something a programmer would write) to low level code, such as machine code that a CPU can directly execute

Q: what does an interpreter do?
A: loop over high-level code and execute corresponding operations on the CPU, as the program executes

Q: What is a language (other than Java) that compiles to bytecode for the JVM?
A: Scala is the best answer (important for us, because we'll learn Spark, which was written in Scala)
Python could technically be an answer too due to the Jython project, but this probably isn't used much in practice.

Q: Consider high level code (like Python), machine code, and byte code -- what can run directly on a CPU?
A: machine code

Q: What does JVM stand for?
A: Java Virtual Machine

Q: What is the common extension for files containing Java bytecode?
A: .class

Q: What is the common extension for files containing Python bytecode?
A: .pyc

Q: What does this Python code do?
import dis
dis.dis("????")
A: Shows you the Python bytecode corresponding to the Python code in the string.

Q: If you use more machines, what kind of scaling is it?
A: scaling out

Q: If you use a more powerful machine, what kind of scaling is it?
A: scale up

Q: What does CPU stand for?
A: Central Processing Unit

Q: What does GPU stand for?
A: Graphics Processing Unit

Q: What does RAM stand for?
A: Random Access Memory

Q: What does HDD stand for?
A: Hard Disk Drive

Q: What does SSD stand for?
A: Solid State Disk

Q: What does NIC stand for?
A: Network interface card/controller

Q: What does it mean for a device to provide random access?
A: You can jump around and read from different locations efficiently.

Q: What values can a bit hold?
A: 0 or 1

Q: How many different values can a byte hold?
A: A byte has 8 bits, so there are 2^8 different possible combinations of bits.  So 256 different values.

Q: How much is 1 KB?
A: 1024 (or 1000) bytes

Q: How much is 1 MB?
A: 1024 KB (or 1000 KB)

Q: How much is 1 GB?
A: 1024 (or 1000) MB

Q: How much is 1 TB?
A: 1024 (or 1000) GB

Q: What does it mean for a device to be "byte addressible"?
A: Each byte has it's own address, and the CPU can use that address to get the value.
Extracting a single bit from a byte actually involves more steps than using the whole byte.

Q: What is generally faster, storage or memory?
A: Memory

Q: What does volatile mean, and what is an example of hardware that is volatile?
A: Volatile means you lose the contents upon reboot.  Memory (e.g., RAM) is volatile, storage (e.g., SSD) is non-volatile.

Q: What do we mean with we call HDDs and SSDs "block devices"?
A: Data is read/written in blocks of many bytes (for example, 0.5 KB).
Accessing 1 byte in the block takes the same time as accessing the whole block.

Q: A device can store 1000 GB, can transfer 100 MB/s, and serve one request in 10 ms.  What kinds of metrics are these?
A: 1000 GB: capacity
100 MB/s: throughput
10 ms: latency

Q: If throughput can be expressed as X MB/s or Y Mbps, what is the relationship between X and Y?
A: Y = X * 8
(because the "b" in Mbps stands for bits, and there are 8 bits in a byte)

Q: often a bunch of server machines are stacked on top of each other in a metal box called a ______ and connected with a network switch
A: rack

Q: a large facility containing many racks of computers is called a ______
A: data center

Q: a cluster is a ______
A: bunch of computers working together