Class 10 Computer Science Chapter 1 Complete Guide Book — Operating Systems: Structure and Services | PunjabTest.com

Class 10 Computer Science Chapter 1 — Operating Systems: Structure and Services
Home > PunjabTest.com > Class 10 > Computer Science — all chapters > Chapter 1: Operating Systems: Structure and Services

اس chapter میں topics (Topics in this chapter)

Source note: This chapter is built from the existing PunjabTest.com library chapter for Class 10 Computer Science. No official book was available on disk for this build, so no book page numbers are claimed, and the exercise below is labelled SLO / board-pattern, as in the library chapter — it is not presented as the book's official exercise.

ماخذ نوٹ: یہ باب کلاس دہم کمپیوٹر سائنس کے موجودہ لائبریری باب سے بنایا گیا ہے۔ اس بلڈ کے لیے سرکاری کتاب ڈسک پر موجود نہیں تھی، اس لیے کتاب کے صفحہ نمبرز کا دعویٰ نہیں کیا گیا اور نیچے دی گئی مشق ایس ایل او / بورڈ پیٹرن کے طور پر لیبل کی گئی ہے — یہ کتاب کی سرکاری ایکسرسائز نہیں ہے۔

1.1 What is an Operating System?آپریٹنگ سسٹم کیا ہے؟
🏷 Tags: What is an Operating System?, operating system (OS)
ENGLISH

An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs. It works as a bridge (middle layer) between the user and the computer hardware: the user gives instructions, and the OS makes the hardware carry them out.

OS as the central controller: The OS controls the CPU, memory, storage and devices, decides which program runs when, and keeps programs from disturbing each other. Without an OS, every program would have to talk to the hardware directly, which would be slow and unsafe.

Multi-user environment: In schools, offices and online systems many people may use the same computer. The OS ensures: the creation and management of separate user accounts; each user's files and information stay private; resources are shared fairly so one user does not slow down the system; and shared resources are protected from unauthorised access.

💡 یاد رکھو

OS = system software. It does NOT create documents itself — it gives applications (like Word, browser, games) the services they need to run.

اردو

آپریٹنگ سسٹم (OS) ایک سسٹم سافٹ ویئر ہے جو کمپیوٹر کے ہارڈ ویئر اور سافٹ ویئر وسائل کو منظم کرتا ہے اور پروگراموں کو عام خدمات فراہم کرتا ہے۔ یہ صارف اور ہارڈ ویئر کے درمیان پل کا کام کرتا ہے: صارف ہدایت دیتا ہے اور OS ہارڈ ویئر سے وہ کام کرواتا ہے۔

مرکزی کنٹرولر کے طور پر OS: OS سی پی یو، میموری، اسٹوریج اور ڈیوائسز کو کنٹرول کرتا ہے، طے کرتا ہے کہ کون سا پروگرام کب چلے گا، اور پروگراموں کو ایک دوسرے میں مداخلت سے بچاتا ہے۔ OS کے بغیر ہر پروگرام کو خود ہارڈ ویئر سے بات کرنی پڑتی جو سست اور غیر محفوظ ہوتا۔

کثیر صارف ماحول: اسکولوں، دفاتر اور آن لائن سسٹمز میں کئی لوگ ایک ہی کمپیوٹر استعمال کر سکتے ہیں۔ OS یقینی بناتا ہے: الگ الگ یوزر اکاؤنٹس بننا اور ان کا انتظام؛ ہر صارف کی فائلیں اور معلومات نجی رہیں؛ وسائل منصفانہ طور پر بانٹے جائیں تاکہ ایک صارف نظام کو سست نہ کرے؛ اور مشترکہ وسائل غیر مجاز رسائی سے محفوظ رہیں۔

USER (you)▼APPLICATIONS (browser, Word, games)▼OPERATING SYSTEM▼HARDWARE (CPU, memory, disk, devices)
OS کیا ہے سے سمجھو: User → Applications → Operating System → Hardware

صارف → ایپلی کیشنز → آپریٹنگ سسٹم → ہارڈ ویئر
1.2 Kernel vs Shellکرنل بمقابلہ شیل
🏷 Tags: Kernel vs Shell
ENGLISH

The architecture of an operating system is the way its parts are organised and how they work together. Two parts matter most:

Kernel: The kernel is the core part of the OS. It directly controls the hardware and system software such as the CPU, memory and devices, and decides how and when programs may use these resources. Example: when you open a file, the kernel manages reading it from the hard disk and sending it to the screen. Think of the kernel as the engine of a car.

Shell: The shell is the outer part of the OS that interacts with the user. It receives commands from the user and passes them to the kernel. There are two kinds: graphical shells (like the Windows desktop, where you click icons and use menus) and command-line shells (like Command Prompt or Terminal, where you type instructions). The shell is like the car's steering wheel and dashboard — the part you touch.

اردو

آپریٹنگ سسٹم کی آرکیٹیکچر اس کے حصوں کی تنظیم اور ان کے مل کر کام کرنے کا طریقہ ہے۔ دو حصے سب سے اہم ہیں:

کرنل: کرنل OS کا مرکزی حصہ ہے۔ یہ براہ راست ہارڈ ویئر اور سسٹم سافٹ ویئر جیسے سی پی یو، میموری اور ڈیوائسز کو کنٹرول کرتا ہے اور طے کرتا ہے کہ پروگرام ان وسائل کو کیسے اور کب استعمال کر سکتے ہیں۔ مثال: جب آپ کوئی فائل کھولتے ہیں تو کرنل اسے ہارڈ ڈسک سے پڑھنے اور اسکرین پر بھیجنے کا انتظام کرتا ہے۔ کرنل کو گاڑی کے انجن کی طرح سمجھیں۔

شیل: شیل OS کا بیرونی حصہ ہے جو صارف سے تعامل کرتا ہے۔ یہ صارف سے کمانڈز لیتا ہے اور کرنل تک پہنچاتا ہے۔ دو اقسام ہیں: گرافیکل شیل (جیسے ونڈوز ڈیسک ٹاپ، جہاں آپ آئیکنز پر کلک کرتے ہیں) اور کمانڈ لائن شیل (جیسے کمانڈ پرامپٹ یا ٹرمینل، جہاں آپ ہدایات ٹائپ کرتے ہیں)۔ شیل گاڑی کے اسٹیئرنگ اور ڈیش بورڈ کی طرح ہے — وہ حصہ جسے آپ چھوتے ہیں۔

USER▼SHELL (graphical or command-line)▼KERNEL (core: CPU, memory, devices)▼HARDWARE
Kernel aur shell se samjho: Shell takes your command; kernel carries it out on the hardware

شیل آپ کی کمانڈ لیتا ہے؛ کرنل اسے ہارڈ ویئر پر نافذ کرتا ہے
1.2 OS Layers, System Libraries and Device Driversاو ایس لیئرز، سسٹم لائبریریز اور ڈیوائس ڈرائیورز
🏷 Tags: OS Layers, System Libraries and Device Drivers
ENGLISH

Layers and modular design: In operating systems the design is divided into layers, each with a specific job. The lower layer works directly with hardware devices like the CPU, RAM and hard disk. The middle layer manages these resources and makes sure programs can use them when needed. The upper layer runs applications and provides the interface the user sees on the screen. Each layer depends on the one below it, which makes the OS easier to manage, repair and improve without changing the whole system.

School example: Support staff (guards, cleaners) work at the base keeping the school ready — like lower layers working with hardware. The administration manages resources, schedules and rules — like middle layers managing memory and storage. Teachers and students use these arrangements to teach and learn — like upper layers running applications.

System libraries are collections of ready-made instructions that programs can use for common tasks, such as opening files or showing text on the screen. Example: a photo app uses the OS library to read an image instead of inventing its own method. Device drivers are special programs that allow the OS to communicate with hardware devices such as printers, keyboards and graphics cards.

اردو

لیئرز اور ماڈیولر ڈیزائن: آپریٹنگ سسٹمز میں ڈیزائن کو لیئرز میں تقسیم کیا جاتا ہے، ہر لیئر کا ایک خاص کام ہوتا ہے۔ نچلی لیئر براہ راست ہارڈ ویئر ڈیوائسز جیسے سی پی یو، ریم اور ہارڈ ڈسک سے کام کرتی ہے۔ درمیانی لیئر ان وسائل کا انتظام کرتی ہے اور یقینی بناتی ہے کہ پروگرام ضرورت کے وقت انہیں استعمال کر سکیں۔ اوپری لیئر ایپلی کیشنز چلاتی ہے اور وہ انٹرفیس فراہم کرتی ہے جو صارف اسکرین پر دیکھتا ہے۔ ہر لیئر نیچے والی پر منحصر ہوتی ہے، جس سے OS کو پورا نظام بدلے بغیر منظم، مرمت اور بہتر کرنا آسان ہو جاتا ہے۔

اسکول کی مثال: معاون عملہ (گارڈز، کلینرز) بنیاد پر کام کر کے اسکول کو تیار رکھتا ہے — جیسے نچلی لیئرز ہارڈ ویئر سے کام کرتی ہیں۔ انتظامیہ وسائل، شیڈول اور قواعد کا انتظام کرتی ہے — جیسے درمیانی لیئرز میموری اور اسٹوریج سنبھالتی ہیں۔ اساتذہ اور طلبہ ان انتظامات کو پڑھنے پڑھانے کے لیے استعمال کرتے ہیں — جیسے اوپری لیئرز ایپلی کیشنز چلاتی ہیں۔

سسٹم لائبریریز تیار شدہ ہدایات کے مجموعے ہیں جنہیں پروگرام عام کاموں جیسے فائل کھولنے یا اسکرین پر متن دکھانے کے لیے استعمال کر سکتے ہیں۔ مثال: فوٹو ایپ تصویر پڑھنے کے لیے OS کی لائبریری استعمال کرتی ہے۔ ڈیوائس ڈرائیورز خاص پروگرام ہیں جو OS کو پرنٹر، کی بورڈ اور گرافکس کارڈ جیسی ڈیوائسز سے رابطہ کرنے دیتے ہیں۔

UPPER LAYER: applications + user interface▼MIDDLE LAYER: resource management▼LOWER LAYER: hardware (CPU, RAM, disk)
OS layers se samjho: OS layers: upper depends on middle, middle on lower

او ایس لیئرز: اوپری درمیانی پر، درمیانی نچلی پر منحصر ہے
1.3 Process Management and Threadsپروسیس مینجمنٹ اور تھریڈز
🏷 Tags: Process Management and Threads, process
ENGLISH

A process is a program in execution — for example, your browser running, or a game loading. Process management is the OS job of creating processes, scheduling them on the CPU, switching between them, and ending them when they finish or fail.

Because the CPU can truly do one thing at a time, the OS gives each process a short turn (a time slice) and switches rapidly, so many programs appear to run together. This is multitasking. The OS also handles process states: a process may be new, ready, running, waiting (for example waiting for a file or key press), or terminated.

Threads: A thread is a smaller unit inside a process — a single path of execution. One process can have several threads doing different parts of the job at once (for example, a browser thread loading a page while another plays a video). Threads of the same process share its memory, so switching between threads is cheaper than switching between whole processes. Process vs thread: a process is a whole running program with its own memory; a thread is a lightweight part of a process that shares that memory.

اردو

پروسیس چلتا ہوا پروگرام ہے — مثلاً آپ کا براؤزر چل رہا ہو یا کوئی گیم لوڈ ہو رہی ہو۔ پروسیس مینجمنٹ OS کا وہ کام ہے جس میں پروسیسز بنانا، انہیں سی پی یو پر شیڈول کرنا، ان کے درمیان تبدیلی کرنا اور ختم ہونے یا ناکام ہونے پر انہیں بند کرنا شامل ہے۔

چونکہ سی پی یو حقیقت میں ایک وقت میں ایک کام کرتا ہے، OS ہر پروسیس کو ایک مختصر باری (ٹائم سلائس) دیتا ہے اور تیزی سے تبدیلی کرتا ہے، اس لیے کئی پروگرام ایک ساتھ چلتے محسوس ہوتے ہیں۔ اسے ملٹی ٹاسکنگ کہتے ہیں۔ OS پروسیس کی حالتوں کو بھی سنبھالتا ہے: پروسیس نیا، تیار، چلتا ہوا، انتظار میں (مثلاً فائل یا کی پریس کا انتظار) یا ختم شدہ ہو سکتا ہے۔

تھریڈز: تھریڈ پروسیس کے اندر ایک چھوٹی اکائی ہے — عمل درآمد کا ایک راستہ۔ ایک پروسیس کے کئی تھریڈز ایک ساتھ کام کے مختلف حصے کر سکتے ہیں (مثلاً براؤزر کا ایک تھریڈ صفحہ لوڈ کرے اور دوسرا ویڈیو چلائے)۔ ایک ہی پروسیس کے تھریڈز اس کی میموری بانٹتے ہیں، اس لیے تھریڈز کے درمیان تبدیلی پورے پروسیسز کے درمیان تبدیلی سے سستی ہوتی ہے۔ پروسیس بمقابلہ تھریڈ: پروسیس اپنی میموری والا مکمل چلتا پروگرام ہے؛ تھریڈ پروسیس کا ہلکا حصہ ہے جو وہی میموری بانٹتا ہے۔

NEW: process created▼READY: waiting for CPU turn▼RUNNING: using the CPU▼WAITING / TERMINATED
Process aur threads se samjho: Process states: new → ready → running → waiting / terminated

پروسیس کی حالتیں: نیا → تیار → چلتا ہوا → انتظار / ختم
1.4 Memory Managementمیموری مینجمنٹ
🏷 Tags: Memory Management, Memory management
ENGLISH

Memory management is how the OS keeps track of the computer's memory (mainly RAM), gives each program the memory it needs, and takes it back when the program ends. RAM is fast but limited and temporary — everything in it is lost when power goes off.

The OS must: keep a record of which parts of memory are free and which are in use; allocate memory to processes when they start; protect one process's memory from another's (so a faulty program cannot corrupt others); and free memory when a process ends, so it can be reused. When RAM runs short, the OS may move less-used data to a special area on the disk (virtual memory / swap space) and bring it back when needed — slower, but it lets more programs run than RAM alone would allow.

Why it matters for you: Opening too many heavy programs at once slows the computer because RAM fills up and the OS spends time swapping data to disk. Closing unused programs frees memory and speeds things up again.

اردو

میموری مینجمنٹ یہ ہے کہ OS کمپیوٹر کی میموری (بنیادی طور پر ریم) کا حساب کیسے رکھتا ہے، ہر پروگرام کو ضرورت کی میموری کیسے دیتا ہے اور پروگرام ختم ہونے پر اسے واپس کیسے لیتا ہے۔ ریم تیز مگر محدود اور عارضی ہے — بجلی بند ہونے پر اس میں موجود سب کچھ ختم ہو جاتا ہے۔

OS کو یہ کرنا ہوتا ہے: میموری کے کون سے حصے خالی اور کون سے استعمال میں ہیں اس کا ریکارڈ رکھنا؛ پروسیس شروع ہونے پر اسے میموری دینا؛ ایک پروسیس کی میموری کو دوسرے سے محفوظ رکھنا (تاکہ خراب پروگرام دوسروں کو خراب نہ کرے)؛ اور پروسیس ختم ہونے پر میموری آزاد کرنا تاکہ دوبارہ استعمال ہو سکے۔ جب ریم کم پڑ جائے تو OS کم استعمال شدہ ڈیٹا کو ڈسک کے خاص حصے (ورچوئل میموری / سواپ اسپیس) میں منتقل کر سکتا ہے اور ضرورت پر واپس لا سکتا ہے — یہ سست ہے مگر اس سے صرف ریم سے زیادہ پروگرام چل سکتے ہیں۔

آپ کے لیے یہ کیوں اہم ہے: ایک ساتھ بہت سے بھاری پروگرام کھولنے سے کمپیوٹر سست ہو جاتا ہے کیونکہ ریم بھر جاتی ہے اور OS ڈیٹا کو ڈسک پر منتقل کرنے میں وقت لگاتا ہے۔ غیر استعمال شدہ پروگرام بند کرنے سے میموری آزاد ہوتی ہے اور رفتار واپس آ جاتی ہے۔

PROGRAMS request memory▼OS: tracks free / used RAM▼OS: allocates + protects memory▼OS: frees memory when done
Memory management se samjho: OS allocates, protects and frees RAM

OS ریم مختص کرتا ہے، محفوظ رکھتا ہے اور آزاد کرتا ہے
1.5 System Calls and File Systemسسٹم کالز اور فائل سسٹم
🏷 Tags: System Calls and File System, system call, file system
ENGLISH

A system call is the way a program asks the operating system (kernel) to do something it cannot do itself — for example, read a file, print a document, create a process, or use the network. The program makes the call, the kernel performs the privileged work, and the result is returned to the program. System calls are the controlled doorway between applications and hardware: programs never touch hardware directly.

The file system is how the OS organises data on storage. Files are grouped into folders (directories) in a tree-like (hierarchical) structure, each file has a name, location (path), size and permissions, and the OS handles creating, opening, reading, writing, renaming, moving and deleting files. It also tracks where each file's data actually sits on the disk, so that a file can be found again even though its pieces may be stored in different places.

Permissions matter: File permissions decide who may read, write or run a file. This protects your work: another user account on the same computer cannot freely open or change your private files.

اردو

سسٹم کال وہ طریقہ ہے جس سے پروگرام آپریٹنگ سسٹم (کرنل) سے وہ کام کرنے کو کہتا ہے جو وہ خود نہیں کر سکتا — مثلاً فائل پڑھنا، دستاویز پرنٹ کرنا، پروسیس بنانا یا نیٹ ورک استعمال کرنا۔ پروگرام کال کرتا ہے، کرنل وہ خاص کام کرتا ہے اور نتیجہ پروگرام کو واپس ملتا ہے۔ سسٹم کالز ایپلی کیشنز اور ہارڈ ویئر کے درمیان کنٹرول شدہ دروازہ ہیں: پروگرام کبھی براہ راست ہارڈ ویئر کو نہیں چھوتے۔

فائل سسٹم وہ طریقہ ہے جس سے OS اسٹوریج پر ڈیٹا کو منظم کرتا ہے۔ فائلیں فولڈرز (ڈائریکٹریز) میں درخت نما (ہائرارکیکل) ساخت میں گروپ ہوتی ہیں، ہر فائل کا نام، مقام (پاتھ)، سائز اور اجازتیں ہوتی ہیں، اور OS فائلیں بنانے، کھولنے، پڑھنے، لکھنے، نام بدلنے، منتقل کرنے اور حذف کرنے کا انتظام کرتا ہے۔ یہ یہ بھی ٹریک کرتا ہے کہ فائل کا ڈیٹا ڈسک پر اصل میں کہاں ہے، تاکہ فائل دوبارہ مل سکے چاہے اس کے حصے مختلف جگہوں پر ہوں۔

اجازتیں اہم ہیں: فائل کی اجازتیں طے کرتی ہیں کہ کون فائل پڑھ، لکھ یا چلا سکتا ہے۔ یہ آپ کے کام کی حفاظت کرتی ہے: اسی کمپیوٹر پر دوسرا یوزر اکاؤنٹ آپ کی نجی فائلوں کو آزادانہ طور پر کھول یا بدل نہیں سکتا۔

PROGRAM: needs a file▼SYSTEM CALL to kernel▼KERNEL: reads disk safely▼RESULT returned to program
System calls aur file system se samjho: Program → system call → kernel → result

پروگرام → سسٹم کال → کرنل → نتیجہ
1.6 Types of Operating Systemsآپریٹنگ سسٹمز کی اقسام
🏷 Tags: Types of Operating Systems
ENGLISH

Operating systems are grouped by how they serve users and jobs:

TypeHow it worksExample use
Single-userOne user, one task focus at a time (modern versions still multitask programs for that user).Personal computer at home
Multi-userMany users with separate accounts share one computer; OS keeps their work private.School computer lab, office server
BatchSimilar jobs are collected into batches and run without user interaction.Old mainframes; bulk printing jobs
Time-sharingCPU time is shared in quick slices so many users feel they each have the machine.University servers
Real-time (RTOS)Must respond within a strict time limit; delay could cause harm.Car airbags, medical monitors, robots
DistributedMany computers work together and appear as one system.Cloud services, large networks

Common real systems: Windows, macOS and Linux (desktop/laptop), Android and iOS (mobile). Linux is open-source; Windows and macOS are commercial. A good board answer names the type and explains why it fits the situation.

اردو

آپریٹنگ سسٹمز کو اس بنیاد پر گروپ کیا جاتا ہے کہ وہ صارفین اور کاموں کی کیسے خدمت کرتے ہیں:

قسمکام کرنے کا طریقہمثال
سنگل یوزرایک صارف، ایک وقت میں ایک کام پر توجہ (جدید ورژن اس صارف کے لیے پروگرام ملٹی ٹاسک کرتے ہیں)۔گھر کا ذاتی کمپیوٹر
ملٹی یوزرکئی صارف الگ اکاؤنٹس سے ایک کمپیوٹر بانٹتے ہیں؛ OS ان کا کام نجی رکھتا ہے۔اسکول لیب، دفتر کا سرور
بیچملتے جلتے کام بیچوں میں جمع کر کے بغیر صارف کی مداخلت کے چلائے جاتے ہیں۔پرانے مین فریم؛ بلک پرنٹنگ
ٹائم شیئرنگسی پی یو کا وقت تیز سلائسز میں بانٹا جاتا ہے تاکہ ہر صارف کو لگے مشین اسی کی ہے۔یونیورسٹی سرورز
ریئل ٹائمسخت وقت کی حد میں جواب دینا ضروری؛ تاخیر نقصان پہنچا سکتی ہے۔کار ایئر بیگز، میڈیکل مانیٹر، روبوٹس
ڈسٹری بیوٹڈکئی کمپیوٹر مل کر کام کرتے ہیں اور ایک نظام لگتے ہیں۔کلاؤڈ سروسز، بڑے نیٹ ورکس

عام حقیقی سسٹمز: ونڈوز، میک او ایس اور لینکس (ڈیسک ٹاپ/لیپ ٹاپ)، اینڈرائیڈ اور آئی او ایس (موبائل)۔ لینکس اوپن سورس ہے؛ ونڈوز اور میک او ایس تجارتی ہیں۔ اچھے بورڈ جواب میں قسم کا نام اور یہ وضاحت ہوتی ہے کہ وہ صورتحال کے لیے کیوں موزوں ہے۔

ONE USER: single-user OS▼MANY USERS: multi-user / time-sharing▼MANY MACHINES: distributed OS▼STRICT TIMING: real-time OS
OS ki aqsaam se samjho: OS types: by users, machines and timing needs

او ایس کی اقسام: صارفین، مشینوں اور وقت کی ضرورت کے لحاظ سے
📝 SLO / Board-Pattern Questions — with Answersایس ایل او / بورڈ پیٹرن سوالات — جوابات کے ساتھ
SLO-BASED — NOT THE OFFICIAL EXERCISE

Book note (please read): This page follows the PCTB book Computer Science and Entrepreneurship, Class 10 (session 2026–27). The chapter titles and section order were verified against current 2026–27 Punjab listings and the board syllabus for this book. The book PDF itself could not be opened page-by-page during this build, so the questions below are SLO / board-pattern questions written for this chapter — they are NOT presented as the book's official exercise. Where a point was not confirmed from the book, it is kept general and no invented fact is stated as a book fact.

ایس ایل او پر مبنی

کتاب کے بارے میں نوٹ: یہ صفحہ پی سی ٹی بی کی کتاب کمپیوٹر سائنس اینڈ انٹرپرینیورشپ، جماعت دہم (سیشن 2026–27) کے مطابق ہے۔ باب کے عنوانات اور ترتیب موجودہ 2026–27 کی پنجاب لسٹنگز اور بورڈ سلیبس سے تصدیق شدہ ہیں۔ کتاب کا پی ڈی ایف اس بلڈ کے دوران صفحہ بہ صفحہ نہیں کھولا جا سکا، اس لیے نیچے دیے گئے سوالات ایس ایل او / بورڈ پیٹرن کے سوالات ہیں — یہ کتاب کی سرکاری ایکسرسائز نہیں ہیں۔

Section 1: Multiple Choice Questionsحصہ 1: کثیر الانتخابی سوالات
1. Which part of the OS directly controls the CPU, memory and devices?

Answer: (b) Kernel — the kernel is the core part that directly controls hardware and system resources.

2. Which shell lets the user click icons and menus?

Answer: (b) Graphical shell — e.g. the Windows desktop; command-line shells take typed instructions.

3. In a layered OS design, which layer works directly with hardware?

Answer: (c) Lower layer — it works directly with the CPU, RAM and disk; the middle layer manages resources and the upper layer runs applications.

4. A program in execution is called a:

Answer: (c) Process — a thread is a smaller unit of execution inside a process.

5. Which of the following is lost when the computer is switched off?

Answer: (b) RAM contents — RAM is temporary; disk storage is permanent.

6. A request by a program to the kernel to read a file is an example of a:

Answer: (a) System call — the controlled way programs ask the kernel for privileged work.

7. Which OS type must respond within a strict time limit?

Answer: (b) Real-time OS — e.g. airbags and medical monitors, where delay could cause harm.

8. Device drivers are programs that:

Answer: (b) Let the OS communicate with hardware devices such as printers, keyboards and graphics cards.

Section 2: Short Questionsحصہ 2: مختصر سوالات
1. Define operating system.

Answer: An operating system is system software that manages computer hardware and software resources and provides common services for computer programs, acting as a bridge between the user and the hardware.

2. Differentiate between kernel and shell.

Answer: Kernel: the core part of the OS that directly controls hardware (CPU, memory, devices) and resource use. Shell: the outer part that interacts with the user, taking commands and passing them to the kernel; it may be graphical (icons/menus) or command-line (typed commands).

3. What is a process? How is it different from a thread?

Answer: A process is a program in execution with its own memory. A thread is a smaller unit of execution inside a process; threads of one process share its memory, so switching threads is cheaper than switching processes.

4. Why does the OS protect one process's memory from another?

Answer: So that a faulty or misbehaving program cannot corrupt another program's data or crash the whole system; each process works in its own protected memory area.

5. What is a system call? Give two examples.

Answer: A system call is a request by a program to the kernel to perform work it cannot do itself, e.g. reading a file and creating a new process (also: printing, using the network).

Section 3: Long Questionsحصہ 3: تفصیلی سوالات
1. Explain the layered architecture of an operating system with the school example.

Answer: OS design is divided into layers with specific jobs: the lower layer works directly with hardware (CPU, RAM, disk); the middle layer manages resources so programs can use them when needed; the upper layer runs applications and provides the user interface. Each layer depends on the one below it, making the OS easier to manage, repair and improve. School example: support staff at the base keep the school ready (lower layer); administration manages resources, schedules and rules (middle layer); teachers and students teach and learn using these arrangements (upper layer).

2. Describe process management and multitasking in an OS.

Answer: Process management means creating processes, scheduling them on the CPU, switching between them, and ending them. A process passes through states: new, ready, running, waiting (e.g. for input or a file) and terminated. Since the CPU does one thing at a time, the OS gives each process a short time slice and switches rapidly, so many programs appear to run together — this is multitasking. Threads let one process do several parts of its job at once while sharing its memory.

3. Compare types of operating systems and give a suitable use for each.

Answer: Single-user: one user at a time, e.g. a home PC. Multi-user: many separate accounts share one machine with private work, e.g. a school lab. Batch: jobs collected and run without interaction, e.g. bulk printing. Time-sharing: CPU slices shared so many users feel they own the machine, e.g. university servers. Real-time: strict deadlines, e.g. airbags, medical monitors. Distributed: many computers appear as one system, e.g. cloud services. The right choice depends on users, timing needs and scale.

📌 باب کا خلاصہ اور رہنمائی — اس باب میں کیا ہے؟

This chapter explains the operating system from the ground up: what an OS is and why every computer needs one, how the kernel and shell divide the work, how OS layers, system libraries and device drivers fit together, how processes and threads are managed, how memory is shared safely, how programs ask the kernel for help through system calls, and which type of OS suits which job.

Revision guidance: Revision guidance: first say in one line what the OS does, then name the kernel, shell and three layers without looking. Practise the MCQ answers until kernel vs shell and process vs thread are instant, then retell the layered design using the school example from the long questions.

یہ باب آپریٹنگ سسٹم کو بنیاد سے سمجھاتا ہے: OS کیا ہے اور ہر کمپیوٹر کو اس کی ضرورت کیوں ہے، کرنل اور شیل کام کیسے بانٹتے ہیں، OS لیئرز، سسٹم لائبریریز اور ڈیوائس ڈرائیورز کیسے جڑتے ہیں، پروسیس اور تھریڈز کا انتظام کیسے ہوتا ہے، میموری محفوظ طریقے سے کیسے بانٹی جاتی ہے، پروگرام سسٹم کالز کے ذریعے کرنل سے مدد کیسے مانگتے ہیں، اور کس کام کے لیے کس قسم کا OS موزوں ہے۔

نظرثانی کی رہنمائی: نظرثانی کی رہنمائی: پہلے ایک جملے میں بتاؤ کہ OS کیا کرتا ہے، پھر دیکھے بغیر کرنل، شیل اور تین لیئرز کے نام لو۔ MCQ جوابات کی مشق کرو یہاں تک کہ kernel بمقابلہ shell اور process بمقابلہ thread فوراً یاد آ جائیں، پھر لیئرڈ ڈیزائن اسکول کی مثال سے دوبارہ سناؤ۔

🎯 مزید MCQs اور Tests کے لیے

Chapter-wise tests, fresh random papers اور instant score کے لیے PunjabTest.com کا میں test section دیکھو:

PunjabTest.com — Tests →

PunjabTest.com — Complete Guide Book • Class 10 Computer Science, Chapter 1 (Session 2026–27) • English + Urdu

← Class 10: Computer Science — all chaptersChapter 2 →