1 / 72

Advanced Operating System Operating System Technology

Advanced Operating System Operating System Technology. OPERATING SYSTEM STRUCTURES. เนื้อหา. ส่วนประกอบหลักของระบบ (Common System Components) บริการต่างๆ ของระบบปฏิบัติการ (Operating System Services) การเรียกระบบ (System Calls) โปรแกรมระบบ (System Programs)

jfeder
Télécharger la présentation

Advanced Operating System Operating System Technology

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. Advanced Operating SystemOperating System Technology OPERATING SYSTEM STRUCTURES

  2. เนื้อหา • ส่วนประกอบหลักของระบบ (Common System Components) • บริการต่างๆ ของระบบปฏิบัติการ (Operating System Services) • การเรียกระบบ (System Calls) • โปรแกรมระบบ (System Programs) • การออกแบบระบบและการนำไปใช้ (Operating System Design and Implementation) • โครงสร้างระบบ(Operating System Structure) • พัฒนาการของระบบ(Operating System Generation)

  3. ส่วนประกอบของระบบ (Common System Components)

  4. การจัดการโปรเซส (Process Management)

  5. การจัดการโปรเซส (Process Management)

  6. การจัดการหน่วยความจำหลัก(Main-Memory Management) • หน่วยความจำหมายถึง อะเรย์ขนาดใหญ่ของคำที่มีแอดเดรสเป็นของตนเอง • รวดเร็วในการเข้าถึงข้อมูลที่ถูกแบ่งปันจากหน่วยประมวลผลและอุปกรณ์รับส่งข้อมูล • เป็นอุปกรณ์จัดเก็บข้อมูล จะสูญเสียข้อมูลเมื่อไม่มีกระแสไฟฟ้าเลี้ยงและในกรณีระบบเกิดการทำงานผิดพลาดขึ้น

  7. การจัดการหน่วยความจำหลัก(Main-Memory Management)

  8. การจัดการไฟล์ (File Management) • ไฟล์หรือแฟ้มข้อมูลหมายถึงกลุ่มของข้อมูลสารสนเทศที่สัมพันธ์กัน ที่กำหนดโดยผู้ที่สร้างไฟล์ขึ้นมา • ไฟล์เป็นได้ทั้งโปรแกรมและข้อมูล

  9. การจัดการไฟล์ (File Management)

  10. การจัดการระบบรับส่งข้อมูล (I/O Management)

  11. การจัดการหน่วยความจำรอง (Secondary-Storage Management)

  12. การจัดการหน่วยความจำรอง (Secondary-Storage Management)

  13. เครือข่าย(Networking)

  14. เครือข่าย(Networking) • การเข้าถึงทรัพยากรต่างๆ ที่แบ่งปันได้มากมาย ทำให้ • มีความเร็วในการคำนวณสูงขึ้น • เพิ่มข้อมูลให้สามารถใช้งานได้มากขึ้น • เพิ่มความน่าเชื่อถือให้แก่ระบบ

  15. ระบบป้องกัน(Protection System)

  16. ระบบการแปลคำสั่ง(Command-Interpreter System)

  17. โครงสร้างของระบบปฏิบัติการโครงสร้างของระบบปฏิบัติการ • สภาพแวดล้อมของระบบ (Environment) • บริการของระบบ (Operating SystemService) • การเรียกระบบ (System Calls) • สถาปัตยกรรมของระบบ (Operating SystemArchitecture)

  18. สภาพแวดล้อมของระบบ (Environment) • ขึ้นกับโครงสร้างของระบบว่าต้องการสภาพแวดล้อมแบบใด จึงสามารถทำงานได้เต็มประสิทธิภาพ

  19. บริการของระบบปฏิบัติการ (Operating System Service)

  20. บริการของระบบปฏิบัติการ (Operating – System Service)

  21. หน้าที่เพิ่มเติมของระบบปฏิบัติการ (Additional Operating System Function)

  22. A View of Operating System Services

  23. User Operating System Interface - CLI CLI or command interpreterallows direct command entry • Sometimes implemented in kernel, sometimes by systems program • Sometimes multiple flavors implemented – shells • Primarily fetches a command from user and executes it • Sometimes commands built-in, sometimes just names of programs • If the latter, adding new features doesn’t require shell modification

  24. User Operating System Interface - GUI • User-friendly desktop metaphor interface • Usually mouse, keyboard, and monitor • Icons represent files, programs, actions, etc • Various mouse buttons over objects in the interface cause various actions (provide information, options, execute function, open directory (known as a folder) • Invented at Xerox PARC • Many systems now include both CLI and GUI interfaces • Microsoft Windows is GUI with CLI “command” shell • Apple Mac OS X is “Aqua” GUI interface with UNIX kernel underneath and shells available • Unix and Linux have CLI with optional GUI interfaces • (CDE, KDE, GNOME)

  25. Touchscreen Interfaces • Touchscreen devices require new interfaces • Mouse not possible or not desired • Actions and selection based on gestures • Virtual keyboard for text entry • Voice commands.

  26. The Mac OS X GUI

  27. System Calls • Programming interface to the services provided by the OS • Typically written in a high-level language (C or C++) • Mostly accessed by programs via a high-level Application Programming Interface (API)rather than direct system call use • Three most common APIs are Win32 API for Windows, POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM)

  28. Example of System Calls • System call sequence to copy the contents of one file to another file

  29. Example of Standard API

  30. System Call Implementation • Typically, a number associated with each system call • System-call interface maintains a table indexed according to these numbers • The system call interface invokes the intended system call in OS kernel and returns status of the system call and any return values • The caller need know nothing about how the system call is implemented • Just needs to obey API and understand what OS will do as a result call • Most details of OS interface hidden from programmer by API • Managed by run-time support library (set of functions built into libraries included with compiler)

  31. API – System Call – OS Relationship

  32. System Call Parameter Passing • Often, more information is required than simply identity of desired system call • Exact type and amount of information vary according to OS and call • Three general methods used to pass parameters to the OS • Simplest: pass the parameters in registers • In some cases, may be more parameters than registers

  33. System Call Parameter Passing • Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register • This approach taken by Linux and Solaris • Parameters placed, or pushed, onto the stackby the program and poppedoff the stack by the operating system • Block and stack methods do not limit the number or length of parameters being passed

  34. System Call Parameter Passing

  35. ประเภทของคำสั่งเรียกระบบ

  36. ตารางแสดงประเภทของคำสั่งเรียกระบบ (Types of system calls)

  37. ตารางแสดงประเภทของคำสั่งเรียกระบบ (Types of system calls)

  38. ตารางแสดงประเภทของคำสั่งเรียกระบบ (Types of system calls)

  39. ตารางแสดงประเภทของคำสั่งเรียกระบบ (Types of system calls)

  40. ตารางแสดงประเภทของคำสั่งเรียกระบบ (Types of system calls)

  41. ตารางแสดงประเภทของคำสั่งเรียกระบบ (Types of system calls)

  42. Examples of Windows and Unix System Calls

  43. Standard C Library Example • C program invoking printf() library call, which calls write() system call

  44. Example: MS-DOS • Single-tasking • Shell invoked when system booted • Simple method to run program • No process created • Single memory space • Loads program into memory, overwriting all but the kernel • Program exit -> shell reloaded At system startup running a program

  45. Example: FreeBSD • Unix variant • Multitasking • User login -> invoke user’s choice of shell • Shell executes fork() system call to create process • Executes exec() to load program into process • Shell waits for process to terminate or continues with user commands • Process exits with: • code = 0 – no error • code > 0 – error code

  46. โปรแกรมระบบ (System Programs)

  47. โปรแกรมระบบ (System Programs)

  48. โปรแกรมระบบ (System Programs)

  49. Operating System Design and Implementation • Design and Implementation of OS not “solvable”, but some approaches have proven successful • Internal structure of different Operating Systems can vary widely • Start the design by defining goals and specifications • Affected by choice of hardware, type of system

  50. Operating System Design and Implementation • User goals and System goals • User goals – operating system should be convenient to use, easy to learn, reliable, safe, and fast • System goals – operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient

More Related