HW6 Solutions 1.1: Answers can vary. Here are some items to consider: A high-performance computer used for large number crunching tasks: throughput (in order to get maximum performance), turnaround time (in order to ensure tasks are completed at a useful time) A multimedia computer (video games, movies...): response time (to ensure smooth playback) A smartphone: fairness/priority (UI tasks should respond quickly), low scheduling overhead (to conserve battery) A general-purpose computer on the CIMS network: fairness (each machine has many users) 1.2: Answers can vary. Here are some items to consider: A high-performance computer used for large number crunching tasks: Priority (allow important jobs to run), FIFO (lowest overhead, if the machine is only being used by one job at a time) A multimedia computer (video games, movies...): Priority (give multimedia programs higher priority) A smartphone: Priority (UI tasks should respond quickly) A general-purpose computer on the CIMS network: RR (allow all users to fairly use the machine), Stride/Lottery (ticket count can be controlled per-user) 1.3: Answers can vary. Here are some items to consider: A high-performance computer used for large number crunching tasks: RR with a small quantum (wasteful), STCF (starvation for large jobs) A multimedia computer (video games, movies...): MLFQ (wasted computation), STCF (penalizes long-running multimedia programs) A smartphone: FIFO (does not pair well with UI tasks) A general-purpose computer on the CIMS network: FIFO (one user submits a large job, the entire network is unusable for everyone else) 2. virtual memory: warmup 8 2^8 256 - 1 = 255 16 2^16 = 64K 64K - 1 32 2^32 = 4G 4G - 1 48 2^48 = 256T 256T - 1 64 2^64 = 16E 16E - 1 (E: Exabyte) 3. virtual memory: warmup II Since virtual addresses are 11 bits, and since each address is the address of a byte, the virtual address space is 2^{11} bytes, or 2KB, or 2048 bytes. 4. virtual memory: address translation 1KB 22 14 10 2KB 21 13 11 4KB 20 12 12 8KB 19 11 13 5. virtual memory: address translation II 5.1. VA = [ 20 bits | 40 bits ], so VPN is 20 bits. 5.2 PA = [ 12 bits | 40 bits ], so PPN is 12 bits 5.3 offset is 40 bits (because the page size is 2^{40} bytes) 6. virtual memory: paging 16 4K 16 16 8K 8 32 4K 2^20=1M 32 8K 2^19=512K 48 4K 2^36=64G