0% found this document useful (0 votes)
12 views11 pages

Summary of OS To Midterm

The document outlines the fundamental concepts of operating systems, including their goals, components, and functions such as resource allocation and process management. It distinguishes between programs and processes, explains scheduling algorithms, and discusses memory management techniques like fragmentation and allocation strategies. Additionally, it covers CPU scheduling criteria and the differences between logical and physical addresses.

Uploaded by

bidobido2060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views11 pages

Summary of OS To Midterm

The document outlines the fundamental concepts of operating systems, including their goals, components, and functions such as resource allocation and process management. It distinguishes between programs and processes, explains scheduling algorithms, and discusses memory management techniques like fragmentation and allocation strategies. Additionally, it covers CPU scheduling criteria and the differences between logical and physical addresses.

Uploaded by

bidobido2060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Summary of OS

Ch 1
1. What are the operating system goals?
•Execute user programs and make solving user problems
easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
‫ جعل نظام الكمبيوتر مناسبا لالستخدام‬، ‫تنفيذ برامج المستخدم وحل مشاكل المستخدم أسهل‬
‫ استخدام أجهزة الكمبيوتر بطريقة فعالة‬،
2. What are the four components the computer system?
• Hardware :- provides basic computing resources •
• 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
• Users :- People, machines, other computers
‫ يوفر موارد الحوسبة األساسية‬- :‫األجهزة‬
‫ يتحكم وينسق استخدام األجهزة بين مختلف التطبيقات والمستخدمين‬- :‫نظام التشغيل‬
‫ تحديد الطرق التي يتم بها استخدام موارد النظام لحل مشاكل الحوسبة‬- :‫البرامج التطبيقية‬
‫للمستخدمين‬
‫ األشخاص واآلالت وأجهزة الكمبيوتر األخرى‬- :‫المستخدمون‬
3. What is the bootstrap program function?
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
‫يتم تحميل برنامج التمهيد عند التشغيل أو إعادة التشغيل‬
‫ والمعروفة عموما باسم البرامج الثابتة‬ROM ‫ أو‬EPROM ‫عادة ما يتم تخزينها في‬
‫ تحميل نواة نظام التشغيل ويبدأ التنفيذ‬، ‫تهيئة جميع جوانب النظام‬
4. What is the Operating System Definition?
• OS is a resource allocator :- Manages all resources
• OS is a control program :- Controls execution of programs to
prevent errors and improper use of the computer
‫ يدير جميع الموارد‬- :‫نظام التشغيل هو مخصص الموارد‬
‫ يتحكم في تنفيذ البرامج لمنع األخطاء واالستخدام غير السليم‬-: ‫نظام التشغيل هو برنامج تحكم‬
‫للكمبيوتر‬
5. What are the differences between a trap and an interrupt?
Trap(exception) Interrupt
software-generated interrupt transfers control to the interrupt
caused either by an error or a service routine through the
user request interrupt vector
An operating system is interrupt must save the address of the
driven interrupted instruction
Ch 2
1. Distinguish between Program and process.
Program Process
Passive entity Active entity
Resides on disk as an executable Created when program is loaded
file into memory
Set of instructions not being Program in execution
executed

2. Why Direct Memory Access (DMA)is used?


Used for high-speed I/O devices able to transfer information
at close to memory speeds
‫ اإلخراج عالية السرعة القادرة على نقل المعلومات بسرعات قريبة من الذاكرة‬/ ‫يستخدم ألجهزة اإلدخال‬

3. Draw and Describe the process states?


• new: The process is being created
• running: Instructions are being executed
• waiting: The process is waiting for some event to occur
• ready: The process is waiting to be assigned to a processor
• terminated: The process has finished execution
4. Differentiate among short-term, medium-term, and long-
term scheduling.
short-term long-term medium-term
selects which selects which Remove process from
process should be processes should memory, store on
executed next be brought into the disk, bring back in
from disk to continue
and allocates CPU ready queue
execution: swapping
‫يحدد العملية التي يجب‬ ‫يحدد العمليات التي يجب‬
، ‫إزالة العملية من الذاكرة‬
‫تنفيذها بعد ذلك‬ ‫إدخالها فيها‬
، ‫وتخزينها على القرص‬
‫ويخصص وحدة المعالجة‬ ‫قائمة االنتظار الجاهزة‬
‫وإعادتها من القرص إلى‬
‫المركزية‬
‫ المبادلة‬:‫مواصلة التنفيذ‬

5. Describe the differences between I/O-bound programs from


CPU-bound programs?
- I/O-bound Process:- Spends more time doing I/O, many short
CPU bursts
- CPU-bound Process:- Spends more time doing Computations,
few very long CPU bursts.
Ch 3
1. Describe how the process take place in the CPU scheduling
decisions
when a process:
1. Switches from running to waiting state
2. Switches from running to ready state
3. Switches from waiting to ready
4. Terminates
2. Differentiate between Preemptive and Non-preemptive
Scheduling

3. Discuss the Scheduling Criteria


•CPU utilization: keep the CPU as busy as possible
•Throughput: Number of completed processes per time unit
•Turnaround time: amount of time to execute process
•Waiting time: amount of time a process has been waiting in the
ready queue
•Response time: Amount of time from request submission to the first
response produced
‫ حافظ على وحدة المعالجة المركزية مشغولة قدر اإلمكان‬:‫استخدام وحدة المعالجة المركزية‬
‫ عدد العمليات المكتملة لكل وحدة زمنية‬:‫اإلنتاجية‬
‫ مقدار الوقت الالزم لتنفيذ العملية‬:‫وقت االستجابة‬
‫ مقدار الوقت الذي تنتظره العملية في قائمة االنتظار الجاهزة‬:‫وقت االنتظار‬
‫ مقدار الوقت من تقديم الطلب إلى االستجابة األولى التي تم إنتاجها‬:‫وقت االستجابة‬
4. Consider the following processes, with the length of the CPU-burst
time.
Process Burst Time Priority
P1 10 3
P2 3 1
P3 2 2
P4 1 4

a. Draw the Gantt charts illustrating the execution of these processes


using FCFS, SJF , RR (quantum = 1), and priority (a smaller priority
number is the higher priority) Scheduling.
b. Calculate the waiting time for each process and the average waiting
time for each of the scheduling algorithms in part a.
c. Which of the schedules is the minimal average waiting time?
- The SJF is the minimal average waiting time
5. Which of the following scheduling algorithms could result in
starvation? and what is the solution? ( FCFS, SJF , RR , Priority )
• Problem ➔ Starvation – low priority processes may never execute.
• Solution ➔ Aging – as time progresses increase the priority of the
process.
Ch 4
1. Explain the Base and Limit Registers
• A pair of base and limit registers define the logical address
space
• Base register contains value of smallest physical address
• Limit register contains range of logical addresses – each
logical address must be less than the limit register.
2. Explain the difference between logical address physical
address
logical address physical address
generated by the CPU; also address seen by the memory unit
referred to as virtual address
is the set of all virtual addresses is the set of all actual addresses
generated by the CPU during generated by a program which is
program execution. a specific data element in
memory.

3. Describe the usage of Memory-Management Unit (MMU)


- maps logical addresses to physical addresses at runtime, ensuring
that user programs do not directly access physical memory addresses.
‫ مما يضمن أن برامج المستخدم‬، ‫تعيين عناوين منطقية إلى العناوين الفعلية في وقت التشغيل‬
‫ال الوصول مباشرة إلى عناوين الذاكرة الفعلية‬
4. Explain the difference between external and internal fragmentation.
• External Fragmentation – total memory space exists to satisfy a
request, but it is not contiguous.
• Internal Fragmentation – allocated memory may be slightly larger
than requested memory; this size difference is memory internal to a
partition, but not being used.
‫ ولكنها ليست متجاورة‬، ‫ توجد مساحة الذاكرة اإلجمالية لتلبية الطلب‬- ‫التجزئة الخارجية‬
‫ قد تكون الذاكرة المخصصة أكبر قليال من الذاكرة المطلوبة ؛ هذا االختالف‬- ‫التجزئة الداخلية‬
‫ ولكن ال يتم استخدامها‬، ‫في الحجم هو ذاكرة داخلية لقسم‬
5. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB,
and 600 KB (in order), how would each of the first-fit, best-fit, and
worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and
426 KB (in order)?Which algorithm makes the most efficient use of
memory?
First-fit: 212K is put in 500K partition
417K is put in 600K partition.
112K is put in 288K partition (new partition 288K = 500K - 212K)
426K must wait. ‫اول جزء من الذاكرة يكفى انة يستوعب العمليه‬
Best-fit: 212K is put in 300K partition
417K is put in 500K partition.
112K is put in 200K partition.
426K is put in 600K partition. ‫اصغر جزء من الذاكرة يكفى انة يستوعب العمليه‬
Worst-fit: 212K is put in 600K partition.
417K is put in 500K partition.
112K is put in 388K partition (new partition 388K = 600K - 212K)
426K must wait. ‫اكبر جزء من الذاكرة يكفى انة يستوعب العمليه‬
‫‪In this example, Best-fit turns out to be the best.‬‬

‫ملحوظة ‪ :‬استعنت ببعض الصور من ملخص لزمايلنا السنة اللى فاتت عشان فقدت‬
‫الشغف و انا بعمل الملخص‬

You might also like