操作系统(双语)复习资料

合集下载

(完整版)操作系统课程英文词汇

(完整版)操作系统课程英文词汇

操作系统课程英文词汇_1.操作系统Operating System2.计算机Computer3.内核映像Core Image4.超级用户Super-user5.进程Process6.线程Threads7.输入/输出I/O (Input/Output)8.多处理器操作系统Multiprocessor OperatingSystems9.个人计算机操作系统Personal ComputerOperating Systems10.实时操作系统Real-Time Operating Systems11.处理机Processor12.内存Memory13.进程间通信Interprocess Communication14.输入/输出设备I/O Devices15.总线Buses16.死锁Deadlock17.内存管理Memory Management18.输入/输出Input/Output19.文件Files20.文件系统File System21.文件扩展名File Extension22.顺序存取Sequential Access23.随机存取文件Random Access File24.文件属性Attribute25.绝对路径Absolute Path26.相对路径Relative Path27.安全Security28.系统调用System Calls29.操作系统结构Operating System Structure30.层次系统Layered Systems31.虚拟机Virtual Machines32.客户/服务器模式Client/Server Mode33.线程Threads34.调度激活Scheduler Activations35.信号量Semaphores36.二进制信号量Binary Semaphore37.互斥Mutexes38.互斥Mutual Exclusion39.优先级Priority40.监控程序Monitors41.管程Monitor 42.管道Pipe43.临界区Critical Section44.忙等待Busy Waiting45.原子操作Atomic Action46.同步Synchronization47.调度算法Scheduling Algorithm48.剥夺调度Preemptive Scheduling49.非剥夺调度Nonpreemptive Scheduling50.硬实时Hard Real Time51.软实时Soft Real Time52.调度机制Scheduling Mechanism53.调度策略Scheduling Policy54.任务Task55.设备驱动程序Device Driver56.内存管理器Memory Manager57.引导程序Bootstrap58.时间片Quantum59.进程切换Process Switch60.上下文切换Context Switch61.重定位Relocation62.位示图Bitmaps63.链表Linked List64.虚拟存储器Virtual Memory65.页Page66.页面Page Frame67.页面Page Frame68.修改Modify69.访问Reference70.联想存储器Associative Memory71.命中率Hit Ration72.消息传递Message Passing73.目录Directory74.设备文件Special File75.块设备文件Block Special File76.字符设备文件Character Special File77.字符设备Character Device78.块设备Block Device79.纠错码Error-Correcting Code80.直接内存存取Direct Memory Access81.统一命名法Uniform Naming82.可剥夺资源Preemptable Resource83.不可剥夺资源Nonpreemptable Resource84.先来先服务First-Come First-Served85.最短寻道算法Shortest Seek First86.电梯算法Elevator Algorithm87.引导参数Boot Parameter88.时钟滴答Clock Tick89.内核调用Kernel Call90.客户进程Client Process91.服务器进程Server Process92.条件变量Condition Variable93.信箱Mailbox94.应答Acknowledgement95.饥饿Starvation96.空指针Null Pointer97.规范模式Canonical Mode98.非规范模式Uncanonical Mode99.代码页Code Page100.虚拟控制台Virtual Console101.高速缓存Cache102.基地址Base103.界限Limit104.交换Swapping105.内存压缩Memory Compaction 106.最佳适配Best Fit107.最坏适配Worst Fit108.虚地址Virtual Address109.页表Page Table110.缺页故障Page Fault111.最近未使用Not Recently Used 112.最久未使用Least Recently Used 113.工作集Working Set114.请调Demand Paging115.预调Prepaging116.访问的局部性Locality of Reference 117.颠簸Thrashing118.内零头Internal Fragmentation 119.外零头External Fragmentation 120.共享正文Shared Text121.增量转储Incremental Dump 122.权限表Capability List123.访问控制表Access Control List。

大学计算机基础复习资料-双语教学英文版

大学计算机基础复习资料-双语教学英文版

计算机复习资料最终定稿版Ji suan ji fu xi zi liao zui zhong ding gao ban1.key words of Definition for computer: instructions,input,processes ,outputA computer is an electronic device which operates under the control of stored instructionsaccepts data inputprocesses the data according to specified rulesproduces and stores output1、A computer’s power is derived from Speed Reliability Accuracy Storage Communications2、Data: The symbols that represent people, events, things, and ideas. Consists of the raw, unprocessed facts, including text, numbers, images, and sounds.3、Information :Data becomes information when it is presented in a format that people can understand and use .6.分类:Supercomputers (巨型计算机)fastest, most powerful, most expensive Mainframe computers(大型机)provide great processing speeds and data storage. Minicomputers (小型机)Microcomputers(微机)即personal computer or PCleast powerful, but the most widely used.rmation can be represented in one of two waysAnalog data(模拟) A continuous representation,analogous(相似)to the actual informationDigital data A discrete representation8.1 Byte=8 bits,B, KB, MB, GB, TB):9. Binary(Base 2)Octal(8)Decimal(Base 10)Hexadecimal(16)0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F10.distinguish number system(1) Subscript(下标) (101)2 (101) 8(2)Postfix(后缀)101B 101O 101D 101H11. Converting numberNon-Decimal to DecimalDecimal to Non-Decimal❖10—2 integer整数(1)短除法(2)从高位到低位逆用2—10思想❖Fraction小数Non-Decimal to Non-Decimal2—8 (10 111 011.110 1)2 = (273.64)88—2 (6754.32)8 = (110 111 101 100. 011)216—2 (A7B8.C9)16=(1010 0111 1011 1000 .1100 1001)12.Binary Arithmetic12.original code–(2n–1–1) ~ (2n–1–1) Total number is2n–1 n=8 -127 ~+127 Pro:Simple & Direct Cons:Subtraction operation may fail (overflow)13.Original code and Complement code, to do subtraction减法in addition(补码的意义正在于把减法做成加法)▪For positive number:complement = original▪For negative number:•Original: sign bit is 1, the rest is its absolute value•Complement: reverse all digits except the sign, the plus 1▪Complement of complement = original14.complement code –2n–1~ (2n–1–1) Total number is 2n n=8, the range is: -128 ~+12715.Floating point notation to represent very large real numbers and very small real numbers(1)-1.6875=(-1.1011)2=(-0.11011×21)2(2)指数尾数上数=0 0000001 1 11011000000000000000000 (用八位表示指数位,24位表示尾数位)16.In a 32 bits computer, if 8 bits for exponent part and 24 bits for mantissa part, the range of number is 1038 ~ 2-150 0 -1038 ~ -2-15016.Code of charactersASCII美国信息交换标准码character setStandard 7-bits, with 128 charactersExtended 8-bits, with 256 charactersUnicode 16-bits, a superset超集of ASCI17.von Neumannthree main ideas about computer*Five basic components *Use binary information *Stored program18.The principle of stored programA couple of abilities: store program and then automatic execute program .(存储程序、自动执行程序)Computers use “memory” (primary memory主存) to store program which will be processed ❖19.Five basic components▪Control Unit▪Arithmetic/logic Unit (ALU) 运算器▪Input devices▪Output devices▪Storage – primary and secondary storage19.CPUcan fetch each instruction in that program from memory one by onedecode the informationGet data if neededand then execute the information until all instructions arefinished.巧记有一个全控制,有两个互相传数据和信息,有一个只入,有一个只出20.ALU(运算器)(arithmetic operation logical operations)---(register)CPUControl Unit(directs and coordinates使协调operations in computer.)--registerRandom access memory (RAM) temporary or volatile storageMain memory Read-only memory (ROM) ---BIOS Basic Input Output SystemMemory CMOS required every time the computer system is turned onSecondary Storage 外存CPU不能直接访问注释1 CPU定义Interprets(翻译)and carries out basic instructions that operate a computer注释2 ROM cannot be changed 而CMOS can be changed to reflect changes in the computer system注释3Memory used to store the most frequently accessed information stored in RAM –cache,21.two registers in the control unit:The instruction register (IR) contains the instruction that is being executed.The program counter (PC) contains the address of the next instruction to be executed18.#Two steps of a machine cycle: Instruction cycle and execution cycle22.CPU speed Clock rate Word size Cache Instruction set size(指令集大小)23. Computers are electronic devices that accept instructions, process input, and produce information24.术语:Floppy disk 软盘Optical disk/compact disk 光盘Flash disk 闪存盘23.System Unit (主机)❖Motherboard❖Processor – CPU▪ALU▪Control Unit❖Memory▪RAM, ROM, CMOS, Cache▪All data and instructions must be loaded into RAM before they can be executed❖Bus – data highway between devices❖Expansion slots/cards (扩展槽/卡) to add extra devices▪video card, sound card, network card❖Port (端口) – a plug for a cable that leads to a device▪usb ports, RJ-45, VGA port for monitor 《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《OS》24.系统软件实用软件操作系统外壳,命令解释程序内核注释1Utility software fundamental to computer installations, but not part of the OS.注释2 shell provides an interface through which a human can interact with the computer kernel manages computer resources, such as memory and input/output device强调:System software定义manage a computer system at a fundamental level25. Every operating system performs three basic functions:(different os also have other specific functions )manages computer resources, such as 1. memory,2. CPU, and3. processesprovides an interface through which a human can interact with the computerallow s an application program to interact with other system resources26. Managing Resources consists of:Memory managementProcess managementCPU scheduling26.1. Memory management optimizes(优化)the use of RAM26.2-1 A process can be defined as a program in execution.26.2-2 A single user operating system allows only one user to run one program at a time.A multiuser operating system enables two or more users to run a program simultaneously.A multitasking operating system allows a single user to work on two or more applications thatreside in memory at the same time.A multiprocessing operating system can support two or more processors running programs atthe same time.26.3 CPU SchedulingThe operating system determines which process in memory is executed by CPU Nonpreemptive scheduling 无优先调度Preemptive scheduling27.OTHER FUNCTIONS27.1System Booting Cold boot&Warm bootThe process of starting or restarting a computer is called booting27.2System Shutting DownSleep mode(睡眠)saves any open documents and programs to RAM, turns off all unneeded functions, and then places the computer in a low-power stateHibernate(休眠)saves any open documents and programs to a hard disk before removing power from the computerUser Interface Device Driver Network Support Performance Monitor System Update 28.Types of Operating Systems28.1A stand-alone operating system(独立操作系统)is a complete operating system that works on a desktop computer, notebook computer, or mobile computing device 28.2An embedded (嵌入式)operating system resides on a ROM chip on a mobile device or consumer electronic device29.File A named collection of related dataFile is stored in secondary storage A file is a set of data that has been given a nameFile system The operating system's logical view of the files it manages Directory A named group of files. Also called a folder30.File typeProgram files(程序文件)- contains instructions to tell the computer what to do.Microsoft Word, Photoshop, AutoCADData Files - not executable and only used with a program.Word document, text file, Excel file, PowerPoint fileText file A file in which the bytes of data are organized ascharacters from the ASCII or Unicode character setsBinary file A file that contains data in a specific format, requiringinterpretation(翻译)31.The root directory is typically identified by the device letter followed by a backslash(反斜线)32.File managementWindows Explorer(资源管理器) Clipboard(剪贴板)Recycle Bin(回收站) 33.File Properties(属性)34.Path NamesAbsolute path D:\Courses\Computer\2011\OS.pptRelative path 2011\OS.ppt 〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉〉Multimedia35.Representing CharacterASCII (America Standard Code for Information Interchange)❖Original ASCII uses 7 bits to code 128 characters❖Extended to 8 bits for 128 extra characters2. Unicodeuses 16 bits, can represent 216 = 6553436.Representing Audio❖Sound is generated by the vibration of air❖Sound wave is analog❖Computers convert sound to digits by sampling❖ A stereo sends an electrical signal to a speaker to reproduce soundA sampling rate of about 40,000 times per second is enough to create a reasonable sound reproductionAudio Formats▪WA V, AU, AIFF, VQF, and MP3❖MP3 is dominant▪MPEG-2, audio layer 3 file >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Graphics 37.Representing Images and Graphics❖Raster(光栅)-graphics▪The storage of image information is on a pixel-by-pixel(像素)basis▪Popular formats•BMP (bitmap), GIF (Graphics Interchange Format), JPEG (JointPhotographic Experts Group)❖Vector-graphics(矢量图)▪Describes an image in terms of lines and geometric shapes▪Include a series of commands that describe a line’s direction, thickness, and colour.▪The file sizes tend to be smaller because not every pixel is described▪38. A graph is treated as a matrix of dots, which is called pixels❖The number of pixels is called resolution(分辨率)39.Color is expressed as an RGB (Red,Green,Blue) value three primary colors40.Color depth▪The amount of data that is used to represent a color41.TrueColor▪ A 24-bit color depth: eight bits used for each number in an (R,G,B) value 42.Each pixel is normally recorded by three bytes, for red-green-blue respectively. Therefore, a pixel is written as (r, g, b), where 0 <= r,g,b <= 25543.Resolution▪The number of pixels used to represent a picture44.In the resolution 800×600, an RGB true-color image needs❖800×600×3×8 bits = 1440KB = 1.4MB。

操作系统英文版课后习题答案整理

操作系统英文版课后习题答案整理

1.1What are the three main purposes of an operating system?(1) Interface between the hardware and user;(2) manage the resource of hardware and software;(3) abstraction of resource;1.2 List the four steps that are necessary to run a program on a completely dedicated machine. Preprocessing > Processing > Linking > Executing.1.6 Define the essential properties of the following types of operating systems:a. Batchb. Interactivec. Time sharingd. Real timee. Networkf. Distributed1.7 We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to“waste” resources? Why is such a system not really wasteful?2.2 How does the distinction between monitor mode and user mode function as a rudimentary form of protection (security) system?2.3 What are the differences between a trap and an interrupt? What is the use of each function?2.5 Which of the following instructions should be privileged?a. Set value of timer.b. Read the clock.c. Clear memory.d. Turn off interrupts.e. Switch from user to monitor mode.2.8 Protecting the operating system is crucial to ensuring that the computer system operates correctly. Provision of this protection is the reason behind dual-mode operation, memory protection, and the timer. To allow maximum flexibility, however, we would also like to place minimal constraints on the user.The following is a list of operations that are normally protected. What is the minimal set of instructions that must be protected?a. Change to user mode.b. Change to monitor mode.c. Read from monitor memory.d. Write into monitor memory.e. Fetch an instruction from monitor memory.f. Turn on timer interrupt.g. Turn off timer interrupt.3.6 List five services provided by an operating system. Explain how each provides convenience to the users. Explain also in which cases it would be impossible for user-level programs to provide these services.3.7 What is the purpose of system calls?3.10 What is the purpose of system programs?4.1 MS-DOS provided no means of concurrent processing. Discuss three major complications that concurrent processing adds to an operating system.4.6 The correct producer–consumer algorithm in Section 4.4 allows only n-1 buffers to be full at any one time. Modify the algorithm to allow all buffers to be utilized fully.5.1 Provide two programming examples of multithreading giving improve performance overa single-threaded solution.5.3 What are two differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?6.3 Consider the following set of processes, with the length of the CPU-burst time given inmilliseconds:Process Burst Time PriorityP1 10 3P2 1 1P3 2 3P4 1 4P5 5 2The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1) scheduling.b. What is the turnaround time of each process for each of the scheduling algorithms in part a?c. What is the waiting time of each process for each of the scheduling algorithms in part a?d. Which of the schedules in part a results in the minimal average waiting time (over all processes)?Answer:6.4 Suppose that the following processes arrive for execution at the times indicated. Eachprocess will run the listed amount of time. In answering the questions, use nonpreemptive scheduling and base all decisions on the information you have at the time the decision must be made.a. What is the average turnaround time for these processes with the FCFS scheduling algorithm?b. What is the average turnaround time for these processes with the SJF scheduling algorithm?c. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is leftidle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be known as future-knowledge scheduling.6.10 Explain the differences in the degree to which the following scheduling algorithms discriminate in favor of short processes:a. FCFSb. RRc. Multilevel feedback queues7.7 Show that, if the wait and signal operations are not executed atomically,then mutual exclusion may be violated.7.8 The Sleeping-Barber Problem. A barbershop consists of a waiting room with n chairs and the barber room containing the barber chair. If there are no customers to be served,the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop.If the barber is busy but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber. Write a program to coordinate the barber and the customers.8.2 Is it possible to have a deadlock involving only one single process? Explain your answer.8.4 Consider the traffic deadlock depicted in Figure 8.11.a. Show that the four necessary conditions for deadlock indeed hold in this example.b. State a simple rule that will avoid deadlocks in this system.8.13 Consider the following snapshot of a system:Allocation Max AvailableA B C D A B C D A B C DP0 0 0 1 2 0 0 1 2 1 5 2 0P1 1 0 0 0 1 7 5 0P2 1 3 5 4 2 3 5 6P3 0 6 3 2 0 6 5 2P4 0 0 1 4 0 6 5 6Answer the following questions using th e banker’s algorithm:a. What is the content of the matrix Need?b. Is the system in a safe state?c. If a request from process P1 arrives for (0,4,2,0), can the request be granted immediately?9.5 Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in order), how would each of the First-fit, Best-fit, and Worst-fit algorithms place processes of 212K, 417K, 112K, and 426K (in order)? Which algorithm makes the most efficient use of memory?9.8 Consider a logical address space of eight pages of 1024 words each, mapped onto a physicalmemory of 32 frames.a. How many bits are there in the logical address?b. How many bits are there in the physical address?9.16 Consider the following segment table:Segment Base Length0219 60012300 14290 10031327 58041952 96What are the physical addresses for the following logical addresses?a. 0,430b. 1,10c. 2,500d. 3,400e. 4,11210.2 Assume that you have a page reference string for a process with m frames (initially all empty). The page reference string has length p with n distinct page numbers occur in it. For any page-replacement algorithms,a. What is a lower bound on the number of page faults?b. What is an upper bound on the number of page faults?10.11 Consider the following page reference string:1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.How many page faults would occur for the following replacement algorithms, assuming one, two, three, four, five, six, or seven frames? Remember all frames are initially empty, so your first unique pages will all cost one fault each.LRU replacementFIFO replacementOptimal replacement11.7 Explain the purpose of the open and close operations.11.9 Give an example of an application in which data in a file should be accessed in the following order:a. Sequentiallyb. Randomly11.12 Consider a system that supports 5000 users. Suppose that you want to allow 4990 of these users to be able to access one file.a. How would you specify this protection scheme in UNIX?b. Could you suggest another protection scheme that can be used more effectively for this purpose than the scheme provided by UNIX?12.1 Consider a file currently consisting of 100 blocks. Assume that the file control block (andthe index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguousallocation case, assume that there is no room to grow in the beginning, but there is room to grow in the end. Assume that the block information to be added is stored in memory.a. The block is added at the beginning.b. The block is added in the middle.c. The block is added at the end.d. The block is removed from the beginning.e. The block is removed from the middle.f. The block is removed from the end.13.2 Consider the following I/O scenarios on a single-user PC.a. A mouse used with a graphical user interfaceb. A tape drive on a multitasking operating system (assume no device preallocation is available)c. A disk drive containing user filesd. A graphics card with direct bus connection, accessible through memory-mappedI/OFor each of these I/O scenarios, would you design the operating system to use buffering, spooling, caching, or a combination? Would you use polled I/O, or interrupt-driven I/O?Give reasons for your choices.14.2 Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following diskschedulingalgorithms?a. FCFSb. SSTFc. SCANd. LOOKe. C-SCAN1.1 1.62.3 2.53.7 6.3 6。

操作系统复习资料

操作系统复习资料

1、操作系统:Operating System 13、临界资源:Critical Resource2、串行处理系统:Serial System 14、临界段:Critical Section3、批处理系统:Batch System 15、调度:Scheduler4、分时系统:Time Sharing System 16、响应时间:Response Time5、实时系统:Real Time System 17、最短作业优先:Shortest Process Next6、多道程序:Multi-programming 18、最高响应比优先:Highest Response Ratio Next7、进程:Process 19、时间片轮转:Round-Robin8、进程表:Process T ables 20、死锁:Deadlock9、进程映像:Process Image 21、死锁预防:Deadlock Prevention10、进程控制块:Process Control Block22、死锁避免:Deadlock Abstention11、并发:Concurrence 23、死锁检测:Deadlock Detection12、互斥:Mutual Exclusion 24、死锁恢复:Deadlock Restoration1、试修改下面生产者-消费者问题解法中的错误,改正在错误处:struct semaphore mutex=1,empty=n,full=0;main(){{{producer();consumer();}}}producer(){while(true){生产产品;V(full);V(mutex);把产品送入缓冲;P(mutex);}}consumer(){while(true){V(empty);V(mutex);从缓冲取得产品;P(mutex);消费产品;}}2、已知内存管理采用页式存储管理。

操作系统期末复习重点史上最全)

操作系统期末复习重点史上最全)

操作系统(Operat ing System )复习要点操作系统:计算机系统中的一组系统软件,由它统一管理计算机系统的各种资源并合理组织计算机的工作流程,方便用户使用。

具有管理和服务功能操作系统的特征:并发性,共享性,随机性,可重构性,虚拟性。

并发是指计算机系统中同时存在多个程序,宏观上看,这些程序是同时向前推进的。

共享性:批操作系统程序与多个用户程序共用系统中的各种资源虚拟性:物理实体转化为若干逻辑上的对应物。

操作系统的功能:1,进程管理;2,存储管理;3,文件管理;4,作业管理;5,设备管理;6,其他功能(系统安全,网络通信)。

传统OS中,进程是系统调度的最小单位,是程序的一次执行;而现代OS中则是线程,是程序一次相对独立的执行过程。

操作系统的发展历史1,手工操作:穿孔卡片2,监督程序一一早期批处理:计算机高级语言岀现,单道批处理单道批处理:串行执行作业中,由监督程序识别一个作业,进行处理后再取下一个作业的自动定序处理方式第作业的定义:用户要求计算机系统处理的一个计算问题。

(或参考调度性能的衡量一一周转时间、平均周转时间、带权周转时间、平作业的两种控制方式1,批处理:操作系统按各作业的作业控制说明书的要求,分别控制相应的作业按指定步骤执行。

2,交互:在作业执行过程中,操作系统与用户之间不断交互作用。

作业调度:从后备作业队列中选取某个作业投入主存参与多道运行。

调度算法原则:①尽可能运行更多的作业,优先考虑短作业;②使处理机保持繁忙,优先考虑计算量大的作业;③使I/O设备保持繁忙,优先考虑I/O繁忙的作业;④对所有的作业都是公平合理的。

选择原则:①选择的调度算法与系统的整体设计目标一致;②注意系统资源的均衡使用,使I/O作业与CPU作业搭配合理;③作业应该在规定时间内完成,能缩短作业周转时间。

第进程的定义:具有独立功能的并行程序一次执行过程进程和程序的区别与联系:区别:①程序是指令的有序集合,静态;进程是程序的一次运行活动,动态;②进程是一个独立运行单位,共享资源的实体,能并发执行;而程序不能。

操作系统全英文期中考试题(带答案)

操作系统全英文期中考试题(带答案)

XX大学2011——2012学年第一学期《操作系统》期中考试试题(A)一、选择(每题1分,共20分)1.Which function does the operating system can not complete directly of the following four options? ( b )A.Managing computer's hard drivepile the programC.Virtual memoryD.Delete files2.Considering the function of the operating system, ( b ) must give timely response for the external request within the specified time.A.multiuser time sharing systemB.real-time operating systemC.batch operating systemwork operating system3. A process can transform from waiting state to ready state relying on ( d )A.programmer commandB.system serviceC.waiting for the next time sliceD.wake-up of the 'cooperation' process4.As we all know,the process can be thought of as a program in execution.We can deal with the the problem about ( b ) easier after importing the concept of process.A.exclusive resourcesB.shared resourcesC.executing in orderD.easy to execute5.CPU-scheduling decisions may take place under the following circumstances except which one?(D )A.When a process switches from the running state to the waiting stateB.When a process switches from the running state to the ready stateC.When a process switches from the waiting state to the ready stateD.When a process switches from the ready state to the waiting state6.In the four common CPU scheduling algorithm, Which one is the best choice for the time-sharing system in general?( C )A.FCFS scheduling algorithmB.Priority scheduling algorithmC.Round-robin scheduling algorithmD.Shortest-job-first scheduling algorithm7.If the initial value of semaphore S is 2 in a wait( ) and signal( ) operation,its current value is -1,that means there are ( B ) processes are waiting。

(完整word版)操作系统复习资料大全——考试必备

(完整word版)操作系统复习资料大全——考试必备

操作系统学习指导书操作系统课程组信息工程学院计算机系第1章操作系统引论1.1 知识点总结1、什么是操作系统?操作系统:是控制和管理计算机系统内各种硬件和软件资源、有效地组织多道程序运行的系统软件(或程序集合),是用户与计算机之间的接口。

1) OS是什么:是系统软件(一整套程序组成,如UNIX由上千个模块组成)2) 管什么:控制和管理系统资源(记录和调度)2、操作系统的主要功能?操作系统的功能:存储器管理、处理机管理、设备管理、文件管理和用户接口管理。

1) 存储器管理:内存分配,地址映射,内存保护和内存扩充2) 处理机管理:作业和进程调度,进程控制和进程通信3) 设备管理:缓冲区管理,设备分配,设备驱动和设备无关性4) 文件管理:文件存储空间的管理,文件操作的一般管理,目录管理,文件的读写管理和存取控制5) 用户接口:命令界面/图形界面和系统调用接口3、操作系统的地位操作系统是裸机之上的第一层软件,是建立其他所有软件的基础。

它是整个系统的控制管理中心,既管硬件,又管软件,它为其它软件提供运行环境。

4、操作系统的基本特征?操作系统基本特征:并发,共享和异步性。

1) 并发:并发性是指两个或多个活动在同一给定的时间间隔中进行。

2) 共享:共享是指计算机系统中的资源被多个任务所共用。

3) 异步性:每个程序什么时候执行,向前推进速度快慢,是由执行的现场所决定。

但同一程序在相同的初始数据下,无论何时运行都应获得同样的结果。

5、操作系统的主要类型?多道批处理系统、分时系统、实时系统、个人机系统、网络系统和分布式系统1) 多道批处理系统(1) 批处理系统的特点:多道、成批(2) 批处理系统的优点:资源利用率高、系统吞吐量大(3) 批处理系统的缺点:等待时间长、没有交互能力2) 分时系统(1) 分时:指若干并发程序对CPU时间的共享。

它是通过系统软件实现的。

共享的时间单位称为时间片。

(2) 分时系统的特征:同时性:若干用户可同时上机使用计算机系统交互性:用户能方便地与系统进行人--机对话独立性:系统中各用户可以彼此独立地操作,互不干扰或破坏及时性:用户能在很短时间内得到系统的响应(3) 优点主要是:响应快,界面友好多用户,便于普及便于资源共享3) 实时系统(1) 实时系统:响应时间很快,可以在毫秒甚至微秒级立即处理(2) 典型应用形式:过程控制系统、信息查询系统、事务处理系统4) 个人机系统(1) 单用户操作系统单用户操作系统特征:个人使用:整个系统由一个人操纵,使用方便。

操作系统课程英文词汇

操作系统课程英文词汇

操作系统课程英文词汇Operating System Course English VocabularyIntroductionIn today's rapidly advancing technological world, the study of operating systems holds immense importance. An operating system serves as the backbone of any computer system, managing hardware and software resources efficiently. To fully grasp the concepts and principles associated with operating systems, it is essential to have a strong foundation in the relevant English vocabulary. This article aims to provide a comprehensive list of essential English terms commonly used in the context of operating system courses.1. KernelThe kernel is the core component of an operating system. It acts as an intermediary between hardware and software, managing system resources and providing essential services for the execution of programs.2. ProcessA process refers to a task or program in execution. It includes the program code, associated data, and various execution contexts necessary for its execution. Processes are managed by the operating system and can run concurrently on a computer system.3. ThreadA thread represents a section of a process that can be executed independently. Threads share the same memory space and resources within aprocess, allowing for efficient parallelism and enhanced responsiveness in multitasking environments.4. Memory ManagementMemory management involves the allocation and deallocation of memory resources to different processes and threads. It ensures optimal utilization of memory and prevents conflicts among multiple programs competing for resources.5. File SystemA file system is a method used by the operating system to organize and store data on storage devices such as hard drives and solid-state drives. It provides a structured hierarchy of directories and files, enabling efficient retrieval and storage of information.6. Device DriverA device driver is a software component that allows the operating system to communicate with hardware devices. It provides a standardized interface for controlling and accessing various hardware components, such as printers, keyboards, and network adapters.7. SchedulingScheduling refers to the process of determining the order in which processes or threads are executed on a system's CPU. Various scheduling algorithms, such as round-robin, priority-based, and shortest job first, ensure fair allocation of resources and efficient system performance.8. Virtual MemoryVirtual memory extends the physical memory of a computer system by allowing parts of the operating system or processes to reside in secondary storage, such as hard disks. It provides an illusion of a larger memory space, enabling the execution of more extensive programs.9. DeadlockA deadlock occurs when two or more processes are unable to proceed due to circular dependencies on resources. It can lead to a system-wide stalemate, requiring careful resource allocation and scheduling algorithms to prevent such situations.10. InterruptInterrupts are signals generated by hardware devices or software, causing the operating system to temporarily suspend the execution of a process and handle the event. Interrupt handling ensures timely response to hardware events, such as keyboard input or disk I/O.11. File Allocation MethodsFile allocation methods determine how files are stored on a storage medium. Common methods include contiguous allocation, linked allocation, and indexed allocation. Each method has its advantages and trade-offs concerning storage efficiency and file access time.12. PagingPaging is a memory management technique that divides the physical memory into fixed-size blocks called pages. It allows for efficient memoryallocation and virtual memory usage, reducing fragmentation and enhancing system performance.13. SwappingSwapping involves moving an entire process from main memory to secondary storage and vice versa. It enables the system to free memory resources when necessary, allowing for the execution of more significant processes.14. CachingCaching is a technique used to store frequently accessed data in a cache memory. It helps to improve system performance by reducing the time required to access data from slower storage devices.ConclusionUnderstanding the fundamental concepts and vocabulary associated with operating systems is crucial for students pursuing a course in this field. This comprehensive list of English terms provides a solid foundation for studying operating systems and related topics. Remembering and utilizing these terms will enhance communication, comprehension, and overall learning experience in the exciting world of operating systems.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Chapter 4Processes and Threads进程和线程到目前为止进程的两个特点:1、Resource ownership:资源所有权2、Scheduling/execution:调度/执行the unit of dispatching is usually referred to as a thread线程, or lightweight process.将分派的单位称为线程或轻量级进程。

线程同步:一个进程的所有线程共享一个地址空间(address space)和其他资源,因此需要同步各种线程的活动User-Level and Kernel-Level Threads用户级和内核级线程User-Level Threads:·All of the word of thread management is done by the application and the kernel is not aware of the existence of threads.有关线程管理的所有工作都由应用程序完成,内核意识不到线程的存在·使用用户级线程而不是内核级线程的优点:1、Thread switching does not require kernel mode privileges线程切换不需要内核态特权2、Scheduling can be application specific.调度可以是应用程序相关的3、ULTs can run on any operating system.用户级线程可以在任何操作系统上运行Kernel-Level Threads:·all of the word of thread management is done by the kernel.所有线程管理的工作由内核完成Threads : Processes线程与进程的关系1:1传统的UNIXM:1Windows NT,Solaries,Linux1:M RS(Clouds)A thread that can move among address spaces.线程可以在地址空间中移动(thread migration)M:N TRIXSymmetric Multiprocessing对称多处理SISD单指令单数据流:单处理器执行单个指令流SIMD单指令多数据流:每条指令由不同的处理器在不同的数据集合上执行MISD多指令单数据流:从未被实现过MIMD多指令多数据流:一组处理器同时在不同的数据集上执行不同的指令序列In a symmetric multiprocessor, the kernel can execute on any processor, and typically each processor does self-scheduling from the pool of available processes.内核可以在任何处理器上执行,并且通常是每个处理器从可用的进程或线程池中进行自己的调度工作Microkernel微内核·monolithic operation system单体结构的操作系统·layered operation system分层的操作系统·microkernel operation微内核结构·The philosophy underlying the microkernel is that only absolutely essential core operating system functions should be in the kernel. Less essential services and applications are built on the microkernel and execute in user mode.只有最基本的操作系统功能才能放在内核中,非基本的服务和应用程序在为微内核之上构造,并在用户态下执行·微内核结构的优点:uniform一致接口extensibility可扩展性flexibility灵活性portability可移植性reliability可靠型distributed system support分布式系统支持object-oriented operating system面向对象操作系统·微内核的一个潜在缺点是性能问题Microkernel Design微内核设计Low-Level Memory Management低级存储管理:three microkernel operations that can support external paging and virtual memory management.用于支持内核外部的页面调度和虚存管理的三个微内核操作:·Grant授权·Map映射·Flush刷新Interprocess Communication进程通信:通信的基本形式是消息(messages)Chapter 5Race Condition竞态条件Race condition is a situation where two or more processes are reading or writingsame share data and the final result depends on the particular order in which theaccess takes place.Process Interaction进程间的相互作用·Processes unaware of each other:competition·Processes indirectly aware of each other:cooperation·Process directly aware of each other:cooperation进程间的制约关系直接制约:进行协作——等待来自其他进程的信息,“同步”进程间的相互联系是有意识的安排的间接制约:进行竞争——独占分配到的部分或全部共享资源,“互斥”。

进程间要通过某种中介发生联系,是无意识安排的Mutual Exclusion (进程互斥): synchronization mechanism toavoid race conditions by ensuring exclusive execution of critical sections.它是指进程之间互相排斥地使用临界资源,即你在使用时我不能使用,我在使用时你不能使用。

Synchronization (进程同步) :指系统中多个进程中发生的事件存在某种时序关系,需要相互合作,共同完成一项任务。

具体说,一个进程运行到某一点时要求另一伙伴进程为它提供消息,在未获得消息之前,该进程处于等待状态,获得消息后被唤醒进入就绪态。

因此,进程互斥也是一种同步,因为它也是进程之间的一种协调。

Critical Regions(临界区)·When a process executes code that manipulates shared data (or resource), we say that theprocess is in it’s critical section·The section of code implementing this request is called the entry section·The critical section (CS) might be followed by an exit section·The remaining code is the remainder section·The critical section problem is to design a protocol that the processes can use so that theiraction will not depend on the order in which their execution is interleaved (possibly onmany processors)Requirements for ME(同步机制应遵循的规则)Mutual Exclusion(忙则等待):At any time, at most one process can be in its critical section.,or, no two processes can be in the critical section at same timeProgress(空闲让进):No process running outside its critical section may block another process. Only processes that are not executing in their RS can participate in the decision of who will enter next in the CSBounded Wait(有限等待):After a process has made a request to enter it’s CS, there is abound on the number of times that the other processes are allowed to enter their CS, otherwise the process will suffer from starvationSpeed and Number of CPUs:No assumption may be made about speeds or number of CPUsApproaches to solving ME (synchronization)involves:Software solutionsHardware solutionsdisable interruptSpecial-purpose machine instructions: TSI, EXCOS solutionsSemaphores: Synchronization Primitives (P, V)monitorsmessage passingSemaphore(信号量)Semaphore is a variable that has an integer value·May be initialized to a nonnegative number·semWait operation decrements the semaphore value·semSignal operation increments semaphore valuesemwait就是P操作,信号量减1semSignal就是V操作,信号量加1Binary (mutex) Semaphore Primitives(二元或互斥信号量)s表示资源的数量Counting semaphores: 0..NBinary semaphores: 0,1P原语The P operation is used to acquire a resource and decrements count.P原语:对应着down操作或semWaits--; //表示申请一个资源;if (s < 0) //表示没有空闲资源;{将该进程置入到与该信号量对应的等待队列中;阻塞该进程;}V原语V原语通常唤醒进程等待队列中的头一个进程The V operation is used to release a resource and increments count.V原语:对应着up操作或semSignals + +; //表示释放一个资源;if (s <= 0) //表示有进程处于阻塞状态;{从等待队列中唤醒一个等待进程;将该进程置入就绪队列中;}Using semaphores for solving Critical Section problems·为临界资源设置一个互斥信号量mutex (MUTual EXclusion),其初值为1;在每个进程中将临界区代码置于P(mutex)和V(mutex)原语之间·必须成对使用P和V原语:遗漏P原语则不能保证互斥访问,遗漏V原语则不能在使用临界资源之后将其释放(给其他等待的进程);P、V原语不能次序错误、重复或遗漏Monitors (管程机制)基本概念管程是关于共享资源的数据结构及一组针对该资源的操作过程所构成的软件模块。

相关文档
最新文档