1 / 20

Plug and Play

Chapter 5. Plug and Play. Chapter 5. IRQ : Interrupt Request. การประสานงานระหว่าง CPU กับ อุปกรณ์พ่วงต่อ ใช้ กลไลที่เรียกว่า Interrupt หรือการขอขัดจังหวะ เมื่ออุปกรณ์ใดต้องการใช้งาน CPU ก็ต้องส่งสัญญาณ Interrupt ไปยัง CPU เรียกว่า Interrupt Request (IRQ)

harper
Télécharger la présentation

Plug and Play

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5 Plug and Play

  2. Chapter 5 IRQ : Interrupt Request • การประสานงานระหว่าง CPU กับ อุปกรณ์พ่วงต่อ ใช้ กลไลที่เรียกว่าInterruptหรือการขอขัดจังหวะ • เมื่ออุปกรณ์ใดต้องการใช้งาน CPU ก็ต้องส่งสัญญาณ Interrupt ไปยัง CPU เรียกว่า Interrupt Request (IRQ) • CPU จะคอยตรวจดูว่ามีอุปกณ์ใดขอ Interrupt มาบ้างถ้า CPU ว่างจากการทำงานพร้อมจะทำงานให้อุปกรณ์นั้นๆ ได้ CPU ก็จะส่งสัญญาณ พร้อมทำงานให้อุปกรณ์นั้น ๆ ทราบ เรียกว่า Interrupt Acknowledge Plug and Play

  3. Chapter 5 IRQ : Interrupt Request • IRQเป็นการ interrupt ทาง Hardware เป็นสัญญาณไฟฟ้าที่ไหลในวงจรคอมพิวเตอร์ • INTเป็น interrupt ทาง Software ที่เกิดขึ้นจากการขอขัดจังหวะภายในโปรแกรม Plug and Play

  4. Chapter 5 Plug and Play อุปกรณ์แต่ละชนิดจะมี ลำดับความสำคัญไม่เท่ากัน โดยแบ่งตามหมายเลข IRQ

  5. Chapter 5 I/O : Input / Output Port • I/O port จะใช้ Data bus ในการส่งข้อมูลเข้า-ออก CPU • Data bus อาจมีขนาด 8 bit 16 bit 32 bit เป็นต้น • การชี้ตำแหน่ง อุปกรณ์หรือ RAM ใช้ สายสัญญาณอีกชุดหนึ่งเรียกว่า Address busอาจมีขนาด เป็น 16 เส้น หรือ 32 เส้น Plug and Play

  6. Chapter 5 DMA : Direct Memory Access • DMAเป็นเทคนิคการเข้าถึงหน่วยความจำโดยตรง(ไม่ต้องผ่านการสั่งงานจาก CPU) • ใช้ DMA Controller คอยรับคำร้องจาก I/O เมื่อมีจังหวะที่ data bus ไม่ได้ถูกใช้งาน ก็จะเข้าไปจับจอง data bus แล้วจัดการส่งข้อมูลระหว่าง I/O กับ RAM เมื่อส่งข้อมูลแล้วเสร็จ ก็ปลดปล่อย data bus Plug and Play

  7. Chapter 5 Type of BUS • ISA Bus : Industrial Standard Architecture เป็นระบบบัสดั่งเดิม มีขนาด 8 bit ปัจจุบันไม่นิยมใช้กันแล้ว • PCI Bus : Peripheral Component Interconnect ปัจจุบันเป็นบัสหลักในการเชื่อมต่อ CPU กับอุปกรณ์อื่นๆ ที่ต้องการความเร็วในการส่งข้อมูลสูง เช่น Display card เป็นต้น มีขนาด 32 bit หรือ 64 bit Plug and Play

  8. Chapter 5 Type of BUS • SCSI Bus : Small Computer System Interface เป็นระบบบัสที่มักใช้เชื่อมต่อกับอุปกรณ์ภายนอก เครื่อง Printer หรือ Hard disk แบบ SCSI สามารถเชื่อมต่อแบบพ่วงต่อกันได้สูงสุดถึง 7 ตัว Plug and Play • PCMCIA: Personal Computer Memory Card International Association มีลักษณะเป็นแผ่นการ์ดขนาดเท่านามบัตร พกพาสะดวก เป็นระบบบัสที่มีคุณสมบัติแบบ Plug and Play

  9. Chapter 5 Type of BUS • AGP : Accelerated Graphics Port เป็นบัสที่ใช้กับจอภาพ มีความเร็วในการส่งข้อมูลมากกว่า PCI ใช้ความถี่สัญญาณนาฬิกา 66,100 หรือ 133 MHz • USB : Universal Serial Bus เป็นระบบบัสสำหรับพ่วงต่ออุปกรณ์ภายนอก สามารถต่อพ่วงอุปกรณ์ได้มากถึง 127 ตัว และมีคุณสมบัติแบบ Plug and Play Plug and Play

  10. Chapter 5 Plug and Play • เป้าหมาย: ง่ายในการติดตั้งอุปกรณ์ ไม่ต้อง configเสียบ แล้วใช้ได้เลย Plug and Play • องค์ประกอบ: • PnP Device อุปกรณ์ที่เป็นไปตามข้อกำหนดของ PnP • PnP BIOS โปรแกรม BIOS ใน ROM ต้องเป็นไปตามข้อกำหนด เช่น สามารถแก้ปัญหาการชนกันของอุปกรณ์ได้ เป็นต้น • PnP OS ระบบปฏิบัติการต้องสามารถกำหนด configuration ให้กับอุปกรณ์ load device driver ที่ถูกต้อง เป็นต้น

  11. Chapter 5 Plug and PlayDevice • PnP Device มีข้อกำหนด ดังนี้ • รองรับการ สนทนาระหว่างตัวอุปกรณ์กับ software ในการกำหนด configuration • สามารถเก็บสถานะตัวเองว่า Active หรือ Inactive • มีข้อมูลแสดงลักษณะเฉพาะของตัวอุปกรณ์ เช่น Vendor ID, Device ID เป็นต้น Plug and Play

  12. Chapter 5 Plug and Play BIOS • PnP BIOS มีหน้าที่หลัก คือ • Resource Management • Runtime Configuration Plug and Play

  13. Chapter 5 • Resource Management Plug and Play BIOS • BIOS โดยทั่วไป มีหน้าที่ Boot ระบบ และเปิดการทำงานของ OS • PnP BIOS จะต้องทำหน้าที่ ในการจัดสรรทรัพยากร เพิ่มเข้ามาในกระบวนการทำงาน ด้วย Plug and Play • กระบวนการทำงานของ BIOS เรียกว่า POST (Power –On Self – Test)

  14. Chapter 5 • 2) Runtime Configuration Plug and Play BIOS • PnP BIOS จะต้องรองรับการปรับเปลี่ยน Configuration ได้ตลอดเวลา (เมื่อมีการดึงอุปกรณ์ออกหรือเสียบเข้ามาใหม่) โดยต้องติดต่อกับ OS เพื่อให้มีการ load device driver ที่ต้องใช้เข้าและออกได้ • การติดต่อกับ OS ทำได้สองวิธีคือ • 1) OS คอยสอบถาม BIOS เป็นจังหวะ • 2) BIOS ใช้ software interrupt ไปยัง OS Plug and Play

  15. Chapter 5 • PnP OS Plug and Play OS • OS จะทำงานต่อจาก BIOS โดยจะตรวจสอบ configuration ของอุปกรณ์ต่อจาก BIOS และอาจปรับแต่งหรือติดตั้ง configuration ใหม่ให้เหมาะสมที่สุด • สำหรับ Windows นั้น จะตรวจสอบความสมบูรณ์ของ configuration ได้จาก เมนู Device Manager Plug and Play

  16. Chapter 5 Power on PnP OS PnP Device Search device details Plug and Play Booted PnP Active Other Inactive Read Resource each device used Manage Resource for each device by no conflict Non-PnP BIOS Power-On Self-Test Define all device to Active Boot OS Load device driver การทำงานร่วมกันระหว่าง PnP Device, non PnP BIOS และ PnP OS

  17. Chapter 5 PnP BIOS Power on 1.Search all device 2. Read Resource each device used 3.Manage Configuration for Booted device 4.Defice that device to Active 5.Define Configfor other device PnP OS Plug and Play Read PnP from BIOS PnP Device Define Configfor other device Booted PnP Active Other Inactive Define all device to Active Load device driver POST Boot OS การทำงานร่วมกันระหว่าง PnP Device, PnP BIOS และ PnP OS

  18. Chapter 5 Data base ที่ใช้ในการกำหนด Configuration • Information File ( *.INF ) : เป็นแฟ้มข้อมูลเกี่ยวกับอุปกรณ์แต่ละชนิด ประกอบด้วยข้อมูลเกี่ยวกับทรัพยากรที่ใช้ device driver และข้อมูลอื่นๆ ที่จำเป็นสำหรับการติดตั้งอุปกรณ์นั้นๆ Plug and Play • Registry : เป็นแฟ้มข้อมูลที่เก็บ configuration ของอุปกรณ์ทั้งหมด และค่าติดตั้งต่างๆ ไว้ในแฟ้มข้อมูลแฟ้มเดียว โดยจัดเก็บโดยแบ่งออกเป็น KEY ต่างๆ ในโครงสร้างข้อมูลแบบ Tree

  19. Chapter 5 Plug and Play Q&A

  20. Quiz1 • IRQ คืออะไร ต่างกับ INT อย่างไร • ระบบ Plug and Play มีข้อดีอย่างไร • ระบบ Plug and Play ต้องมีองค์ประกอบอะไรบ้าง • จงเขียน Flow Chart แสดงขั้นตอนการทำงานของ POST • ทำไม PnP BIOS จึงต้องมีคุณสมับติแบบ Run time Configuration • การทำงานของ BIOS แบบ PnP ต่างจาก BIOS แบบ non PnP อย่างไร เพราะเหตุใด Windows Architecture

More Related