随笔分类 - 操作系统导论
操作系统导论
摘要:Free-Space Management 使用segmentation实现虚拟内存时,我们可能会遇到上图所示情况,总共未使用的空间是20字节,但是被分成了2个10字节的内存段,如果有个15字节的程序请求CPU给它分配内存,CPU只能拒绝这个请求。这一章就是为了解决这个问题。 1. Low-leve
阅读全文
摘要:Segmentation 1. Segmentation: Generalized Base/Bounds 我们可以看一下(Figure 16.1),尽管每个CPU都有一对硬件寄存器(base register和bounds register),但是还是不可避免的会产生内存浪费(阴影部分表示未被使用
阅读全文
摘要:Mechanism: Address Translation In developing the virtualization of the CPU, we focused on a general mechanism known as limited direct execution (or LD
阅读全文
摘要:Interlude: Memory API 1. Types of Memory 对于一个即将运行的C程序,有两种分配内存的方式。 第一种为stack memory,也叫做automatic memory。 当你调用 func(), 编译器做剩下的工作,确保在stack上给变量x分配内存地址。 vo
阅读全文
摘要:The Abstraction: Address Spaces 1. Early Systems 在早期系统时代,操作系统和程序都存储在实际的物理地址中。 2. Multiprogramming and Time Sharing 为了提高efficiency,人们尝试用一台机器处理多个程序,进而引入
阅读全文
摘要:Homework (Simulation) In this homework, we’ll use multi.py to simulate a multi-processor CPU scheduler, and learn about some of its details. Read the
阅读全文
摘要:Lottery Scheduling 0. Basic Concept A : 75 tickets (0~74) B:25 tickets (75~99) A1 + A2:1000 tickets B1:10 tickets 注意:要区分一个进程和一个线程的tickets。 如下所示,A和B分别有
阅读全文
摘要:0. 文件地址 Homework 1. MLFQ: Basic Rules 2. Attempt #1: How To Change Priority 2.1 Example 1: A Single Long-Running Job 2.2 Example 2: Along Came A Short
阅读全文
摘要:0. 文件地址 Homework 1. Workload Assumptions 2. Scheduling Metrics 3. First In, First Out (FIFO) 4. Shortest Job First (SJF) 5. Shortest Time-to-Completio
阅读全文
摘要:0. installing and using of Cygmin Since Cygwin was installed at the request of the teacher when taking the basic computer class, I will not introduce
阅读全文
摘要:Homework (Simulation) This program, process-run.py, allows you to see how process states change as programs run and either use the CPU (e.g., perform
阅读全文