Architectural
(hardware) Support for
Operating Systems
• Review of introduction
• Hardware overview
• A peek at Unix
• Hardware (architecture) support
• Summary
Review
• What are the two main responsibilities of OS?
• Manage hardware resources
• Provide a clean set of interface to programs
• Managing resources:
• Allocation
• Protection
• Reclamation
• Virtualization
• Questions?
Why Start With Hardware?
• Operating system functionality fundamentally depends
upon hardware
• Key goal of an OS is to manage hardware
• If done well, applications can be oblivious to HW details
• Hardware support can greatly simplify – or complicate –
OS tasks
• Early PC operating systems (DOS, MacOS) lacked virtual
memory in part because the hardware did not support it
So what is inside a computer
Why hardware has to support
User/Kernel mode?
17 CS317 Operating System
• Give the CPU to the user application
• Why: Performance and efficiency
• OS will not be executing
• Without hardware’s help, OS loses control of the machine!
• Analogy: give the car key to someone, how do you know if he will
return the car?
• This is the one of the most fundamental reasons why OS will
need hardware support --- not only for user/kernel mode
Hardware Features for OS
• Features that directly support the OS include
• Protection (kernel/user mode)
• Protected instructions
• Memory protection
• System calls
• Interrupts and exceptions
• Timer (clock)
• I/O control and operation
• Synchronization
Types of Hardware Support
• Manipulating privileged machine state
• Protected instructions
• Manipulate device registers, TLB entries, etc.
• Generating and handling “events”
• Interrupts, exceptions, system calls, etc.
• Respond to external events
• CPU requires software intervention to handle fault or trap
• Mechanisms to handle concurrency
• Interrupts, atomic instructions
Protected Instructions
• A subset of instructions of every CPU is restricted to use
only by the OS
• Known as protected (privileged) instructions
• Only the operating system can
• Directly access I/O devices (disks, printers, etc.)
• Security, fairness (why?)
• Manipulate memory management state
• Page table pointers, page protection, TLB management, etc.
• Manipulate protected control registers
• Kernel mode, interrupt level
• Halt instruction (why?)
Architectural(hardware) Support forOperating Systems• Review of introduction• Hardware overview• A peek at Unix• Hardware (architecture) support• SummaryReview• What are the two main responsibilities of OS?• Manage hardware resources• Provide a clean set of interface to programs• Managing resources:• Allocation• Protection• Reclamation• Virtualization• Questions?Why Start With Hardware?• Operating system functionality fundamentally dependsupon hardware• Key goal of an OS is to manage hardware• If done well, applications can be oblivious to HW details• Hardware support can greatly simplify – or complicate –OS tasks• Early PC operating systems (DOS, MacOS) lacked virtualmemory in part because the hardware did not support itSo what is inside a computerWhy hardware has to supportUser/Kernel mode?17 CS317 Operating System• Give the CPU to the user application• Why: Performance and efficiency• OS will not be executing• Without hardware’s help, OS loses control of the machine!• Analogy: give the car key to someone, how do you know if he willreturn the car?• This is the one of the most fundamental reasons why OS willneed hardware support --- not only for user/kernel mode Hardware Features for OS• Features that directly support the OS include• Protection (kernel/user mode)• Protected instructions• Memory protection• System calls• Interrupts and exceptions• Timer (clock)• I/O control and operation• SynchronizationTypes of Hardware Support• Manipulating privileged machine state• Protected instructions• Manipulate device registers, TLB entries, etc.• Generating and handling “events”• Interrupts, exceptions, system calls, etc.• Respond to external events• CPU requires software intervention to handle fault or trap• Mechanisms to handle concurrency• Interrupts, atomic instructionsProtected Instructions• A subset of instructions of every CPU is restricted to useonly by the OS• Known as protected (privileged) instructions• Only the operating system can• Directly access I/O devices (disks, printers, etc.)• Security, fairness (why?)• Manipulate memory management state• Page table pointers, page protection, TLB management, etc.• Manipulate protected control registers• Kernel mode, interrupt level• Halt instruction (why?)
การแปล กรุณารอสักครู่..
![](//thimg.ilovetranslation.com/pic/loading_3.gif?v=b9814dd30c1d7c59_8619)