BORING EDUCATION — LIVE EXPERIMENTProduct is live. Experiments are running. Feedback is being collected. Improvements are underway.Welcome to Boring Education. We're glad you're here while we're figuring out how to make learning better.
BORINGEDUCATION

1.6Free

System calls

Your guide: Miss HiraExplains computers with chai, cricket and your phone.

Asking the OS politely

A system call is a request a program makes to the OS to do a task the program cannot do directly. It is a bridge between user programs and the kernel, so applications reach the hardware and core OS functions safely.

Your book warns that programs controlling the hardware directly can be unsafe and complex. Example: when you save in a text editor, the program uses a system call to tell the OS to write the data to the storage drive.

Your book names four types. open opens a file for reading or writing, such as a music file. read gets data from a file or input device, such as text from a document. write sends data to a file or output device, such as saving an image.

fork creates a new process by duplicating an existing one; opening a new browser tab may use it. Linux and macOS have a few hundred system calls, while Windows has nearly 2,000.

Programs never touch the hardware themselves: they ask the kernel with a system call. open, read, write work on files and devices; fork makes a new process.

Step 1 / 7

Notes, short questions and MCQs

Read the full notes: key terms, model answers and MCQs with answers

Asking the OS politely

A system call is a request a program makes to the OS to do a task the program cannot do directly. It is a bridge between user programs and the kernel, so applications reach the hardware and core OS functions safely.

Your book warns that programs controlling the hardware directly can be unsafe and complex. Example: when you save in a text editor, the program uses a system call to tell the OS to write the data to the storage drive.

Your book names four types. open opens a file for reading or writing, such as a music file. read gets data from a file or input device, such as text from a document. write sends data to a file or output device, such as saving an image.

fork creates a new process by duplicating an existing one; opening a new browser tab may use it. Linux and macOS have a few hundred system calls, while Windows has nearly 2,000.

Programs never touch the hardware themselves: they ask the kernel with a system call. open, read, write work on files and devices; fork makes a new process.

Key terms

System call
Letting a program use hardware and core OS functions safely.
open
Opening a file for reading or writing.
write
Sending data to a file or output device.
fork
Creating a new process by duplicating an existing one.

Short questions with model answers

  1. Q1. Short Question 8 (p. 17): define a system call.

    • Say who asks whom.
    • Add its purpose.

    A request from a program to the OS to perform a task it cannot do directly; it lets programs reach hardware safely through the kernel.

  2. Q2. You open song.mp3, play it, then save a playlist. Name the system calls in order.

    • open
    • read
    • write

    open → read → write (and the playlist file is opened before it is written).

Common mistakes

  • ✗ Answering open or write for the system call that creates a new process.

    ✓ fork creates a new process by duplicating an existing one.

  • ✗ Swapping read and write: saying saving a file uses read.

    ✓ Data going out to a file or device is write; data coming in is read.

  • ✗ Saying programs work faster and safer by controlling hardware directly.

    ✓ Your book says direct control can be unsafe and complex; system calls are the safe route.

MCQs

  1. 1. Which system call is used to create a new process?

    1. (a) open
    2. (b) read
    3. (c) write
    4. (d) fork
    Show answer

    (d) Exercise MCQ 8 (p. 17); key p. 18; 1.6.1, p. 12.

  2. 2. Saving an image to the computer uses which system call?

    1. (a) read
    2. (b) write
    3. (c) fork
    4. (d) open
    Show answer

    (b) 1.6.1, p. 12.

  3. 3. A system call acts as a bridge between:

    1. (a) User programs and the kernel
    2. (b) Two users
    3. (c) RAM and virtual memory
    4. (d) The shell and the screen
    Show answer

    (a) 1.6, p. 12.

  4. 4. Reading text from a document uses:

    1. (a) fork
    2. (b) write
    3. (c) read
    4. (d) close
    Show answer

    (c) 1.6.1, p. 12.

  5. 5. About how many system calls does Windows use, according to your book?

    1. (a) A few
    2. (b) About 50
    3. (c) A few hundred
    4. (d) Nearly 2,000
    Show answer

    (d) Do You Know, p. 12.

Quick revision

  • A system call is a program's request to the OS for a task it cannot do directly.
  • It is the safe bridge between user programs and the kernel.
  • open opens a file, read brings data in, write sends data out, and fork creates a new process.

Before you start

What is Class 10 Computer Science System calls?
System calls is the open Class 10 Computer Science lesson for Matric Part 2, Punjab board. It is a step-by-step lesson, not a PDF of the book.
Which boards is this Class 10 Computer Science lesson for?
The same Punjab textbook: Lahore, Rawalpindi, Gujranwala, Faisalabad, Multan, Sargodha, Bahawalpur, Dera Ghazi Khan, Sahiwal.
Can I study this in Urdu?
Yes. English, Urdu or Roman Urdu. Science terms stay as the exam writes them.
Is this a notes PDF?
No. The book stays with you. This page is the lesson and the check.

Found a mistake? Tell us the lesson and the line at exciting@boringeducation.com.

Free right now. No ads. Tell us what to fix.