OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 1
Agenda Kernel Data Structures User Operating System Interface System Calls Types of System Calls System Programs Operating System Structure Operating-System Debugging
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 2
KERNEL DATA STRUCTURES
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 3
Kernel Data Structures Many similar to standard programming data structures Singly linked list
Doubly linked list
Circular linked list
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 4
Kernel Data Structures Binary search tree left <= right
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 5
Kernel Data Structures Hash function takes data as its input, performs a numeric operation on this data, and returns a numeric value. تأخذ البيانات كمدخالت وتنفذ عليها عمليات عددية وترجع قيمة عددية Hash function can create a hash map
Bitmap – string of n binary digits representing the status of n
items من االشياءn من االرقام الثنائية تمثل حالةn نص مكون من
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 6
USER OPERATING SYSTEM INTERFACE
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 7
User Operating System Interface - CLI CLI or command interpreter allows 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 وأحيانًا أسماء البرامج فقط، في بعض األحيان أوامر مدمجة
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 8
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) ى اتخاذ إجراءاتxxة إلxxي الواجهxxة فوق الكائنات الموجودة فxxتؤدي أزرار الماوس المختلف ) فتح مجلد (المعروف باسم المجلد، تنفيذ دوال، والخيارات، مختلفة (توفير المعلومات
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 9
User Operating System Interface - GUI 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)
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 10
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
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 11
SYSTEM CALLS
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 12
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 نx) بدالً مAPI( توىxة المسxبيقات عاليxج التطxة برامxبر واجهxا عxول إليهxم الوصx يت، بxي الغالxف استخدام استدعاء النظام المباشر 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) و، كسxة بوسx لالنظمPOSIX API ، للويندوزWin32 API يxا هxر شيوعx اكثAPI الثالث للجافاJava API
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 13
Types of System Calls Process controlلعملياتxxاxxx بxلتحكمxxا • create process, terminate process اء عمليةxنهxنشاء او اxا • end, abort اءxلغxx ا، اءxنهxا • load, execute نفيذxxx ت،حميلxxxت • get process attributes, set process attributes سنادxلحصولعلىخصائصاو اxxا لعمليةxxخصائصل • wait for timeلوقتxxبعضاxxالنتظار لxxا • wait event, signal eventحدثxxالنتظار لxxا • allocate and free memory كرةxلذاxxحرير اxxxخصيصاو تxxxت • Dump memory if error الخطاءxxلة اxxاxيحxxxكرة فxلذاxx اxفريغxxxت • Debugger for determining bugs, single step executionتحديدxx لxلتتبعxxا الخطاءxxا • Locks for managing access to shared data between processes لxxقفاxأ لعملياتxxيناxxxلمشتركة بxxلبياناتاxxلىاxxلوصولإxxدارة اxإل
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 14
Types of System Calls File managementلملفاتxxادارة ا • create file, delete file لملفاتxxذفاxنشاء حxا • open, close file لملفاتxxغالقاxتح او اxxxف • read, write, repositionديلxلتعxxلكتابة واxxراءة واxلقxxا • get and set file attributesلملفاتxx خصائصلxلحصولاو وضعxxا Device management زةxالجهxxادارة ا • request device, release device xحريرهxxxاز او تxطلبجه • read, write, repositionديلxلتعxxراءة او اxلقxxلكتابة او اxxا • get device attributes, set device attributesعيينxxxلحصولاو تxxا زةxألجهxxخصائصل • logically attach or detach devices زةxألجهxxلفصللxxالرفاقاو اxxا OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 15 Types of System Calls (Cont.) Information maintenanceلمعلوماتxxيانة اxxص • get time or date, set time or date لتاريخxxلوقتاو اxxعييناxxxلحصولاو تxxا • get system data, set system data xلنظامxxياناتاxxxعيينبxxxلحصولاو تxxا • get and set process, file, or device attributes عيينخصائصxxxلحصولاو تxxا زةxالجهxx ا،لملفxx ا، لعمليةxxا Communicationsصلxلتواxxا • create, delete communication connectionلxxالتصاxxذفاxنشاء او حxا • send, receive messages if message passing model to host name or process name xسمxلىاxxلرسائلاxxمرير اxxxيطريقة تxxxلرسائلفxx اxستالمxلواxxارسا لضيفxxلعملية او اxxا • Shared-memory model create and gain access to memory regions • transfer status information لةxxلحاxxلمعلوماتاxxنتقاxا • attach and detach remote devices لبعيدةxxزة اxألجهxxإرفاقوفصلا OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 16 Types of System Calls (Cont.) Protection لحمايةxxا • Control access to resources لمواردxxلوصوللxxاxxx بxلتحكمxxا • Get and set permissionsالذوناتxxعييناxxxلحصولاو تxxا • Allow and deny user access وصولxلسماح او منعxxا xلمستخدمxxا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 17
Examples of Windows and Unix System Calls
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 18
Standard C Library Example C program invoking printf() library call, which calls write() system call منprintf تستخدم الدالةC لغة ال منwrite المكتبة والتي تستدعي ال استدعاء النظام
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 19
A View of Operating System Services
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 20
SYSTEM PROGRAMS
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 21
System Programs System programs provide a convenient environment for program development and execution. مج وتنفيذهاxلبراxxتطوير اxxيئة مالئمة لxxx بxلنظامxxمج اxراxxxوفر بxxxت. They can be divided into:لىxxا اxقسيمهxxxمكنتxx يxلنظامxxمج اxراxxxب • File manipulationلملفاتxxلجة اxxاxمع • Status information sometimes stored in a File modification لةxxلحاxxمعلوماتا • Programming language support لبرمجةxxاتاxغxx لxدعم • Program loading and execution مجxلبراxxحميلوتنفيذ اxxxت • Communicationsلxxالتصاxxا • Background services لخلفيةxxدماتاxخ • Application programs لتطبيقاتxxمج اxراxxxب Most users’ view of the operation system is defined by system programs, not the actual system calls xنظامxxلمستخدمينلxx اxحديد رؤية معظمxxx تxتمxxي لفعليةxx اxلنظامxxتاxستدعاءاx وليسا، xلنظامxxمج اxراxxxلبxلتشغيلمنخالxxا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 22
System Programs Some of System Programs are simply user interfaces to system calls; others are considerably more complex هيxلنظامxx اxمجxراxxxعضبxxxب عقي ًداxxxكثر تxآلخر أxxلبعضاxx ؛ اxلنظامxxتاxستدعاءاx الxلمستخدمxxاتاxجهxبساطة واxxxب File management - Create, delete, copy, rename, print, dump, list, and generally manipulate files and directories Status information • Some ask the system for info - date, time, amount of available memory, disk space, number of users- معلوماتxلنظامxxلبعضمناxxطلباxxي لمستخدمينxxلقرصوعدد اxxلمتوفرة ومساحة اxxكرة اxلذاxxلوقتومقدار اxxلتاريخ واxxا • Others provide detailed performance, logging, and debugging information ألخطاءxxلتسجيلوتصحيح اxxألداء واxxآلخر معلوماتمفصلة عناxxلبعضاxxوفر اxxي • Typically, these programs format and print the output to the terminal or other output devices تنسيقوطباعةxxx بxمجxلبراxx اx هذهxومxقxxxادةً ما تxع ألخرىxxج اxإلخراxxزة اxجهxاز أو أxلجهxxلىاxxج إxإلخراxxا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 23
System Programs (Cont.) File modification • Text editors to create and modify files نشاءxلنصوصإلxxحرير اxxxمج تxراxxxب لملفاتxxديلاxوتع • Special commands to search contents of files or perform transformations of the text جراءxلملفاتأو إxxيمحتوياتاxxxلبحثفxxاصة لxمر خxأوا لنصxxحويالتعلىاxxxت Programming-language support - Compilers, assemblers, debuggers and interpreters sometimes provided ، xلمترجمxxوفير اxxx تxتمxxي لمفسرxx ا، xلمتتبعxx ا، xلمجمعxxا Program loading and execution- Absolute loaders, relocatable loaders, linkage editors, and overlay-loaders, debugging systems for higher-level and machine language ،لنقلxxلقابلة لxxلمحملاxx ا، لمطلقةxxلمحملاxxا آللةxxة اxألعلىولغxxلمستوىاxxلتصحيح لxxنظمة اx وأ، كبةxلمتراxxلمحملاxx وا، لربطxxتاxومحررا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 24
System Programs (Cont.) Communications - Provide the mechanism for creating virtual connections among processes, users, and computer systems رxوفيxxxت لكمبيوترxxنظمة اxلمستخدمينوأxxلعملياتواxxيناxxxضية بxالفتراxxالتاxxالتصاxxنشاء اxلية إxxآ • Allow users to send messages to one another’s screens, browse web pages, send electronic-mail messages, log in remotely, transfer files from one machine to another تخدمينxلمسxxماح لxلسxxا لxxاx وإرس،بxلويxxفحاتاxxفح صx وتص،ضxلبعxx اxمxعضهxxxاشاتبxxلىشxxائلإxلرسxxلاxxاxإرسxxxب خرxلىآxxاز إxاتمنجهxلملفxx ونقلا، دxعxxxلدخولعن ُبxx وتسجيلا،لكترونيxإلxxلبريد اxxرسائلا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 25
System Programs (Cont.) Background Services • Launch at boot time القالعxxطلقوقتاxxxت • Some for system startup, then terminate xمxxx ث، xلنظامxxشغيلاxxxبدء تxxا لxعضهxxxب نتهيxxxت • Some from system boot to shutdown طفاءx وحتىا،القالعxxا منذ اxعضهxxxب ازxلجهxxا • Provide facilities like disk checking, process scheduling, error logging, printing ألخطاءxxلعملياتوتسجيلاxxلقرصوجدولة اxxحصاxxxسهيالتمثلفxxxوفير تxxxت لطباعةxxوا • Run in user context not kernel context لنواةxx وليساxلمستخدمxxياقاxxيسxxxشتغلفxxxت • Known as services, subsystems لفرعيةxxالنظمة اxxلخدماتاو اxx اxاسمxxxرفبxعxxxت Application programs
• Don’t pertain to system xلنظامxxاxxxتعلقبxxx تxال
• Run by users xلمستخدمxxسطة اxواxxxذ بxنفxxxت • Not typically considered part of OSلتشغيلxx اxظامxxز ًءا مننxادةً جxعتبر عxxx تxال • Launched OPERATING SYSTEMS– AL-NASSER by command line,UNIVERSITY 02/26/2022 mouse click, finger poke عنxشغيلهxxxت xتمxxي 26 OPERATING SYSTEM DESIGN AND IMPLEMENTATION
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 27
Operating System Design and Implementation Design and Implementation of OS not “solvable”, but some approaches have proven successful ذxx وتنفيxميمxxصxxxت اxجاحهxxليبنxxألساxxعضاxxxثبتتبx ولكنأ، "لحلxxابللxxلتشغيلغير "قxx اxظامxxن Internal structure of different Operating Systems can vary widelyىxة علxلمختلفxxلاxلتشغيxxة اxنظمxيألxخلxلداxxلاxلهيكxxفاxختلxxنيxنأxمكxxي xسعxطاقواxxن Start the design by defining goals and specifications بدأxا صفاتxلمواxxفواxألهداxxتحديد اxxx بxلتصميمxxا The Design is affected by choice of hardware, type of system xلنظامxxلمادية ونوع اxxلمكوناتاxxاختيار اxxx بxلتصميمxxتأثر اxxي
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 28
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بxجxx ي- xتخدمxسxلمxxفاxهداxأ اxوسريع ً منًاx وموثوقًا وآxلتعلمxx وسهلاxمxالستخداxxلتشغيلمناسبًا لxx اxظامxxكوننxxنيxأ • System goals – operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient لxيxلتشغxx اxظامxxوننxكxxنيxبأxجxx ي- xلنظامxxفاxهداxأ ةxxوثوقيxلمxxة واxxلمرونxxىاxلxxة إxxإلضافxxاxxx ب، يانةxxلصxxذ واxxلتنفيxx واxميمxxلتصxxهلاxxxس ليةxxاxلفعxxألخطاء واxxليمناxxوخا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 29
Implementation Much variation بيرxختالفكxا • Early OSes in assembly language xلتجميعxxة اxغxxيلxxxلمبكرة هيفxxلتشغيلاxxنظمة اxأ • Then system programming languages like Algol, PL/1 (The first system) • Now C, C++ Actually usually a mix of languagesاتxللغxx هيمزيج مناxقعxلواxxياxxxف • Lowest levels in assembly xلتجميعxxة اxلغxxxألدنىبxxلمستوياتاxxا • Main body in Cلسيxxة اxلغxxxلرئيسيبxx اxلجسمxxا • Systems programs in C, C++, scripting languages like PERL, Python, shell scriptsلبايثونxxلبيرلواxxلنصية مثلاxxلبرمجة اxxاتاxالسولغxxxلسيبxxلسيواxxاتاxلغxxxألنظمة بxxمج اxراxxxب Emulation (Virtualization) can allow an OS to run on non-native hardware صليةxزة غير أxجهxلعملعلىأxxاxxxلتشغيلبxx اxنظامxxلسماح لxxمكناxxx ت: لمحاكاةxxا Emulators are programs that duplicate the functionality of one system on another system خرx آxظامxx ما علىنxظامxxوظائف ن كررxxxمج تxراxxxلمحاكياتهيبxxا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 30
OPERATING SYSTEM STRUCTURE
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 31
Operating System Structure General-purpose OS is very large program لxxxلتشغيxx اxظامxxن ًداxبير جxxج كxرنامxxxامة هو بxلعxxضاxألغراxxل A common approach is to partition the task into small components, or modules, rather than have one monolithic system.،تxو وحداx أ، غيرةxxوناتصxلىمكxxة إxلمهمxx اxيمxقسxxxيتxة هxxلشائعxxة اxلطريقxxا ً بطxحد متراx واxظامxxا نxهx ونلxكxxنيxدال منأxxxب. Various ways to structure ones ةxطرقمختلف • Simple structure – MS-DOS سيطةxxxهيكلية ب • More complex – UNIX هيكلية معقدة • Layered –طبقات • Microkernel –Mach لصغيرةxxلنواة اxxا OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 32 Simple Structure -- MS-DOS MS-DOS was written in Intel 8088 assembly language. لدوسxxة اxxxتابxتكxxمxxxت xلتجميعxxة اxلغxxxب MS-DOS – written to provide the most functionality in the least space لxقxيأxxxففxلوظائxxدر مناxxبر قxكxر أxتوفيxxمكتوب ل لدوسxxا مساحة • Not divided into modules رxxغي تxلىوحداxxمقسمة إ • Although MS-DOS has some structure, its interfaces and levels of functionality are not well separatedةxنيxxx بxهxxلدوس لxxناx منأxلرغمxxىاxعل تxيسxx لxهxتوياتوظيفتx ومسxهxاتxجهxنواxالأxx إ، اxم منفصلة جي ًدا OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 33 Non Simple Structure -- UNIX UNIX – limited by hardware functionality, the original UNIX operating system had limited structuring. The UNIX OS consists of two separable partsزئيينxلىجxx اxنقسمxxي منفصلين • Systems programsxلنظامxxمج اxراxxxب • The kernelلنواةxxا • Consists of everything below the system-call interface and above the physical hardware ةxجهxسفلواxيء أx لشxتكونمنكxxي لماديةxxزة اxألجهxx وفوقاxلنظامxxستدعاء اxا • Provides the file system, CPU scheduling, memory management, and other operating-system functions. كرة ووظائفxلذاxxلمركزية وإدارة اxxلجة اxxاxلمعxxلملفاتوجدولة وحدة اxx اxظامxxوفر نxxي ألخرىxxلتشغيلاxx اxظامxxن OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 34 Traditional UNIX System Structure
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 35
Layered Approach The operating system is divided into a number of layers (levels), each built on top of lower layers.لىxxلتشغيلإxx اxظامxx نxنقسمxxي لسفليةxxلطبقاتاxxوقاxxxا مبنيفxلمنهx ك، مستويات ) لxxلطبقات(اxxدد مناxع The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.ألعلىهيxxلماديواxxلعتاد اxxلسفلية هياxxلطبقة اxxا xلمستخدمxxة اxجهxوا layers are selected such that each uses functions (operations) and services of only lower-level layers حديدxxx تxتمxxي قطxxxألدنىفxxلمستوىاxxاتاxطبقxxت وظائفعملياتوخدما ل ) ( اxلمنهx كxستخدمxxحيثيxxxاتبxلطبقxxا The major difficulty with the layered approach involves appropriately defining the various layers. لرئيسيةxxوبة اxلصعxxتضمناxxxت شكلمناسبxxxلمختلفة بxxاتاxلطبقxxريفاxعxxxاتهو تxلطبقxxهج اxxينxxxف.
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 36
Layered Approach
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 37
Microkernel System Structure as UNIX expanded, the kernel became large and difficult to manage. سxلونكxx اxعxوسxxx تxعxم إلدارةxxبيرة وصعبة اxلنواة كxxصبحتاxأ. In the mid-1980s, researchers developed an operating system called Mach that modularized the kernel using the microkernel approach. جxتخدام نهxط النواة باسx والذي نمMach مىxل يسx طور الباحثون نظام تشغي، يxن القرن الماضxف الثمانينيات مxي منتصxف .microkernel This method structures the operating system by removing all nonessential components from the kernel and implementing them as system and user-level programs. ىxبرامج علxا كxن النواة وتنفيذهxاسية مxر األسxع المكونات غيxة جميxق إزالxن طريxل عxة ببناء نظام التشغيxتقوم هذه الطريق .مستوى النظام والمستخدم The main function of the microkernel is to provide communication between the client program and the various services that are also running in user space. يxا فxض ً ل أيxي تعمxة التxل والخدمات المختلفxج العميxن برنامxال بيxر االتصxي توفيx فmicrokernel ية لـxة الرئيسxل الوظيفxتتمث .مساحة المستخدم Communication takes place using message passing لرسائلxxمرير اxxx تxمxاستخداxxxلبxxالتصاxx اxتمxxي
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 38
Microkernel System Structure
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 39
Microkernel System Structure Benefits: ئدxلفواxxا • Easier to extend a microkernel واةxxتمديد نxxسهللxأ • Easier to port the operating system to new architecturesلxقx ينxxxهلفxسxأ لجديدةxxلبنىاxxلىاxxلتشغيلإxx اxظامxxن • More reliable (less code is running in kernel mode)ةxxر موثوقيxxكثxأ لنواةxx اxيوضعxxxقلفxود أxشغيلكxxxت • More secure مناxكثر اxا Detriments: الضرارxxا • Performance overhead of user space to kernel space communication لنواةxx ومساحة اxلمستخدمxxينمساحة اxxxصلبxلتواxxب اداء ا عء • Example: Windows NT
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 40
Hybrid Systems Most modern operating systems are actually not one pure model لصًاxxاxح ًدا خxموذجًا واxx نxقعxلواxxياxxxيستفxxلحديثة لxxلتشغيلاxxنظمة اx أxمعظم • Hybrid combines multiple approaches to address performance, security, usability needsددةxينطرقمتعxxx بxجمعxxي xمxالستخداxxألمانوقابلية اxxألداء واxxحتياجاتاxلجة اxxاxمعxxل • Linux kernel is monolithic, plus modular for dynamic loading of functionalityتxلىوحداxxإلضافة اxxاxxxللينكسمتجانسة بxxواة اxxن لوظائفxxلديناميكيلxxلتحميلاxxل • Windows mostly monolithic, plus microkernel for different subsystem personalities.لبمتجانسxxاxلغxxياxxxلويندوز فxxا رعية مختلفةxxxنظمة فxة ألxلدقيقxxلنواة اxxتاxلىوحداxxإلضافة اxxاxxxب
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 41
OPERATING-SYSTEM DEBUGGING
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 42
Operating-System Debugging Debugging is finding and fixing errors, or bugs اxصالحهxالخطاء واxxلبحثعناxx هو اxلتتبعxxا OS generate log files containing error informationإنشاء ملفاتxxx بxقومxxليxلتشغيxx اxظامxxن الخطاءxxحتويعلىمعلوماتاxxxت Failure of an application can generate core dump file capturing memory of the process لعمليxxكرة اxذاxxساسيلx أxفريغxxxنشاء ملفتxلىإxxؤديإxxلتطبيقاتيxxحد اxشلأxxxف Operating system failure can generate crash dump file containing kernel memory لنواةxxكرة اxحتوىذاxxلعطليxxنشاء ملفاxلىإxxؤديإxxلتشغيل يxx اxظامxxشلنxxxف Beyond crashes, performance tuning can optimize system performance عي ًدا عنxxxب xلنظامxxحسينأداء اxxxألداء تxxضبط اxxمكنلxx ي،لxxألعطاxxا • Sometimes using trace listings of activities, recorded for analysisضxعxxxيبxxxف لتحليلxxلمسجلة لxx ا، ألنشطةxx لxلتتبعxx اxئمxواxx قxمxاستخداxxxألحيانبxxا • Profiling is periodic sampling of instruction pointer to look for statistical trends إلحصائيةxxالتجاهاتاxxلبحثعناxxلتعليماتلxxمؤشر اxxخذ عيناتدورية لxلتوصيفهو أxxا
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 43
Operating-System Debugging Control Panel\System and Security\Administrative Tools - event viewer
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 44
Performance Tuning Improve performance by removing bottlenecks ألداءxxيناxحسxxxت الختناقاتxxلة اxxعنطريقإزا OS must provide means of computing and displaying measures of system behaviorبxجxxي ابxxxحسxxائللxxxلوسxxxلتشغيxx اxظامxxر نxxxوفxxنيxxxأ xلنظامxxلوك اxxوعرضمقاييسس For example, Windows Task Manager
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 45
The End
OPERATING SYSTEMS– AL-NASSER UNIVERSITY 02/26/2022 46