SlideShare a Scribd company logo
1 of 46
Operating Systems
‫التشغيل‬ ‫نظم‬
‫رقم‬ ‫المحاضرة‬
2
Operating-System
Structures
10/1/2022 1
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Agenda
 Computer-System Organization
• Interrupt
• Storage Structure
• I/O Structure
 Computer-System Architecture
• Single-Processor
• Multi-Processors
• Clustered System
 Operating-System Operations
• Multi-Programming and Multi-Tasking
• Dual Mode
 Resource Management
• Process Management
• Memory Management
• Storage Management
• Protection and Security
10/1/2022 2
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
COMPUTER-SYSTEM
ORGANIZATION
10/1/2022 3
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Computer System Structure
 Computer system can be divided into four components:
• Hardware – provides basic computing resources
• CPU, memory, I/O devices
• Operating system
• Controls and coordinates use of hardware among various
applications and users
• Application programs – define the ways in which the system
resources are used to solve the computing problems of the users
• Word processors, compilers, web browsers, database systems,
video games
• Users
• People, machines, other computers
10/1/2022 4
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Computer System
 “The one program running at all times on the
computer” is the kernel.
 Everything else is either
• a system program (ships with the operating system) ,
or
• an application program.
10/1/2022 5
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Computer Startup
 Bootstrap program is loaded at power-up or reboot
• Typically stored in ROM or EPROM, generally
known as firmware
• Initializes all aspects of system
• Loads operating system kernel and starts
execution
10/1/2022 6
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Computer System Organization
 Computer-system operation
• One or more CPUs, device controllers connect through
common bus providing access to shared memory
• Concurrent execution of CPUs and devices competing for
memory cycles
10/1/2022 7
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
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
‫المعالج‬
‫ينقل‬
‫البيانات‬
‫من‬
‫والى‬
‫الذاكرة‬
‫من‬
‫والى‬
‫المخزن‬
‫الداخلي‬
 Device controller informs CPU that it has finished its operation by
causing an interrupt
‫المتحكم‬
‫يعلم‬
‫المعالج‬
‫بانتهاء‬
‫عمله‬
‫باستحداث‬
‫قاطع‬
10/1/2022 8
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Common Functions of Interrupts
 The occurrence of an event is usually signaled by an interrupt
from either the hardware or the software.
‫ظهور‬
‫حدث‬
‫عادة‬
‫يشار‬
‫اليه‬
‫بالمقاطعة‬
‫سواء‬
‫من‬
‫الهاردوير‬
‫او‬
‫السوفتوير‬
 Hardware may trigger an interrupt at any time by sending a signal
to the CPU, usually by way of the system bus.
‫قد‬
‫تتسبب‬
‫األجهزة‬
‫في‬
‫حدوث‬
‫مقاطعة‬
‫في‬
‫أي‬
‫وقت‬
‫عن‬
‫طريق‬
‫إرسال‬
‫إشارة‬
‫إلى‬
‫وحدة‬
‫المعالجة‬
‫المركزية‬
،
ً
‫عادة‬
‫عن‬
‫طريق‬
‫ناقل‬
‫النظام‬
.
 Software may trigger an interrupt by executing a special operation
called a system call (also called a monitor call).

‫قد‬
‫يتسبب‬
‫البرنامج‬
‫في‬
‫حدوث‬
‫مقاطعة‬
‫عن‬
‫طريق‬
‫تنفيذ‬
‫عملية‬
‫خاصة‬
‫تسمى‬
‫ا‬
‫ستدعاء‬
‫النظام‬
(
‫تسمى‬
‫ا‬‫أيض‬
‫مكالمة‬
‫الشاشة‬
)
.
10/1/2022 9
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Common Functions of Interrupts
 Interrupts are an important part of a computer architecture.
‫المقاطعات‬
‫هي‬
‫جزء‬
‫مهم‬
‫من‬
‫معمارية‬
‫الكمبيوتر‬
.
 Each computer design has its own interrupt mechanism, but several functions are
common.
‫كل‬
‫تصميم‬
‫كمبيوتر‬
‫له‬
‫آليه‬
‫المقاطعة‬
‫الخاصة‬
‫به‬
،
‫ولكن‬
‫هناك‬
‫العديد‬
‫من‬
‫الوظائف‬
‫الشائعة‬
.
 Interrupt transfers control to the interrupt service routine generally, through the
interrupt vector, which contains the addresses of all the service routines
‫تنقل‬
‫المقاطعة‬
‫التحكم‬
‫إلى‬
‫روتين‬
‫خدمة‬
‫المقاطعة‬
‫بشكل‬
‫عام‬
،
‫من‬
‫خالل‬
‫ناقل‬
‫المقاطعة‬
،
‫الذي‬
‫يحتوي‬
‫على‬
‫عناو‬
‫ين‬
‫جميع‬
‫إجراءات‬
‫الخدمة‬
 Interrupt architecture must save the address of the interrupted instruction
‫يجب‬
‫أن‬
‫تحفظ‬
‫بنية‬
‫المقاطعة‬
‫عنوان‬
‫التعليمات‬
‫التي‬
‫تمت‬
‫مقاطعتها‬
.
 A trap or exception is a software-generated interrupt caused either by an error or a user
request
‫االعتراض‬
‫أو‬
‫االستثناء‬
‫هو‬
‫مقاطعة‬
‫ينتج‬
‫عن‬
‫البرامج‬
‫إما‬
‫عن‬
‫حدوث‬
‫خطأ‬
‫أو‬
‫طلب‬
‫مستخدم‬
 An operating system is interrupt driven
‫نظام‬
‫التشغيل‬
‫هو‬
‫معتمد‬
‫على‬
‫المقاطعة‬
10/1/2022 10
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Interrupt Handling
 The operating system preserves the state of the
CPU by storing registers and the program counter
‫يحافظ‬
‫نظام‬
‫التشغيل‬
‫على‬
‫حالة‬
‫المعالج‬
‫من‬
‫خالل‬
‫تخزين‬
‫الس‬
‫جالت‬
‫وعداد‬
‫البرنامج‬
.
 Separate segments of code determine what action
should be taken for each type of interrupt
‫تعليمات‬
‫برمجية‬
‫منفصلة‬
‫تحدد‬
‫اإلجراء‬
‫الذي‬
‫يجب‬
‫اتخاذه‬
‫لك‬
‫ل‬
‫نوع‬
‫من‬
‫أنواع‬
‫المقاطعة‬
10/1/2022 11
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Interrupt Timeline
10/1/2022 12
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
STORAGE STRUCTURE
10/1/2022 13
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Storage Structure
 Main memory – only large storage media that the CPU can access directly
‫الذاكرة‬
‫الرئيسية‬
:
‫وسيط‬
‫تخزين‬
‫يستطيع‬
‫المعالج‬
‫الوصول‬
‫اليه‬
‫مباشرة‬
• Random access
• Typically volatile
 Secondary storage – extension of main memory that provides large nonvolatile storage
capacity
‫الذاكرة‬
‫الثانوية‬
:
‫امتداد‬
‫للذاكرة‬
‫الرئيسية‬
‫ولها‬
‫سعة‬
‫عالية‬
‫غير‬
‫متطايرة‬
 Hard 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
 Solid-state disks – faster than hard disks, nonvolatile
• Various technologies
• Becoming more popular
10/1/2022 14
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Storage Hierarchy
 Storage systems organized in hierarchy
• Speed
• Cost
• Volatility
 Caching – copying information into faster storage
system; main memory can be viewed as a cache for
secondary storage
 Device Driver for each device controller to
manage I/O
• Provides uniform interface between controller and kernel
10/1/2022 15
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Storage-Device Hierarchy
10/1/2022 16
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
PC Structure - Memory Hierarchy

‫تتكونًهرميةًالذاكرةًمنًالتالي‬
:
•
ً‫المسجالت‬
registers
•
ً‫الذاكرةًالمخبأة‬
)
‫الكاش‬
(
cache
•
ً‫الذاكرةًالرئيسية‬
)
‫الرام‬
(
main memory
•
ًٍ‫الذاكرةًالثانوية‬
Secondary Memory
10/1/2022 17
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
PC Structure - Memory Hierarchy
10/1/2022 18
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
PC Structure - Memory Hierarchy

ً‫هنالكًعواملًتؤثرًفيًهرميةًالذاكرةًهي‬
:
•
‫التطاير‬
volatility
•
‫السرعة‬
Speed
•
‫السعة‬
Capacity
•
‫السعر‬
Price
10/1/2022 19
‫التطاير‬ ‫زيادة‬
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
PC Structure - Memory
10/1/2022 20
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Caching
 Important principle, performed at many levels in a computer (in
hardware, operating system, software)
‫مصطلح‬
‫مهم‬
‫يوجد‬
‫في‬
‫اكثر‬
‫من‬
‫مستوى‬
‫في‬
‫الكمبيوتر‬
 Information in use copied from slower to faster storage temporarily
‫المعلومات‬
‫المستخدمة‬
‫تنسخ‬
‫من‬
‫التخزين‬
‫االبطا‬
‫الى‬
‫االسرع‬
‫موقتا‬
 Faster storage (cache) checked first to determine if information is there
• If it is, information used directly from the cache (fast)
• If not, data copied to cache and used there
 Cache smaller than storage being cached
• Cache management important design problem
• Cache size and replacement policy
10/1/2022 21
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
I/O STRUCTURE
10/1/2022 22
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Direct Memory Access Structure
 Used for high-speed I/O devices able to transmit
information at close to memory speeds
 Device controller transfers blocks of data from
buffer storage directly to main memory without
CPU intervention
 Only one interrupt is generated per block, rather
than the one interrupt per byte
10/1/2022 23
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
A von Neumann architecture
How a Modern Computer Works
10/1/2022 24
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
COMPUTER-SYSTEM
ARCHITECTURE
10/1/2022 25
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Computer-System Architecture
 Most systems use a single general-purpose processor
• Most systems have special-purpose processors as well
 Multiprocessors systems growing in use and importance
• Also known as parallel systems, tightly-coupled systems
• Advantages include:
• Increased throughput
• Economy of scale
• Increased reliability – graceful degradation or fault tolerance
• Two types:
• Asymmetric Multiprocessing – each processor is assigned a specific
task.
• Symmetric Multiprocessing – each processor performs all tasks
10/1/2022 26
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Symmetric Multiprocessing Architecture
10/1/2022 27
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
A Dual-Core Design
10/1/2022 28
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Clustered Systems
 Like multiprocessor systems, but multiple systems working
together
• Usually sharing storage via a storage-area network (SAN)
• Provides a high-availability service which survives failures
•Asymmetric clustering has one machine in hot-standby
mode
•Symmetric clustering has multiple nodes running
applications, monitoring each other
• Some clusters are for high-performance computing (HPC)
•Applications must be written to use parallelization
10/1/2022 29
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Clustered Systems
10/1/2022 30
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
OPERATING-SYSTEM
OPERATIONS
10/1/2022 31
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Operating System Structure
 Multiprogramming (Batch system) needed for efficiency
• Single user cannot keep CPU and I/O devices busy at all times
• Multiprogramming organizes jobs (code and data) so CPU always has one to
execute
• A subset of total jobs in system is kept in memory
• One job selected and run via job scheduling
• When it has to wait (for I/O for example), OS switches to another job
 Timesharing (multitasking) is logical extension in which CPU switches jobs so
frequently that users can interact with each job while it is running, creating
interactive computing
• Response time should be < 1 second
• Each user has at least one program executing in memory process
• If several jobs ready to run at the same time  CPU scheduling
• If processes don’t fit in memory, swapping moves them in and out to run
• Virtual memory allows execution of processes not completely in memory
10/1/2022 32
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Operating-System Operations
 Interrupt driven (hardware and software)
• Hardware interrupt by one of the devices
‫مقاطعة‬
‫الهاردوير‬
‫تكون‬
‫بواسطة‬
‫احد‬
‫االجهزة‬
• Software interrupt (exception or trap):
• Software error (e.g., division by zero)
‫اخطاء‬
‫البرامج‬
• Request for operating system service
‫طلب‬
‫خدمة‬
‫من‬
‫نظام‬
‫التشغيل‬
• Other process problems include infinite loop, processes
modifying each other or the operating system
‫مشاكل‬
‫العمليات‬
‫االخرى‬
‫المتضمنة‬
‫التكرار‬
‫الالنهائي‬
،
‫تعديالت‬
‫العمليات‬
‫على‬
‫بع‬
‫ضها‬
‫او‬
‫على‬
‫نظام‬
‫التشغيل‬
10/1/2022 33
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Operating-System Operations
 Dual-mode operation allows OS to protect itself and other system
components.
‫يتيح‬
‫التشغيل‬
‫ثنائي‬
‫الوضع‬
‫لنظام‬
‫التشغيل‬
‫حماية‬
‫نفسه‬
‫ومكونات‬
‫النظام‬
‫األخرى‬
.
• User mode and kernel mode ‫وضع‬
‫المستخدم‬
‫ووضع‬
‫النواة‬
.
• Mode bit provided by hardware ‫يتم‬
‫توفير‬
‫بت‬
‫الوضع‬
‫بواسطة‬
‫األجهزة‬
• Provides ability to distinguish when system is running user code or
kernel code
‫يوفر‬
‫القدرة‬
‫على‬
‫التمييز‬
‫اذا‬
‫كان‬
‫النظام‬
‫في‬
‫طور‬
‫تشغيل‬
‫كود‬
‫المستخدم‬
‫أو‬
‫كود‬
‫النواة‬
• Some instructions designated as privileged, only executable in
kernel mode
‫بعض‬
‫التعليمات‬
‫المصنفة‬
‫على‬
‫أنها‬
‫ذات‬
‫امتياز‬
،
‫قابلة‬
‫للتنفيذ‬
‫فقط‬
‫في‬
‫وضع‬
‫النواة‬
• System call changes mode to kernel, return from call resets it to user
‫استدعاء‬
‫النظام‬
‫يغيرالوضع‬
‫إلى‬
‫النواة‬
،
‫والعودة‬
‫من‬
‫االستدعاء‬
‫يعين‬
‫الوضع‬
‫إلى‬
‫المستخدم‬
10/1/2022 34
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Transition from User to Kernel Mode
 Timer to prevent infinite loop / process hogging resources
• Timer is set to interrupt the computer after some time period
‫ضبط‬
‫المؤقت‬
‫على‬
‫مقاطعة‬
‫الكمبيوتر‬
‫بعد‬
‫فترة‬
‫زمنية‬
.
• Keep a counter that is decremented by the physical clock.
‫االحتفاظ‬
‫بعداد‬
‫يتناقص‬
‫بواسطة‬
‫الساعة‬
‫الفعلية‬
.
• Operating system set the counter.
‫نظام‬
‫التشغيل‬
‫يضبط‬
‫العداد‬
• When counter zero generate an interrupt
‫عندما‬
‫يكون‬
‫العداد‬
‫صفر‬
‫يتم‬
‫انشاء‬
‫المقاطعة‬
• Set up before scheduling process to regain control or terminate
program that exceeds allotted time
‫التهيئة‬
‫قبل‬
‫جدولة‬
‫العملية‬
‫الستعادة‬
‫التحكم‬
‫أو‬
‫إنهاء‬
‫البرنامج‬
‫الذي‬
‫تجاوز‬
‫الوقت‬
‫المخص‬
‫ص‬
10/1/2022 35
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Transition from User to Kernel Mode
10/1/2022 36
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
RESOURCE MANAGEMENT
10/1/2022 37
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Process Management
 A process is a program in execution. It is a unit of work within the system.
Program is a passive entity, process is an active entity.
‫العملية‬
‫عبارة‬
‫عن‬
‫برنامج‬
‫قيد‬
‫التنفيذ‬
.
‫إنها‬
‫وحدة‬
‫عمل‬
‫داخل‬
‫النظام‬
،
‫البرنامج‬
‫كيان‬
‫غير‬
‫فعال‬
،
‫والعملية‬
‫كيان‬
‫نشط‬
.
 Process needs resources to accomplish its task
• CPU, memory, I/O, files
• Initialization data
 Process termination requires reclaim of any reusable resources
‫يتطلب‬
‫إنهاء‬
‫العملية‬
‫استعادة‬
‫أي‬
‫موارد‬
‫قابلة‬
‫إلعادة‬
‫االستخدام‬
 Single-threaded process has one program counter specifying location of
next instruction to execute
‫تحتوي‬
‫العملية‬
‫أحادية‬
‫الخيوط‬
‫على‬
‫عداد‬
‫برنامج‬
‫واحد‬
‫يحدد‬
‫موقع‬
‫التعليمات‬
‫التالية‬
‫للتنف‬
‫يذ‬
• Process executes instructions sequentially, one at a time, until
completion
‫تنفذ‬
‫العملية‬
‫التعليمات‬
‫بالتتابع‬
،
‫ا‬‫واحد‬
‫تلو‬
‫اآلخر‬
،
‫حتى‬
‫اكتمالها‬
10/1/2022 38
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Process Management
 Multi-threaded process has one program counter per thread
‫تحتوي‬
‫العملية‬
‫متعددة‬
‫الخيوط‬
‫على‬
‫عداد‬
‫برنامج‬
‫واحد‬
‫لكل‬
‫خيط‬
 Typically system has many processes, some user, some operating system running
concurrently on one or more CPUs
ً
‫عادة‬
‫ما‬
‫يحتوي‬
‫النظام‬
‫على‬
‫العديد‬
‫من‬
‫العمليات‬
،
‫بعضها‬
‫للمستخدم‬
،
‫وبعضها‬
‫لنظام‬
‫التشغيل‬
‫تعمل‬
‫ب‬
‫شكل‬
‫متزامن‬
‫في‬
‫معالج‬
‫واحد‬
‫أو‬
‫أكثر‬
• Concurrency by multiplexing the CPUs among the processes / threads
‫التزامن‬
‫عن‬
‫طريق‬
‫تنقل‬
‫المعالج‬
‫بين‬
‫العمليات‬
/
‫الخيوط‬
 The operating system is responsible for the following activities in connection
with process management:
• Creating and deleting both user and system processes ‫انشاء‬
‫او‬
‫حذف‬
‫العمليات‬
• Suspending and resuming processes ‫تعليق‬
‫واستئناف‬
‫العمليات‬
• Providing mechanisms for process synchronization ‫توفير‬
‫آليات‬
‫لمزامنة‬
‫العملية‬
• Providing mechanisms for process communication ‫توفير‬
‫آليات‬
‫لعملية‬
‫االتصال‬
• Providing mechanisms for deadlock handling ‫توفير‬
‫آليات‬
‫للتعامل‬
‫مع‬
‫الطريق‬
‫المسدود‬
10/1/2022 39
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Memory Management
 To execute a program all (or part) of the instructions must be in memory
‫لتنفيذ‬
‫برنامج‬
،
‫يجب‬
‫أن‬
‫تكون‬
‫جميع‬
‫التعليمات‬
(
‫أو‬
‫جزء‬
‫منها‬
)
‫في‬
‫الذاكرة‬
.
 All (or part) of the data that is needed by the program must be in memory.
‫يجب‬
‫أن‬
‫تكون‬
‫جميع‬
(
‫أو‬
‫جزء‬
)
‫البيانات‬
‫التي‬
‫يحتاجها‬
‫البرنامج‬
‫في‬
‫الذاكرة‬
.
 Memory management determines what is in memory and when
‫تحدد‬
‫إدارة‬
‫الذاكرة‬
‫ما‬
‫هو‬
‫موجود‬
‫في‬
‫الذاكرة‬
‫ومتى‬
• Optimizing CPU utilization and computer response to users
‫تحسين‬
‫استخدام‬
‫وحدة‬
‫المعالجة‬
‫المركزية‬
‫واستجابة‬
‫الكمبيوتر‬
‫للمستخدمين‬
 Memory management activities
• Keeping track of which parts of memory are currently being used and by whom
‫تتبع‬
‫أي‬
‫أجزاء‬
‫من‬
‫الذاكرة‬
‫يتم‬
‫استخدامها‬
‫ا‬‫حالي‬
‫ومن‬
‫قبل‬
‫من‬
• Deciding which processes (or parts thereof) and data to move into and out of memory
‫تحديد‬
‫العمليات‬
(
‫أو‬
‫أجزاء‬
‫منها‬
)
‫والبيانات‬
‫التي‬
‫سيتم‬
‫نقلها‬
‫إلى‬
‫الذاكرة‬
‫وخارجها‬
• Allocating and deallocating memory space as needed
‫تخصيص‬
‫مساحة‬
‫الذاكرة‬
‫وإلغاء‬
‫تخصيصها‬
‫حسب‬
‫الحاجة‬
10/1/2022 40
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Storage Management
 OS provides uniform, logical view of information storage
‫يوفر‬
‫نظام‬
‫التشغيل‬
‫رؤية‬
‫موحدة‬
‫ومنطقية‬
‫لتخزين‬
‫المعلومات‬
• Abstracts physical properties to logical storage unit - file
‫يلخص‬
‫الخصائص‬
‫الفيزيائية‬
‫لوحدة‬
‫التخزين‬
‫المنطقية‬
-
‫الملف‬
• Each medium is controlled by device (i.e., disk drive, tape
drive)
‫يتم‬
‫التحكم‬
‫في‬
‫كل‬
‫وسيط‬
‫بواسطة‬
‫جهاز‬
(
‫أي‬
‫محرك‬
‫األقراص‬
‫ومحرك‬
‫الشريط‬
)
•Varying properties include access speed, capacity, data-
transfer rate, access method (sequential or random)
‫تشمل‬
‫الخصائص‬
‫المتغيرة‬
‫سرعة‬
‫الوصول‬
،
‫والسعة‬
،
‫ومعدل‬
‫نقل‬
‫البيانا‬
‫ت‬
،
‫وطريقة‬
‫الوصول‬
(
‫تسلسلي‬
‫أو‬
‫عشوائي‬
)
10/1/2022 41
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Storage Management
 File-System management
• Files usually organized into directories
‫عادة‬
‫ما‬
‫يتم‬
‫تنظيم‬
‫الملفات‬
‫في‬
‫أدلة‬
• Access control on most systems to determine who can access what
‫التحكم‬
‫في‬
‫الوصول‬
‫إلى‬
‫معظم‬
‫األنظمة‬
‫لتحديد‬
‫من‬
‫يمكنه‬
‫الوصول‬
‫إلى‬
‫ماذا‬
• OS activities include
• Creating and deleting files and directories
‫إنشاء‬
‫وحذف‬
‫الملفات‬
‫واألدلة‬
• Primitives to manipulate files and directories
‫األساسيات‬
‫لمعالجة‬
‫الملفات‬
‫واألدلة‬
• Mapping files onto secondary storage
‫تعيين‬
‫الملفات‬
‫على‬
‫التخزين‬
‫الثانوي‬
• Backup files onto stable (non-volatile) storage media
‫النسخ‬
‫االحتياطي‬
‫للملفات‬
‫على‬
‫وسائط‬
‫تخزين‬
‫مستقرة‬
(
‫غير‬
‫متطايرة‬
)
10/1/2022 42
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Mass-Storage Management
 Usually disks used to store data that does not fit in main memory or data that must be kept for a
“long” period of time
‫عادة‬
‫األقراص‬
‫المستخدمة‬
‫لتخزين‬
‫البيانات‬
‫التي‬
‫تتسع‬
‫في‬
‫الذاكرة‬
‫الرئيسية‬
‫أو‬
‫البيانات‬
‫التي‬
‫يجب‬
‫االحتفاظ‬
‫بها‬
‫لف‬
‫ترة‬
"
‫طويلة‬
"
‫من‬
‫الوقت‬
 Proper management is of central importance
‫اإلدارة‬
‫السليمة‬
‫لها‬
‫أهمية‬
‫مركزية‬
 OS activities
• Free-space management
‫إدارة‬
‫المساحة‬
‫الخالية‬
• Storage allocation
‫تخصيص‬
‫التخزين‬
• Disk scheduling
‫جدولة‬
‫القرص‬
• Partitioning
‫التجزئة‬
• Protection
‫الحماية‬
10/1/2022 43
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
I/O Subsystem
 One purpose of OS is to hide peculiarities of hardware devices from the
user
‫يتمثل‬
‫أحد‬
‫أهداف‬
‫نظام‬
‫التشغيل‬
‫في‬
‫إخفاء‬
‫خصائص‬
‫األجهزة‬
‫عن‬
‫المستخدم‬
 I/O subsystem responsible for
• Memory management of I/O including buffering (storing data
temporarily while it is being transferred), caching (storing parts of
data in faster storage for performance), spooling (the overlapping of
output of one job with input of other jobs)
‫ادارة‬
‫الذاكرة‬
‫لإلدخال‬
‫واالخراج‬
‫تتضمن‬
‫التخزين‬
‫المؤقت‬
،
‫الذاكرة‬
‫المخبأة‬
،
‫المسالك‬
• General device-driver interface
‫واجهة‬
‫برنامج‬
‫تشغيل‬
‫الجهاز‬
‫العامة‬
• Drivers for specific hardware devices
‫التعريفات‬
‫ألجهزة‬
‫معينة‬
10/1/2022 44
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
Protection and Security
 Protection – any mechanism for controlling access of processes or users to resources
defined by the OS
‫الحماية‬
–
‫هي‬
‫أي‬
‫آلية‬
‫للتحكم‬
‫في‬
‫وصول‬
‫العمليات‬
‫أو‬
‫المستخدمين‬
‫إلى‬
‫الموارد‬
‫المحددة‬
‫بواسطة‬
‫نظام‬
‫التشغيل‬
 Security – defense of the system against internal and external attacks
‫األمن‬
-
‫الدفاع‬
‫عن‬
‫النظام‬
‫ضد‬
‫الهجمات‬
‫الداخلية‬
‫والخارجية‬
 Systems generally first distinguish among users, to determine who can do what
• User identities (user IDs, security IDs) include name and associated number, one
per user
‫تتضمن‬
‫هويات‬
‫المستخدم‬
(
‫معرفات‬
‫المستخدم‬
‫ومعرفات‬
‫األمان‬
)
‫االسم‬
‫والرقم‬
‫المرتبط‬
‫به‬
،
‫واحد‬
‫لكل‬
‫مس‬
‫تخدم‬
• User ID then associated with all files, processes of that user to determine access
control
‫ثم‬
‫يتم‬
‫ربط‬
‫معرف‬
‫المستخدم‬
‫بجميع‬
‫الملفات‬
،
‫وعمليات‬
‫ذلك‬
‫المستخدم‬
‫لتحديد‬
‫التحكم‬
‫في‬
‫الوصول‬
• Group identifier (group ID) allows set of users to be defined and controls managed,
then also associated with each process, file
‫يسمح‬
‫معرف‬
‫المجموعة‬
(
‫معرف‬
‫المجموعة‬
)
‫بتحديد‬
‫مجموعة‬
‫من‬
‫المستخدمين‬
‫وإدارة‬
‫عناصر‬
‫التحكم‬
،
‫ثم‬
‫ربط‬
‫ها‬
‫ا‬‫أيض‬
‫بكل‬
‫عملية‬
‫أو‬
‫ملف‬
10/1/2022 45
OPERATING SYSTEMS– AL-NASSER UNIVERSITY
The End
10/1/2022 46
OPERATING SYSTEMS– AL-NASSER UNIVERSITY

More Related Content

Similar to 2-OS - Operating-System Structures .pptx

Operating System BCA 301
Operating System BCA 301Operating System BCA 301
Operating System BCA 301cpjcollege
 
Os concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage BasicsOs concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage BasicsVaibhav Khanna
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.pptFarhanaMariyam1
 
Introduction to Operating system CBSE
Introduction to Operating system CBSE Introduction to Operating system CBSE
Introduction to Operating system CBSE PrashantChahal3
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介lclsg123
 
1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptxAishwarya .
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdfwisard1
 
Os concepts 5 Storage and IO Virtualization
Os concepts 5 Storage and IO VirtualizationOs concepts 5 Storage and IO Virtualization
Os concepts 5 Storage and IO VirtualizationVaibhav Khanna
 
OS Functions and Services
OS Functions and ServicesOS Functions and Services
OS Functions and Servicessgpraju
 
IT241 - Full Summary.pdf
IT241 - Full Summary.pdfIT241 - Full Summary.pdf
IT241 - Full Summary.pdfSHEHABALYAMANI
 
Operating system lecture1
Operating system lecture1Operating system lecture1
Operating system lecture1AhalyaSri
 
Apos week 1 4
Apos week 1   4Apos week 1   4
Apos week 1 4alixafar
 

Similar to 2-OS - Operating-System Structures .pptx (20)

Operating System BCA 301
Operating System BCA 301Operating System BCA 301
Operating System BCA 301
 
Os concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage BasicsOs concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage Basics
 
1_to_10.pdf
1_to_10.pdf1_to_10.pdf
1_to_10.pdf
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.ppt
 
unit 2.ppt
unit 2.pptunit 2.ppt
unit 2.ppt
 
Introduction to Operating system CBSE
Introduction to Operating system CBSE Introduction to Operating system CBSE
Introduction to Operating system CBSE
 
Os1
Os1Os1
Os1
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
 
1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdf
 
Os concepts 5 Storage and IO Virtualization
Os concepts 5 Storage and IO VirtualizationOs concepts 5 Storage and IO Virtualization
Os concepts 5 Storage and IO Virtualization
 
OS Functions and Services
OS Functions and ServicesOS Functions and Services
OS Functions and Services
 
OS_MD_1.pdf
OS_MD_1.pdfOS_MD_1.pdf
OS_MD_1.pdf
 
IT241 - Full Summary.pdf
IT241 - Full Summary.pdfIT241 - Full Summary.pdf
IT241 - Full Summary.pdf
 
Ch1
Ch1Ch1
Ch1
 
Operating system lecture1
Operating system lecture1Operating system lecture1
Operating system lecture1
 
OS-01.ppt
OS-01.pptOS-01.ppt
OS-01.ppt
 
Apos week 1 4
Apos week 1   4Apos week 1   4
Apos week 1 4
 
Unit I OS CS.ppt
Unit I OS CS.pptUnit I OS CS.ppt
Unit I OS CS.ppt
 

Recently uploaded

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

2-OS - Operating-System Structures .pptx

  • 1. Operating Systems ‫التشغيل‬ ‫نظم‬ ‫رقم‬ ‫المحاضرة‬ 2 Operating-System Structures 10/1/2022 1 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 2. Agenda  Computer-System Organization • Interrupt • Storage Structure • I/O Structure  Computer-System Architecture • Single-Processor • Multi-Processors • Clustered System  Operating-System Operations • Multi-Programming and Multi-Tasking • Dual Mode  Resource Management • Process Management • Memory Management • Storage Management • Protection and Security 10/1/2022 2 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 4. Computer System Structure  Computer system can be divided into four components: • Hardware – provides basic computing resources • CPU, memory, I/O devices • Operating system • Controls and coordinates use of hardware among various applications and users • Application programs – define the ways in which the system resources are used to solve the computing problems of the users • Word processors, compilers, web browsers, database systems, video games • Users • People, machines, other computers 10/1/2022 4 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 5. Computer System  “The one program running at all times on the computer” is the kernel.  Everything else is either • a system program (ships with the operating system) , or • an application program. 10/1/2022 5 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 6. Computer Startup  Bootstrap program is loaded at power-up or reboot • Typically stored in ROM or EPROM, generally known as firmware • Initializes all aspects of system • Loads operating system kernel and starts execution 10/1/2022 6 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 7. Computer System Organization  Computer-system operation • One or more CPUs, device controllers connect through common bus providing access to shared memory • Concurrent execution of CPUs and devices competing for memory cycles 10/1/2022 7 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 8. 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 ‫المعالج‬ ‫ينقل‬ ‫البيانات‬ ‫من‬ ‫والى‬ ‫الذاكرة‬ ‫من‬ ‫والى‬ ‫المخزن‬ ‫الداخلي‬  Device controller informs CPU that it has finished its operation by causing an interrupt ‫المتحكم‬ ‫يعلم‬ ‫المعالج‬ ‫بانتهاء‬ ‫عمله‬ ‫باستحداث‬ ‫قاطع‬ 10/1/2022 8 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 9. Common Functions of Interrupts  The occurrence of an event is usually signaled by an interrupt from either the hardware or the software. ‫ظهور‬ ‫حدث‬ ‫عادة‬ ‫يشار‬ ‫اليه‬ ‫بالمقاطعة‬ ‫سواء‬ ‫من‬ ‫الهاردوير‬ ‫او‬ ‫السوفتوير‬  Hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by way of the system bus. ‫قد‬ ‫تتسبب‬ ‫األجهزة‬ ‫في‬ ‫حدوث‬ ‫مقاطعة‬ ‫في‬ ‫أي‬ ‫وقت‬ ‫عن‬ ‫طريق‬ ‫إرسال‬ ‫إشارة‬ ‫إلى‬ ‫وحدة‬ ‫المعالجة‬ ‫المركزية‬ ، ً ‫عادة‬ ‫عن‬ ‫طريق‬ ‫ناقل‬ ‫النظام‬ .  Software may trigger an interrupt by executing a special operation called a system call (also called a monitor call).  ‫قد‬ ‫يتسبب‬ ‫البرنامج‬ ‫في‬ ‫حدوث‬ ‫مقاطعة‬ ‫عن‬ ‫طريق‬ ‫تنفيذ‬ ‫عملية‬ ‫خاصة‬ ‫تسمى‬ ‫ا‬ ‫ستدعاء‬ ‫النظام‬ ( ‫تسمى‬ ‫ا‬‫أيض‬ ‫مكالمة‬ ‫الشاشة‬ ) . 10/1/2022 9 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 10. Common Functions of Interrupts  Interrupts are an important part of a computer architecture. ‫المقاطعات‬ ‫هي‬ ‫جزء‬ ‫مهم‬ ‫من‬ ‫معمارية‬ ‫الكمبيوتر‬ .  Each computer design has its own interrupt mechanism, but several functions are common. ‫كل‬ ‫تصميم‬ ‫كمبيوتر‬ ‫له‬ ‫آليه‬ ‫المقاطعة‬ ‫الخاصة‬ ‫به‬ ، ‫ولكن‬ ‫هناك‬ ‫العديد‬ ‫من‬ ‫الوظائف‬ ‫الشائعة‬ .  Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines ‫تنقل‬ ‫المقاطعة‬ ‫التحكم‬ ‫إلى‬ ‫روتين‬ ‫خدمة‬ ‫المقاطعة‬ ‫بشكل‬ ‫عام‬ ، ‫من‬ ‫خالل‬ ‫ناقل‬ ‫المقاطعة‬ ، ‫الذي‬ ‫يحتوي‬ ‫على‬ ‫عناو‬ ‫ين‬ ‫جميع‬ ‫إجراءات‬ ‫الخدمة‬  Interrupt architecture must save the address of the interrupted instruction ‫يجب‬ ‫أن‬ ‫تحفظ‬ ‫بنية‬ ‫المقاطعة‬ ‫عنوان‬ ‫التعليمات‬ ‫التي‬ ‫تمت‬ ‫مقاطعتها‬ .  A trap or exception is a software-generated interrupt caused either by an error or a user request ‫االعتراض‬ ‫أو‬ ‫االستثناء‬ ‫هو‬ ‫مقاطعة‬ ‫ينتج‬ ‫عن‬ ‫البرامج‬ ‫إما‬ ‫عن‬ ‫حدوث‬ ‫خطأ‬ ‫أو‬ ‫طلب‬ ‫مستخدم‬  An operating system is interrupt driven ‫نظام‬ ‫التشغيل‬ ‫هو‬ ‫معتمد‬ ‫على‬ ‫المقاطعة‬ 10/1/2022 10 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 11. Interrupt Handling  The operating system preserves the state of the CPU by storing registers and the program counter ‫يحافظ‬ ‫نظام‬ ‫التشغيل‬ ‫على‬ ‫حالة‬ ‫المعالج‬ ‫من‬ ‫خالل‬ ‫تخزين‬ ‫الس‬ ‫جالت‬ ‫وعداد‬ ‫البرنامج‬ .  Separate segments of code determine what action should be taken for each type of interrupt ‫تعليمات‬ ‫برمجية‬ ‫منفصلة‬ ‫تحدد‬ ‫اإلجراء‬ ‫الذي‬ ‫يجب‬ ‫اتخاذه‬ ‫لك‬ ‫ل‬ ‫نوع‬ ‫من‬ ‫أنواع‬ ‫المقاطعة‬ 10/1/2022 11 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 12. Interrupt Timeline 10/1/2022 12 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 13. STORAGE STRUCTURE 10/1/2022 13 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 14. Storage Structure  Main memory – only large storage media that the CPU can access directly ‫الذاكرة‬ ‫الرئيسية‬ : ‫وسيط‬ ‫تخزين‬ ‫يستطيع‬ ‫المعالج‬ ‫الوصول‬ ‫اليه‬ ‫مباشرة‬ • Random access • Typically volatile  Secondary storage – extension of main memory that provides large nonvolatile storage capacity ‫الذاكرة‬ ‫الثانوية‬ : ‫امتداد‬ ‫للذاكرة‬ ‫الرئيسية‬ ‫ولها‬ ‫سعة‬ ‫عالية‬ ‫غير‬ ‫متطايرة‬  Hard 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  Solid-state disks – faster than hard disks, nonvolatile • Various technologies • Becoming more popular 10/1/2022 14 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 15. Storage Hierarchy  Storage systems organized in hierarchy • Speed • Cost • Volatility  Caching – copying information into faster storage system; main memory can be viewed as a cache for secondary storage  Device Driver for each device controller to manage I/O • Provides uniform interface between controller and kernel 10/1/2022 15 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 16. Storage-Device Hierarchy 10/1/2022 16 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 17. PC Structure - Memory Hierarchy  ‫تتكونًهرميةًالذاكرةًمنًالتالي‬ : • ً‫المسجالت‬ registers • ً‫الذاكرةًالمخبأة‬ ) ‫الكاش‬ ( cache • ً‫الذاكرةًالرئيسية‬ ) ‫الرام‬ ( main memory • ًٍ‫الذاكرةًالثانوية‬ Secondary Memory 10/1/2022 17 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 18. PC Structure - Memory Hierarchy 10/1/2022 18 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 19. PC Structure - Memory Hierarchy  ً‫هنالكًعواملًتؤثرًفيًهرميةًالذاكرةًهي‬ : • ‫التطاير‬ volatility • ‫السرعة‬ Speed • ‫السعة‬ Capacity • ‫السعر‬ Price 10/1/2022 19 ‫التطاير‬ ‫زيادة‬ OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 20. PC Structure - Memory 10/1/2022 20 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 21. Caching  Important principle, performed at many levels in a computer (in hardware, operating system, software) ‫مصطلح‬ ‫مهم‬ ‫يوجد‬ ‫في‬ ‫اكثر‬ ‫من‬ ‫مستوى‬ ‫في‬ ‫الكمبيوتر‬  Information in use copied from slower to faster storage temporarily ‫المعلومات‬ ‫المستخدمة‬ ‫تنسخ‬ ‫من‬ ‫التخزين‬ ‫االبطا‬ ‫الى‬ ‫االسرع‬ ‫موقتا‬  Faster storage (cache) checked first to determine if information is there • If it is, information used directly from the cache (fast) • If not, data copied to cache and used there  Cache smaller than storage being cached • Cache management important design problem • Cache size and replacement policy 10/1/2022 21 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 22. I/O STRUCTURE 10/1/2022 22 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 23. Direct Memory Access Structure  Used for high-speed I/O devices able to transmit information at close to memory speeds  Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention  Only one interrupt is generated per block, rather than the one interrupt per byte 10/1/2022 23 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 24. A von Neumann architecture How a Modern Computer Works 10/1/2022 24 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 26. Computer-System Architecture  Most systems use a single general-purpose processor • Most systems have special-purpose processors as well  Multiprocessors systems growing in use and importance • Also known as parallel systems, tightly-coupled systems • Advantages include: • Increased throughput • Economy of scale • Increased reliability – graceful degradation or fault tolerance • Two types: • Asymmetric Multiprocessing – each processor is assigned a specific task. • Symmetric Multiprocessing – each processor performs all tasks 10/1/2022 26 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 27. Symmetric Multiprocessing Architecture 10/1/2022 27 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 28. A Dual-Core Design 10/1/2022 28 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 29. Clustered Systems  Like multiprocessor systems, but multiple systems working together • Usually sharing storage via a storage-area network (SAN) • Provides a high-availability service which survives failures •Asymmetric clustering has one machine in hot-standby mode •Symmetric clustering has multiple nodes running applications, monitoring each other • Some clusters are for high-performance computing (HPC) •Applications must be written to use parallelization 10/1/2022 29 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 30. Clustered Systems 10/1/2022 30 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 32. Operating System Structure  Multiprogramming (Batch system) needed for efficiency • Single user cannot keep CPU and I/O devices busy at all times • Multiprogramming organizes jobs (code and data) so CPU always has one to execute • A subset of total jobs in system is kept in memory • One job selected and run via job scheduling • When it has to wait (for I/O for example), OS switches to another job  Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing • Response time should be < 1 second • Each user has at least one program executing in memory process • If several jobs ready to run at the same time  CPU scheduling • If processes don’t fit in memory, swapping moves them in and out to run • Virtual memory allows execution of processes not completely in memory 10/1/2022 32 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 33. Operating-System Operations  Interrupt driven (hardware and software) • Hardware interrupt by one of the devices ‫مقاطعة‬ ‫الهاردوير‬ ‫تكون‬ ‫بواسطة‬ ‫احد‬ ‫االجهزة‬ • Software interrupt (exception or trap): • Software error (e.g., division by zero) ‫اخطاء‬ ‫البرامج‬ • Request for operating system service ‫طلب‬ ‫خدمة‬ ‫من‬ ‫نظام‬ ‫التشغيل‬ • Other process problems include infinite loop, processes modifying each other or the operating system ‫مشاكل‬ ‫العمليات‬ ‫االخرى‬ ‫المتضمنة‬ ‫التكرار‬ ‫الالنهائي‬ ، ‫تعديالت‬ ‫العمليات‬ ‫على‬ ‫بع‬ ‫ضها‬ ‫او‬ ‫على‬ ‫نظام‬ ‫التشغيل‬ 10/1/2022 33 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 34. Operating-System Operations  Dual-mode operation allows OS to protect itself and other system components. ‫يتيح‬ ‫التشغيل‬ ‫ثنائي‬ ‫الوضع‬ ‫لنظام‬ ‫التشغيل‬ ‫حماية‬ ‫نفسه‬ ‫ومكونات‬ ‫النظام‬ ‫األخرى‬ . • User mode and kernel mode ‫وضع‬ ‫المستخدم‬ ‫ووضع‬ ‫النواة‬ . • Mode bit provided by hardware ‫يتم‬ ‫توفير‬ ‫بت‬ ‫الوضع‬ ‫بواسطة‬ ‫األجهزة‬ • Provides ability to distinguish when system is running user code or kernel code ‫يوفر‬ ‫القدرة‬ ‫على‬ ‫التمييز‬ ‫اذا‬ ‫كان‬ ‫النظام‬ ‫في‬ ‫طور‬ ‫تشغيل‬ ‫كود‬ ‫المستخدم‬ ‫أو‬ ‫كود‬ ‫النواة‬ • Some instructions designated as privileged, only executable in kernel mode ‫بعض‬ ‫التعليمات‬ ‫المصنفة‬ ‫على‬ ‫أنها‬ ‫ذات‬ ‫امتياز‬ ، ‫قابلة‬ ‫للتنفيذ‬ ‫فقط‬ ‫في‬ ‫وضع‬ ‫النواة‬ • System call changes mode to kernel, return from call resets it to user ‫استدعاء‬ ‫النظام‬ ‫يغيرالوضع‬ ‫إلى‬ ‫النواة‬ ، ‫والعودة‬ ‫من‬ ‫االستدعاء‬ ‫يعين‬ ‫الوضع‬ ‫إلى‬ ‫المستخدم‬ 10/1/2022 34 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 35. Transition from User to Kernel Mode  Timer to prevent infinite loop / process hogging resources • Timer is set to interrupt the computer after some time period ‫ضبط‬ ‫المؤقت‬ ‫على‬ ‫مقاطعة‬ ‫الكمبيوتر‬ ‫بعد‬ ‫فترة‬ ‫زمنية‬ . • Keep a counter that is decremented by the physical clock. ‫االحتفاظ‬ ‫بعداد‬ ‫يتناقص‬ ‫بواسطة‬ ‫الساعة‬ ‫الفعلية‬ . • Operating system set the counter. ‫نظام‬ ‫التشغيل‬ ‫يضبط‬ ‫العداد‬ • When counter zero generate an interrupt ‫عندما‬ ‫يكون‬ ‫العداد‬ ‫صفر‬ ‫يتم‬ ‫انشاء‬ ‫المقاطعة‬ • Set up before scheduling process to regain control or terminate program that exceeds allotted time ‫التهيئة‬ ‫قبل‬ ‫جدولة‬ ‫العملية‬ ‫الستعادة‬ ‫التحكم‬ ‫أو‬ ‫إنهاء‬ ‫البرنامج‬ ‫الذي‬ ‫تجاوز‬ ‫الوقت‬ ‫المخص‬ ‫ص‬ 10/1/2022 35 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 36. Transition from User to Kernel Mode 10/1/2022 36 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 37. RESOURCE MANAGEMENT 10/1/2022 37 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 38. Process Management  A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. ‫العملية‬ ‫عبارة‬ ‫عن‬ ‫برنامج‬ ‫قيد‬ ‫التنفيذ‬ . ‫إنها‬ ‫وحدة‬ ‫عمل‬ ‫داخل‬ ‫النظام‬ ، ‫البرنامج‬ ‫كيان‬ ‫غير‬ ‫فعال‬ ، ‫والعملية‬ ‫كيان‬ ‫نشط‬ .  Process needs resources to accomplish its task • CPU, memory, I/O, files • Initialization data  Process termination requires reclaim of any reusable resources ‫يتطلب‬ ‫إنهاء‬ ‫العملية‬ ‫استعادة‬ ‫أي‬ ‫موارد‬ ‫قابلة‬ ‫إلعادة‬ ‫االستخدام‬  Single-threaded process has one program counter specifying location of next instruction to execute ‫تحتوي‬ ‫العملية‬ ‫أحادية‬ ‫الخيوط‬ ‫على‬ ‫عداد‬ ‫برنامج‬ ‫واحد‬ ‫يحدد‬ ‫موقع‬ ‫التعليمات‬ ‫التالية‬ ‫للتنف‬ ‫يذ‬ • Process executes instructions sequentially, one at a time, until completion ‫تنفذ‬ ‫العملية‬ ‫التعليمات‬ ‫بالتتابع‬ ، ‫ا‬‫واحد‬ ‫تلو‬ ‫اآلخر‬ ، ‫حتى‬ ‫اكتمالها‬ 10/1/2022 38 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 39. Process Management  Multi-threaded process has one program counter per thread ‫تحتوي‬ ‫العملية‬ ‫متعددة‬ ‫الخيوط‬ ‫على‬ ‫عداد‬ ‫برنامج‬ ‫واحد‬ ‫لكل‬ ‫خيط‬  Typically system has many processes, some user, some operating system running concurrently on one or more CPUs ً ‫عادة‬ ‫ما‬ ‫يحتوي‬ ‫النظام‬ ‫على‬ ‫العديد‬ ‫من‬ ‫العمليات‬ ، ‫بعضها‬ ‫للمستخدم‬ ، ‫وبعضها‬ ‫لنظام‬ ‫التشغيل‬ ‫تعمل‬ ‫ب‬ ‫شكل‬ ‫متزامن‬ ‫في‬ ‫معالج‬ ‫واحد‬ ‫أو‬ ‫أكثر‬ • Concurrency by multiplexing the CPUs among the processes / threads ‫التزامن‬ ‫عن‬ ‫طريق‬ ‫تنقل‬ ‫المعالج‬ ‫بين‬ ‫العمليات‬ / ‫الخيوط‬  The operating system is responsible for the following activities in connection with process management: • Creating and deleting both user and system processes ‫انشاء‬ ‫او‬ ‫حذف‬ ‫العمليات‬ • Suspending and resuming processes ‫تعليق‬ ‫واستئناف‬ ‫العمليات‬ • Providing mechanisms for process synchronization ‫توفير‬ ‫آليات‬ ‫لمزامنة‬ ‫العملية‬ • Providing mechanisms for process communication ‫توفير‬ ‫آليات‬ ‫لعملية‬ ‫االتصال‬ • Providing mechanisms for deadlock handling ‫توفير‬ ‫آليات‬ ‫للتعامل‬ ‫مع‬ ‫الطريق‬ ‫المسدود‬ 10/1/2022 39 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 40. Memory Management  To execute a program all (or part) of the instructions must be in memory ‫لتنفيذ‬ ‫برنامج‬ ، ‫يجب‬ ‫أن‬ ‫تكون‬ ‫جميع‬ ‫التعليمات‬ ( ‫أو‬ ‫جزء‬ ‫منها‬ ) ‫في‬ ‫الذاكرة‬ .  All (or part) of the data that is needed by the program must be in memory. ‫يجب‬ ‫أن‬ ‫تكون‬ ‫جميع‬ ( ‫أو‬ ‫جزء‬ ) ‫البيانات‬ ‫التي‬ ‫يحتاجها‬ ‫البرنامج‬ ‫في‬ ‫الذاكرة‬ .  Memory management determines what is in memory and when ‫تحدد‬ ‫إدارة‬ ‫الذاكرة‬ ‫ما‬ ‫هو‬ ‫موجود‬ ‫في‬ ‫الذاكرة‬ ‫ومتى‬ • Optimizing CPU utilization and computer response to users ‫تحسين‬ ‫استخدام‬ ‫وحدة‬ ‫المعالجة‬ ‫المركزية‬ ‫واستجابة‬ ‫الكمبيوتر‬ ‫للمستخدمين‬  Memory management activities • Keeping track of which parts of memory are currently being used and by whom ‫تتبع‬ ‫أي‬ ‫أجزاء‬ ‫من‬ ‫الذاكرة‬ ‫يتم‬ ‫استخدامها‬ ‫ا‬‫حالي‬ ‫ومن‬ ‫قبل‬ ‫من‬ • Deciding which processes (or parts thereof) and data to move into and out of memory ‫تحديد‬ ‫العمليات‬ ( ‫أو‬ ‫أجزاء‬ ‫منها‬ ) ‫والبيانات‬ ‫التي‬ ‫سيتم‬ ‫نقلها‬ ‫إلى‬ ‫الذاكرة‬ ‫وخارجها‬ • Allocating and deallocating memory space as needed ‫تخصيص‬ ‫مساحة‬ ‫الذاكرة‬ ‫وإلغاء‬ ‫تخصيصها‬ ‫حسب‬ ‫الحاجة‬ 10/1/2022 40 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 41. Storage Management  OS provides uniform, logical view of information storage ‫يوفر‬ ‫نظام‬ ‫التشغيل‬ ‫رؤية‬ ‫موحدة‬ ‫ومنطقية‬ ‫لتخزين‬ ‫المعلومات‬ • Abstracts physical properties to logical storage unit - file ‫يلخص‬ ‫الخصائص‬ ‫الفيزيائية‬ ‫لوحدة‬ ‫التخزين‬ ‫المنطقية‬ - ‫الملف‬ • Each medium is controlled by device (i.e., disk drive, tape drive) ‫يتم‬ ‫التحكم‬ ‫في‬ ‫كل‬ ‫وسيط‬ ‫بواسطة‬ ‫جهاز‬ ( ‫أي‬ ‫محرك‬ ‫األقراص‬ ‫ومحرك‬ ‫الشريط‬ ) •Varying properties include access speed, capacity, data- transfer rate, access method (sequential or random) ‫تشمل‬ ‫الخصائص‬ ‫المتغيرة‬ ‫سرعة‬ ‫الوصول‬ ، ‫والسعة‬ ، ‫ومعدل‬ ‫نقل‬ ‫البيانا‬ ‫ت‬ ، ‫وطريقة‬ ‫الوصول‬ ( ‫تسلسلي‬ ‫أو‬ ‫عشوائي‬ ) 10/1/2022 41 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 42. Storage Management  File-System management • Files usually organized into directories ‫عادة‬ ‫ما‬ ‫يتم‬ ‫تنظيم‬ ‫الملفات‬ ‫في‬ ‫أدلة‬ • Access control on most systems to determine who can access what ‫التحكم‬ ‫في‬ ‫الوصول‬ ‫إلى‬ ‫معظم‬ ‫األنظمة‬ ‫لتحديد‬ ‫من‬ ‫يمكنه‬ ‫الوصول‬ ‫إلى‬ ‫ماذا‬ • OS activities include • Creating and deleting files and directories ‫إنشاء‬ ‫وحذف‬ ‫الملفات‬ ‫واألدلة‬ • Primitives to manipulate files and directories ‫األساسيات‬ ‫لمعالجة‬ ‫الملفات‬ ‫واألدلة‬ • Mapping files onto secondary storage ‫تعيين‬ ‫الملفات‬ ‫على‬ ‫التخزين‬ ‫الثانوي‬ • Backup files onto stable (non-volatile) storage media ‫النسخ‬ ‫االحتياطي‬ ‫للملفات‬ ‫على‬ ‫وسائط‬ ‫تخزين‬ ‫مستقرة‬ ( ‫غير‬ ‫متطايرة‬ ) 10/1/2022 42 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 43. Mass-Storage Management  Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time ‫عادة‬ ‫األقراص‬ ‫المستخدمة‬ ‫لتخزين‬ ‫البيانات‬ ‫التي‬ ‫تتسع‬ ‫في‬ ‫الذاكرة‬ ‫الرئيسية‬ ‫أو‬ ‫البيانات‬ ‫التي‬ ‫يجب‬ ‫االحتفاظ‬ ‫بها‬ ‫لف‬ ‫ترة‬ " ‫طويلة‬ " ‫من‬ ‫الوقت‬  Proper management is of central importance ‫اإلدارة‬ ‫السليمة‬ ‫لها‬ ‫أهمية‬ ‫مركزية‬  OS activities • Free-space management ‫إدارة‬ ‫المساحة‬ ‫الخالية‬ • Storage allocation ‫تخصيص‬ ‫التخزين‬ • Disk scheduling ‫جدولة‬ ‫القرص‬ • Partitioning ‫التجزئة‬ • Protection ‫الحماية‬ 10/1/2022 43 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 44. I/O Subsystem  One purpose of OS is to hide peculiarities of hardware devices from the user ‫يتمثل‬ ‫أحد‬ ‫أهداف‬ ‫نظام‬ ‫التشغيل‬ ‫في‬ ‫إخفاء‬ ‫خصائص‬ ‫األجهزة‬ ‫عن‬ ‫المستخدم‬  I/O subsystem responsible for • Memory management of I/O including buffering (storing data temporarily while it is being transferred), caching (storing parts of data in faster storage for performance), spooling (the overlapping of output of one job with input of other jobs) ‫ادارة‬ ‫الذاكرة‬ ‫لإلدخال‬ ‫واالخراج‬ ‫تتضمن‬ ‫التخزين‬ ‫المؤقت‬ ، ‫الذاكرة‬ ‫المخبأة‬ ، ‫المسالك‬ • General device-driver interface ‫واجهة‬ ‫برنامج‬ ‫تشغيل‬ ‫الجهاز‬ ‫العامة‬ • Drivers for specific hardware devices ‫التعريفات‬ ‫ألجهزة‬ ‫معينة‬ 10/1/2022 44 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 45. Protection and Security  Protection – any mechanism for controlling access of processes or users to resources defined by the OS ‫الحماية‬ – ‫هي‬ ‫أي‬ ‫آلية‬ ‫للتحكم‬ ‫في‬ ‫وصول‬ ‫العمليات‬ ‫أو‬ ‫المستخدمين‬ ‫إلى‬ ‫الموارد‬ ‫المحددة‬ ‫بواسطة‬ ‫نظام‬ ‫التشغيل‬  Security – defense of the system against internal and external attacks ‫األمن‬ - ‫الدفاع‬ ‫عن‬ ‫النظام‬ ‫ضد‬ ‫الهجمات‬ ‫الداخلية‬ ‫والخارجية‬  Systems generally first distinguish among users, to determine who can do what • User identities (user IDs, security IDs) include name and associated number, one per user ‫تتضمن‬ ‫هويات‬ ‫المستخدم‬ ( ‫معرفات‬ ‫المستخدم‬ ‫ومعرفات‬ ‫األمان‬ ) ‫االسم‬ ‫والرقم‬ ‫المرتبط‬ ‫به‬ ، ‫واحد‬ ‫لكل‬ ‫مس‬ ‫تخدم‬ • User ID then associated with all files, processes of that user to determine access control ‫ثم‬ ‫يتم‬ ‫ربط‬ ‫معرف‬ ‫المستخدم‬ ‫بجميع‬ ‫الملفات‬ ، ‫وعمليات‬ ‫ذلك‬ ‫المستخدم‬ ‫لتحديد‬ ‫التحكم‬ ‫في‬ ‫الوصول‬ • Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file ‫يسمح‬ ‫معرف‬ ‫المجموعة‬ ( ‫معرف‬ ‫المجموعة‬ ) ‫بتحديد‬ ‫مجموعة‬ ‫من‬ ‫المستخدمين‬ ‫وإدارة‬ ‫عناصر‬ ‫التحكم‬ ، ‫ثم‬ ‫ربط‬ ‫ها‬ ‫ا‬‫أيض‬ ‫بكل‬ ‫عملية‬ ‫أو‬ ‫ملف‬ 10/1/2022 45 OPERATING SYSTEMS– AL-NASSER UNIVERSITY
  • 46. The End 10/1/2022 46 OPERATING SYSTEMS– AL-NASSER UNIVERSITY