Fundamental of Computer Architecture By Panyayot Chaikan September 13, 2004
Chapter 9- Operating System support Fundamental of Computer Architecture Chapter 9 การสนับสนุน ระบบปฏิบัติการ Operating System support
Chapter 9- Operating System support Fundamental of Computer Architecture เนื้อหา การสนับสนุนการทำ multitasking ของซีพียูและ ระบบฮาร์ดแวร์ - Program Relocation - Memory protection - Timer interrupt - Dual-mode operation of CPU ระบบหน่วยความจำเสมือน (Virtual Memory)
Chapter 9- Operating System support Fundamental of Computer Architecture Multitasking-Operating System Supported by most OSs Windows(98, NT, 2000, XP), Linux, OS/2, AIX, System7, Solaris, UNIX, etc. Easy to use Increment CPU utilization Need HW support
Chapter 9- Operating System support Fundamental of Computer Architecture Multitasking :hardware support Dual-Mode Operation Program relocation Memory protection Timer interrupts
Chapter 9- Operating System support Fundamental of Computer Architecture Dual-mode Operation Needed to protect the OS from improper behavior of application programs CPU must provide at least 2 modes of operation Monitor mode User mode OS runs in monitor mode only Application runs in user mode only
Chapter 9- Operating System support Fundamental of Computer Architecture Monitor mode Sometimes called Privileged mode or System mode Used by OS only Allow Privileged instructions to be executed When interrupt or trap occurs, the CPU automatically switched to monitor mode
Chapter 9- Operating System support Fundamental of Computer Architecture User mode Used by application program Do not allow Privileged instructions to be executed OS switch the CPU to user- mode before running application Trap to OS when privileged instruction are tried to be executed by application program
Chapter 9- Operating System support Fundamental of Computer Architecture Program relocation
Chapter 9- Operating System support Fundamental of Computer Architecture Memory protection
Chapter 9- Operating System support Fundamental of Computer Architecture Memory protection hardware
Chapter 9- Operating System support Fundamental of Computer Architecture Case stydy: memory protection/relocation in CDC6600
Chapter 9- Operating System support Fundamental of Computer Architecture Timer interrupt OS need to ensure that each application get CPU time equally OS set value in Timer before switch to run application While the application is running, value in timer is decreased every clock cycle when value in Timer reach 0, the CPU is interrupted by Timer
Chapter 9- Operating System support Fundamental of Computer Architecture Timer of PC
Chapter 9- Operating System support Fundamental of Computer Architecture Timer of PC
Chapter 9- Operating System support Fundamental of Computer Architecture Virtual memory Provide programmer’s point of view that the system has unlimited memory Makes programming easier, overlay is no longer needed The program can be run in the system that has limited physical memory
Chapter 9- Operating System support Fundamental of Computer Architecture What is Overlay?
Chapter 9- Operating System support Fundamental of Computer Architecture Virtual memory : Demand Paging
Chapter 9- Operating System support Fundamental of Computer Architecture TLB and Virtual memory
Chapter 9- Operating System support Fundamental of Computer Architecture TLB of Athlon processor
Chapter 9- Operating System support Fundamental of Computer Architecture จบ บทที่ 9