04计算机系统概论(第四章)
- 格式:ppt
- 大小:90.00 KB
- 文档页数:14
计算机应用基础第四章计算机应用基础课程的第四章主要介绍计算机的操作系统、文件管理和数据安全等相关内容。
本章将为读者详细阐述这些概念和技术,并提供相应的案例和实践操作,以帮助读者更好地理解和应用这些知识。
一、操作系统的作用与分类操作系统是计算机系统中的核心软件之一,它负责管理和控制计算机硬件资源,为用户和应用程序提供一个可靠、高效的工作环境。
操作系统的分类主要有批处理系统、分时系统、实时系统和网络操作系统等。
1. 批处理系统批处理系统是一种执行预先定义的一系列任务的操作系统。
它可以按照用户事先编写好的脚本或命令文件,自动完成一系列程序的执行。
这种系统适用于不需要用户交互的大规模计算任务,能够提高计算机的工作效率和资源利用率。
2. 分时系统分时系统是一种可以同时为多个用户提供服务的操作系统。
它通过交替地为每个用户分配任务的时间片,使得每个用户都感觉到自己在独占计算机。
这种系统适用于多用户同时访问的场景,如大型服务器、超级计算机等。
3. 实时系统实时系统是一种对时间敏感的操作系统。
它要求任务能够按照预定的时间要求完成,并能够保证任务的可靠性和准确性。
实时系统广泛应用于航空航天、军事控制、医疗设备等领域,对任务的响应速度和可靠性要求非常高。
4. 网络操作系统网络操作系统是一种在计算机网络环境下使用的操作系统。
它支持多台计算机之间的数据传输、资源共享和通信等功能。
网络操作系统能够有效地协调和管理网络中的各个节点,提供高效可靠的网络服务。
二、文件管理与存储结构文件管理是操作系统的重要功能之一,它负责对文件进行创建、读取、写入、删除等操作,并管理文件的组织结构和存储空间的分配。
文件存储结构主要包括顺序文件、索引文件和散列文件等。
1. 顺序文件顺序文件是将数据按照顺序存放在存储介质上的文件。
它的读写操作是按照存放顺序依次进行的,适用于顺序访问文件中的数据。
顺序文件的特点是存取速度较快,但插入和删除操作较为麻烦。
第四章复习题一、单项选择题1. 在可变分区存储管理中,若采用最先适应分配算法宜将空闲区按(B)次序登记在空闲区表中。
A. 地址递减B. 地址递增C. 长度递减D. 长度递增2. 采用固定分区存储管理的计算机系统中(D)的做法是错误的。
A. 为作业分配的分区不能小于作业长度B. 可同时在多个分区中各装一个作业C. 不允许多个作业同时存放在一个分区中D. 一个分区中可同时装入多个作业3. 不适宜采用虚拟存储管理技术的存储管理方式是(D)。
A. 页式B. 段式C. 段页式D. 可变分区4. 在多道程序设计系统中,采用了页式存储管理。
如果允许并行工作的道数为n(n>1),则系统中同时建立的页表数一定为(C)。
A. 1B. nC. <=nD. n+15. 在单用户连续存储管理中,可供用户使用的主存区域起始地址存放在(B)。
A. 基址寄存器B. 界限寄存器C. 限长寄存器D. 相联寄存器6. 重定位的含义是(C)。
A. 把主存中的一个程序从一个区域重新定位到另一个区域B. 把绝对地址转换成逻辑地址C. 把逻辑地址换砖成绝对地址D. 把辅助存储器中的程序定位到主存的某个区域7. 在分页式存储管理中,逻辑地址由页号和页内地址两部分组成。
因而,分页的工作是在(C)时进行的。
A. 用户编制程序B. 地址转换C. 操作系统装入作业D. 系统初始化8. 采用固定分区存储管理的计算机系统中(D)的做法是错误的。
A. 为作业分配的分区不能小于作业长度B. 可同时在多个分区中各装一个作业C. 不允许多个作业同时存放在一个分区中D. 一个分区中可同时装入多个作业9. 在分页式虚拟存储管理中,若发现所要访问的页面不在主存储器中,则硬件要产生一个(C)中断。
A. I/OB. 缺段C. 缺页D. 访管10. 主存储器的每个存储单元都有一个地址与其对应,假定这些地址用n个二进制位来区分,则主存储器的容量为(D)。
A. 2n个字B. 2n-1个字C. 2n-1个字节D. 2n个字节11. LRU页面调度算法总是选择(C)页面调出。
计算机组成原理第一章计算机系统概论(清楚一个概念)计算机的性能指标:吞吐量:表征一台计算机在某个时间间隔内能够处理的信息量。
响应时间:表征从输入有效到系统产生响应之间的时间度量,用时间单位来度量。
利用率:在给定的时间间隔内系统被实际使用的时间所占的比率,用百分比表示。
处理机字长:指处理机运算器中一次能够完成二进制数运算的位数。
总线宽度:一般指CPU中运算器与存储器之间进行互连的内部总线二进制位数。
存储器容量:存储器中所有存储单元的总数目,通常KB,MB,GB,TB来表示。
存储器带宽:单位时间内存储器读出的二进制数信息量,一般用字节数/秒表示。
主频/时钟周期:CPU的工作节拍受主时钟控制,主时钟不断产生固定频率的时钟,主时钟的频率叫CPU的主频。
度量单位MHZ(兆赫兹)、GHZ(吉赫兹)主频的倒数称为CPU时钟周期(T),T=1/f,度量单位us,nsCPU执行时间:表示CPU执行一般程序所占的CPU时间,公式:CPU执行时间=CPU时钟周期数xCPU时钟周期CPI:表示每条指令周期数,即执行一条指令所需的平均时钟周期数。
公式:CPI=执行某段程序所需的CPU时钟周期数/程序包含的指令条数MIPS:表示平均每秒执行多少百万条定点指令数,公式:MIPS=指令数/(程序执行时间x10^6)第二章运算方法和运算器原码定义:(1)整数(范围(-(2^n-1)~ 2^n-1)(2)小数(范围-(2^-n-1 ~ 1-2^-n)反码定义:(3)整数(范围(-(2^n-1)~ 2^n-1)(4)小数(范围-(2^-n-1 ~ 1-2^-n)补码定义:(5)整数(范围(-(2^n )~ 2^n-1)(6)小数(范围(-1 ~ 1-2^-n)移码表示法(用于大小比较与对阶操作)IEEE754标准格式:符号位(1位)+ 阶码(移码)+ 尾数正溢:两个正数相加,结果大于机器字长所能表示的最大正数负溢:两个负数相加,结果小于机器字长所能表示的最小负数检测方法:1、双符号位法2、单符号位法不带符号阵列乘法器:同行间并行不同行间串行浮点加减运算操作过程大体分四步:1、0操作数检查2、比较阶码大小完成对阶3、尾数进行加减运算4、结果规格化所进行舍入处理流水线原理:时间并行性线性流水线的加速比:C k=T L/T K =nk/k+(n-1)第三章存储系统程序局部性原理:在某一段时间内频繁访问某一局部的存储器地址空间,而对此范围以外的地址空间则很少访问的现象。
第一章计算机系统概论例1,冯·诺依曼机工作的基本方式的特点是什么?解:冯·诺依曼机工作的基本方式的特点是:按地址访问并顺序执行指令。
冯·诺依曼机工作原理为:例2,Cache是一种A. ______存储器,是为了解决CPU和主存之间B. ______不匹配而采用的一项重要硬件技术。
现发展为多级cache体系,C. ______分设体系。
解:A. 高速缓冲B. 速度C. 指令cache与数据cache例3,完整的计算机应包括那些部分?解:完整的计算机应包括配套的硬件设备和软件系统。
例4,计算机系统的层次结构是怎样的?解:计算机系统的层次结构如图:第二章 运算方法和运算器例 1.设机器字长32位,定点表示,尾数31位,数符1位,问:(1)定点原码整数表示时,最大正数是多少?最大负数是多少? (2)定点原码小数表示时,最大正数是多少?最大负数是多少? 解:(1最大正数:数值 = (231 – 1)10最大负数: 数值 = -(231 – 1)10 (2)定点原码小数表示: 最大正数值 = (1 – 231 )10最大负数值 = -(1–231 )10例2.已知 x = - 0.01111 ,y = +0.11001, 求 [ x ]补 ,[ -x ]补 ,[ y ]补 ,[ -y ]补,x + y = ? ,x – y = ?解:[ x ]原 = 1.01111 [ x ]补 = 1.10001 所以 :[ -x ]补 = 0.01111[ y ]原 = 0.11001 [ y ]补 = 0.11001 所以 :[ -y ]补 = 1.00111 [ x ]补 11.10001 [ x ]补 11.10001 + [ y ]补 00.11001 + [ -y ]补 11.00111 [ x + y ]补 00.01010 [ x - y ]补 10.11000所以: x + y = +0.01010 因为符号位相异,结果发生溢出例3.设有两个浮点数 N 1 = 2j1 × S 1 , N 2 = 2j2 × S 2 ,其中阶码2位,阶符1位,尾数四位,数符一位。
计算机系统概论第四章测验及答案本页仅作为文档封面,使用时可以删除This document is for reference only-rar21year.March第四章测验一、判断1. 网络中的计算机可能利用微波传输数据,它比利用光缆传输数据的效率高。
( )2. 异步转移模式ATM使多种媒体的信息数据可以同时在ATM信道中传输。
( )3. Internet提供了电子购物服务,因此网络能传递物品。
( )4. B-ISDN是一种通信网络,数据在其上是模拟信号传输。
( )5. ADSL是一种网络联结方式,数据在电话线上是模拟信号传输。
( )6. Internet网由主干网、地区网和校园网(或部门网)三级组成。
( )7. Inertnet网中计算机的IP地址就是它的主机名。
( )8. 计算机网络是在通信协议控制下实现的计算机互联。
( )9. 建立计算机网络的最主要目的是实现资源共享。
( )10. E-mail帐号能在任意的地点,任意的机器上使用(只要它接入Internet)。
( )11. 工作站本身所具有的硬盘、光盘、程序、数据、打印机等都是该用户的本地资源,网络上其他工作站和服务器的资源称为网络资源。
( )12. 蓝牙()是一种近距离无线通信的技术标准,通过增加发射功率可达到100m,适合于办公室或家庭环境的无线网络。
( )13. 网络中一台微机既可以作为服务器,也可以作为客户机,取决于它是否同时提供共享资源,又使用其它计算机的资源。
( )14. 网络信息安全主要是指信息在处理和传输中的泄密问题。
( )15. 在网络信息安全的措施中,身份认证是访问控制的基础。
( )16. 在密码学中,所有的公共密钥对所有用户都是公开的。
( )17. 因特网防火墙的作用主要是防止病毒侵害。
( )18. 包过滤通常安装在路由器上,而且大多数商用路由器都提供了包过滤的功能。
( )19. 在一台已感染病毒的计算机上读取一张CD-ROM光盘中的数据,该光盘没有可能被感染病毒。
F.4Chapter4Solutions4.1Components of the V on Neumann Model:(a)Memory:Storage of information(data/program)(b)Processing Unit:Computation/Processing of Information(c)Input:Means of getting information into the computer.e.g.keyboard,mouse(d)Output:Means of getting information out of the computer.e.g.printer,monitor(e)Control Unit:Makes sure that all the other parts perform their tasks correctly and at thecorrect time.4.2The communication between memory and processing unit consists of two registers:MemoryAddress Register(MAR)and Memory Data Register(MDR).•To read,the address of the location is put in MAR and the memory is enabled for a read.The value is put in MDR by the memory.•To write,the address of the location is put MAR,the data is put in MDR and the WriteEnable signal is asserted.The value in MDR is written to the location specified.4.3The program counter does not maintain a count of any sort.The value stored in the programcounter is the address of the next instruction to be processed.Hence the name’Instruction Pointer’is more appropriate for it.4.4The size of the quantities normally processed by the ALU is referred to as the word length ofthe computer.The word length does not affect what a computer can compute.A computer with a smaller word length can do the same computation as one with a larger word length;but it will take more time.For example,to add two64bit numbers,word length=16takes4adds.word length=32takes2adds.word length=64takes1add.4.5(a)Location3contains0000000000000000Location6contains1111111011010011(b)i.Two’s Complement-Location0:0001111001000011=7747Location1:1111000000100101=-4059ii.ASCII-Location4:0000000001100101=101=’e’iii.Floating Point-Locations6and7:00000110110110011111111011010011Number represented is1.10110011111111011010011x2−11412iv.Unsigned-Location0:0001111001000011=7747Location1:1111000000100101=61477(c)Instruction-Location0:0001111001000011=Add R7R1R3(d)Memory Address-Location5:0000000000000110Refers to location6.Value storedin location6is11111110110100114.6The two components of and instruction are:Opcode:Identifies what the instruction does.Operands:Specifies the values on which the instruction operates.4.760opcodes=6bits32registers=5bitsSo number of bits required for IMM=32-6-5-5=16Since IMM is a2’s complement value,its range is-215...(215-1)=-32768..32767.4.8a)8-bitsb)7-bitsc)Maximum number of unused bits=3-bits4.9The second important operation performed during the FETCH phase is the loading of theaddress of the next instruction into the program counter.4.10Refer to the following table:Fetch StoreDecode Data Result0001,0110,11001100IR0001,0110,1100MDR01104.11The phases of the instruction cycle are:(a)Fetch:Get instruction from memory.Load address of next instruction in the ProgramCounter.(b)Decode:Find out what the instruction does.(c)Evaluate Address:Calculate address of the memory location that is needed to processthe instruction.(d)Fetch Operands:Get the source operands(either from memory or registerfile).(e)Execute:Perform the execution of the instruction.(f)Store Result:Store the result of the execution to the specified destination.F.4.CHAPTER4SOLUTIONS34.12Considering the LC3instruction formatsADDFetch:Get instruction from memory.Load next address into PC.Decode:It is here that it is determined that the instruction is an add instruction.Evaluate Address:No memory operation so NOT REQUIRED.Fetch Operands:Get operands from registerfile.Execute:Perform the add operation.Store Result:Store result in the registerfile.LDRFetch:Get instruction from memory.Load next address into PC.Decode:It is here that it is determined that the instruction is a Load Base+offset instruction.Evaluate Address:Calculate the memory address by adding the Base register with the sign extended offset.Fetch Operands:Get value from the memory.Execute:No operation needed so NOT RE-QUIRED.Store Result:Store the value loaded into the registerfile.JMPFetch:Get instruction from memory.Load next address into PC.Decode:It is here that it is determined that the instruction is a Jump instruction.Evaluate Address:No memory operation so NOT REQUIRED.Fetch Operands:Get the base register from registerfile.Execute:Store the value in PC.Store Result:NOT REQUIRED.**Since we are considering a non pipelined implementation,the instruction phases where no operation is performed may not be present in its execution cycle.4.13F D EA FO E SRx86:ADD[eax]edx100111001100=303 LC3:ADD R6,R2,R61001-111=104 4.14JMP:1100000011000000Fetch:Get instruction from memory.Load next address into PC.Decode:It is here that it is determined that the instruction is JMP.Evaluate Address:No memory operation,so NOT required.Fetch Operands:Get the base register from the registerfile.Execute:Load PC with the base register value,x369C.4.15Once the RUN latch is cleared,the clock stops,so no instructions can be processed.Thus,noinstruction can be used to set the RUN latch.In order to re-initiate the instruction cycle,an external input must be applied.This can be in the form of an interrupt signal or a front panel switch,for example.4.16(a)1/(2∗10−9)=5∗108machine cycles per second.(b)5∗108/8=6.25∗107instructions per second.(c)It should be noted that once thefirst instruction reaches the last phase of the instruction,an instruction will be completed every cycle.So,except for this initial delay(known aslatency),one instruction will be completed each machine cycle(assuming that there are4no breaks in the sequentialflow).If we ignore the latency,the number of instructionsthat will be executed each second is same as the number of machine cycles in a second=5*108.。