1 Carnegie Mellon A Tour of Computer Systems Instructors: Sejin Park
2 Carnegie Mellon Overview 1.1 Information is Bits + Context 1.2 Program Translation 1.3 Compilation Systems 1.4 Processors - Hardware Organization, Running a Program 1.5 Caches 1.6 Storage Hierarchy 1.7 Operating Systems - Processes, Threads, Virtual memory, Files 1.8 Communication Networks 1.9 Concurrency and Parallelism, Computer System Abstractions
3 hello.c #include int main() { printf(“hello, world\n); return 0; }
4 Carnegie Mellon 1.1 Information is Bits + Context Bit Byte ASCII : represent text characters File : sequence of bytes Text file Binary file
5 Carnegie Mellon 1.2 Programs Are Translated
6 Carnegie Mellon 1.3 Compiler Structure
7 Carnegie Mellon 1.3 Compiler Phases
8 Carnegie Mellon Hardware Organization
9 Carnegie Mellon Running a Program
10 Carnegie Mellon Running a Program
11 Carnegie Mellon Running a Program
12 Carnegie Mellon 1.5 Caches
13 Carnegie Mellon 1.6 Storage Hierarchy
14 Carnegie Mellon 1.7 Operating Systems
15 Carnegie Mellon Process Process : Program in Execution
16 Carnegie Mellon Process Execution
17 Carnegie Mellon Process State Transition
18 Carnegie Mellon Process Control Block struct task_struct { pid_t pid; /* process identifier */ long state; /* state of the process */ unsigned int time_slice /* scheduling information */ struct task_struct *parent; /* this process’s parent */ struct list_head children; /* this process’s children */ struct files_struct *files; /* list of open files */ struct mm_struct *mm; /* address space of this process */... } PCB representation in Linux / C
19 Carnegie Mellon Threads
20 Carnegie Mellon Threads
21 Carnegie Mellon Virtual Memory
22 Carnegie Mellon Virtual Memory Paging Physical Memory Virtual Memory
23 Carnegie Mellon Dynamic Address Translation
24 Carnegie Mellon Files File structure Logical storage unit Collection of related information File System resides on secondary storage (disks) Disk provides in-place rewrite and random access I/O transfers performed in blocks of sectors (usually 512 bytes) File Control Block – storage structure consisting of information about a file Device driver controls the physical device File system organized into layers
25 Carnegie Mellon File Control Block – File Attributes
26 Carnegie Mellon UNIX inode
27 Carnegie Mellon 1.8 Communication Networks
28 Carnegie Mellon Client-Server Models
Amdahl’s Law T : total time a : a fraction of time k : improve its performance by factor of k S : speedup
30 Carnegie Mellon Concurrency and Parallelism Thread-level concurrency Instruction-level parallelism Single-instruction, Multiple-Data (SIMD) parallelism
31 Carnegie Mellon Concurrency and Parallelism
32 Carnegie Mellon Abstractions in Computer Systems