版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Operating System,Chapter 2: Basic Concept and Prerequisite knowledge GuangShun Shi Department of Computer Science, NanKai University Email: Web Site: 2/osteach,Computer Hardware Review,Processors: Architecture and Modes Memory: Hierarchy of storage systems I/O Devices: Clock, keybo
2、ard, monitor and hard disk Buses: Organization of computer system,Operating System,CITS, NanKai University,2,History of Processors,The beginning of microprocessor 1960s, Intel 4004 1983, Intel 80286 16bits, 1MB address space, 20K instructions, 2.5MIPS & 4.0MIPS 32 bit & 64 bit microprocessor Intel 8
3、0386(1986), Intel 80486(1989), Intel Pentium(1993) 32bits, 4GB address space, CISC & RISC, xGIPS 64bits, 64PB address space,Operating System,CITS, NanKai University,3,Structure of microprocessor,Execute unit Execute the specified instruction Control unit Fetch instruction from memory to registers Ma
4、intain the status of CPU Data transfer between CPU and memory Register and Cache Pipeline,Operating System,CITS, NanKai University,4,Instruction cycle of processor,Fetch instruction from memory Program Counter stores the address of next instruction Processor fetch the instruction via memory access D
5、ecode instruction Store the parameters of the instruction into registers Execute instruction Instruction Register stores current instructions Integer, float and Boolean processors Pipeline Sequence of circuit units to execute an instruction,Operating System,CITS, NanKai University,5,Start,Fetch unit
6、,Decode unit,Execute unit,End,Guide line of processors capability,Frequency CPU clock speed = CPU socket speed * clock multiplier CPU socket speed: the times per second that transfer data from/to CPU, generated by mainboard Front side bus speed: the bandwidth that transfer data between “Northbridge”
7、 chip and CPU Clock multiplier Memory clock speed Instruction set & Coprocessor CISC, RISC, EPIC Float processor, Boolean processor Cache Level1& Level 2 cache: registers & buffers Architecture Micro-architecture, Superscalar & super-pipeline Technics 45 nm: the nearest progress of processor designi
8、ng,Operating System,CITS, NanKai University,6,Class examination,Assumption CPU word length = 64 bit Data transfer speed requirement:800 Mbytes / second Please calculate the front side bus speed Answer 800Mbytes = FSB speed (MHZ) * 64 / 8 FSB speed = 100MHZ,Operating System,CITS, NanKai University,7,
9、Architecture of processor,Operating System,CITS, NanKai University,8,Superscalar and super-pipeline,Operating System,CITS, NanKai University,9,Fetch unit,Decode unit,Execute unit,Fetch unit,Decode unit,Execute unit,Execute unit,Holding Buffer,Superscalar pipeline,Operating System,CITS, NanKai Univer
10、sity,10,Architecture of processor,Operating System,CITS, NanKai University,11,Registers in CPU,Address register Store the address of data or instruction Data register Store the operand/operator of instruction Flag register Store the flags of operation Control and status register Used by OS for manag
11、ing CPU,Operating System,CITS, NanKai University,12,Registers in CPU (privileged),Program counter The register that stores address of next instruction Each process has its private PC value Instruction register Stores the instruction to be executed Each process has its private IC value Program status
12、 word The register that stores flags and conditions of CPU working status PSW is the most important part of CPU context,Operating System,CITS, NanKai University,13,Essential of CPU,Rank of CPU instruction R0: privileged instruction only used by OS R1: important device driver and I/O routine R2: prot
13、ected program, such as IDE R3: user space for common program Working mode of CPU Kernel mode & User mode “Trap” Switch the mode of CPU from “user” mode to “kernel” mode,Operating System,CITS, NanKai University,14,Essential of CPU,Operating System,CITS, NanKai University,15,Proc 1,Instruction registe
14、r,Program counter,Program status word,PU,Proc 2,Instruction register,Program counter,Program status word,PSW of Intel CPU,Operating System,CITS, NanKai University,16,CF: 进位标志位 ZF: 结果为零标志位 SF: 符号标志位 OF: 溢出标志位,标准条件位: TF:陷阱标志位 IF:中断允许(中断屏蔽)标志位 VIF:虚拟中断标志位 VIP:虚拟中断待决标志位 IOPL:IO特权级别,Clock and clock inter
15、rupts,Operating System,CITS, NanKai University,17,每个脉冲使计数器减1,归零则产生时钟中断,用来装入计数器初值,Clock in computer,What dose time means in computer The speed of operation and execution The criterion of resource management The bandwidth of data transfer The record of real time Components of programmable clock Crysta
16、l oscillator: physical component Counter: decremented at each pulse Holding register: record the initial value of counter One-shot clock and square-wave clock One-shot clock: controlled by OS software Square-wave clock: generate periodic signal Clock tick: periodic interrupts,Operating System,CITS,
17、NanKai University,18,Operating System,CITS, NanKai University,19,Essential of Interruption,Operating System,CITS, NanKai University,20,Essential of Interruption,Operating System,CITS, NanKai University,21,Essential of Interruption (unnested),Operating System,CITS, NanKai University,22,Essential of I
18、nterruption (nested),低优先级中断嵌套高优先级中断的处理流程,Operating System,CITS, NanKai University,23,Essential of Interruption,Interrupt, Exception and trap,Exception Errors found by hardware, caused by program Divide by 0, floating-point underflow, access denied The exception will be handled by OS in kernel mode,
19、or informed to the program and handled by user program Interrupt Signal sent from hardware to CPU CPU finds and invokes interrupt handler (kernel mode) In time-sharing OS, the interrupts are handled in clock interrupt function System call Interface provided by OS to allow programs obtaining some sys
20、tem service “Trap” instruction will trap into kernel mode and invoked OS to execute service,Operating System,CITS, NanKai University,24,Operating System,CITS, NanKai University,25,Storage system in computer,Operating System,CITS, NanKai University,26,Strategy of storage system,Guide lines for storag
21、e system Speed: should be not slower than CPU speed Size: should be enough large that can store everything Cost: should not be expensive for most customers Strategy for a reasonable storage system Local optimal principle Hierarchy architecture Various kinds of memory Register, RAM, SRAM, DRAM, SDRAM
22、, DDR ROM, PROM, EPROM, EEPROM, CMOS Flash memory,Operating System,CITS, NanKai University,27,Local optimal principle,A story about Yangguo and Xiaolongnv The answer exists around the question Local optimal principle in address space The address of next instruction should be adjacent to current instruction Local optimal principle in time sequence The instruction used recently should be used again in the near future Principle of Cache design Only stores the instructions that belong to a local region, both in address space and time sequence Small size and slow speed, but higher p
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 莫比乌斯-题库(安全生产)测试卷及答案
- 2026电气照明考试题及答案
- 2026电路原理考试题及答案
- 虫媒传染病培训考试测试卷及答案
- 2026年高处作业特种工冲刺押题实战卷
- 2026年青海省公务员考试题库(面试)在线复习题库
- 2026年大连市高职单招职业技能考前演练试题及答案
- 小学美术教师考试试题及基础知识点整 理(附答案)
- 2026年乡镇(街道)公务员考前冲刺试题解析(海南临高)
- 2026年上半年教师资格证面试试讲真题(初中数学)
- 第三章物质的性质与转化论证重污染天气“汽车限行”的合理性探讨社会性科学议题教学设计-高一上学期化学鲁科版
- 翻转课堂培训课件
- 托里县上海梅兰日兰矿业有限公司新疆托里县科克火热金矿建设项目环境影响报告书简本
- 经营煤炭合伙协议书
- 合同面积调整补充协议
- 煤矿应急培训课件班组长
- RPA财务机器人开发与应用(课程标准)8.10
- 广西-黄邵华-向量的数量积
- 2023市政排水管道气囊封堵施工规程
- 利用PDCA提高预诊分诊率
- 《国规大学美育基础》 项目三 观赏婆娑舞姿-舞蹈之美
评论
0/150
提交评论