Computer Operating System - Lecture 2: Computer-System Organization - Nguyen Thanh Son

Computer System Operation
 I/O Structure
 Storage Structure
 Storage Hierarchy
 Hardware Protection
 General System Architecture 
pdf 30 trang xuanthi 30/12/2022 2100
Bạn đang xem 20 trang mẫu của tài liệu "Computer Operating System - Lecture 2: Computer-System Organization - Nguyen Thanh Son", để tải tài liệu gốc về máy hãy click vào nút Download ở trên.

File đính kèm:

  • pdfcomputer_operating_system_lecture_02_computer_system_organiz.pdf

Nội dung text: Computer Operating System - Lecture 2: Computer-System Organization - Nguyen Thanh Son

  1. Chapter’s Content  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General System Architecture BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 2
  2. Computer-System Operation  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device type.  Each device controller has a local buffer.  CPU moves data from/to main memory to/from local buffers  I/O is from the device to local buffer of controller.  Device controller informs CPU that it has finished its operation by causing an interrupt. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 4
  3. Interrupt Handling  The operating system preserves the state of the CPU by storing registers and the program counter.  Determines which type of interrupt has occurred:  polling  vectored interrupt system  Separate segments of code determine what action should be taken for each type of interrupt BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 6
  4. I/O Structure  After I/O starts, control returns to user program only upon I/O completion.  Wait instruction idles the CPU until the next interrupt  Wait loop (contention for memory access).  At most one I/O request is outstanding at a time, no simultaneous I/O processing.  After I/O starts, control returns to user program without waiting for I/O completion.  System call – request to the operating system to allow user to wait for I/O completion.  Device-status table contains entry for each I/O device indicating its type, address, and state.  Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 8
  5. Device-Status Table BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 10
  6. Storage Structure  Main memory – only large storage media that the CPU can access directly.  Secondary storage – extension of main memory that provides large nonvolatile storage capacity.  Magnetic disks – rigid metal or glass platters covered with magnetic recording material  Disk surface is logically divided into tracks, which are subdivided into sectors.  The disk controller determines the logical interaction between the device and the computer. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 12
  7. Storage Hierarchy  Storage systems organized in hierarchy.  Speed  Cost  Volatility  Caching – copying information into faster storage system; main memory can be viewed as a last cache for secondary storage. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 14
  8. Caching  Use of high-speed memory to hold recently-accessed data.  Requires a cache management policy.  Caching introduces another level in storage hierarchy. This requires data that is simultaneously stored in more than one level to be consistent. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 16
  9. Hardware Protection  Dual-Mode Operation  I/O Protection  Memory Protection  CPU Protection BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 18
  10. Dual-Mode Operation (Cont.)  Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1).  When an interrupt or fault occurs hardware switches to monitor mode. Interrupt/fault monitor user set user mode Privileged instructions can be issued only in monitor mode. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 20
  11. Use of A System Call to Perform I/O BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 22
  12. Use of A Base and Limit Register BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 24
  13. Hardware Protection  When executing in monitor mode, the operating system has unrestricted access to both monitor and user’s memory.  The load instructions for the base and limit registers are privileged instructions. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 26
  14. Network Structure  Local Area Networks (LAN)  Wide Area Networks (WAN) BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 28
  15. Wide Area Network Structure BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 30