Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views5 pages

Important Notes For The Subject Operating System

Uploaded by

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

Important Notes For The Subject Operating System

Uploaded by

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

Important Notes for the Subject Operating system

Chapter 1: Introduction to OS

Question 1.1 (4 marks)

Define the term "Operating System" and briefly describe the four main components of a computer
system as outlined in the notes.

 Answer: An Operating System is system software that acts as an intermediary between users
and computer hardware, managing resources and providing common services for programs.
The four components are:

1. Hardware: The physical computing resources like the CPU, memory, and I/O devices.

2. Operating System: Controls and coordinates the use of the hardware.

3. Application Programs: Software that uses system resources to solve user problems.

4. Users: The people or other entities using the system.

Question 1.2 (4 marks)

What is a system call, and why is it needed?

 Answer: A system call is a programmatic way for a computer program to request a service
from the operating system's kernel. It is needed to allow a user program to access protected
hardware resources and perform privileged operations, such as file I/O or creating a new
process.

Question 1.3 (4 marks)

Explain the function of Process Management and Memory Management within an Operating
System.

 Answer: Process Management involves creating, scheduling, and terminating processes to


ensure efficient use of the CPU. Memory Management handles the allocation and
deallocation of memory space to processes to prevent them from interfering with each other
and to make the most efficient use of available memory.

Question 1.4 (4 marks)

List and briefly describe two of the key functions of an Operating System.

 Answer:

1. File System Management: Involves organizing, storing, and retrieving files, providing
a logical view of the storage devices to the user.

2. Security & Protection: Prevents unauthorized access and ensures the integrity of
data and resources.
Question 1.5 (4 marks)

Explain the difference between a CLI (Command-Line Interface) and a GUI (Graphical User
Interface).

 Answer: A CLI is a text-based interface where users type commands to interact with the OS.
A GUI is a graphical interface that uses icons, windows, and menus, making it more user-
friendly and intuitive.

Chapter 2: Processes

Question 2.1 (4 marks)

Explain the difference between a Process and a Program. List and briefly describe three of the five
process states.

 Answer: A Process is a dynamic, active entity that is a program in execution, loaded into
main memory. A Program is a static, passive entity that is a sequence of instructions stored in
secondary storage. Three process states are:

o New: The process is being created.

o Ready: The process is waiting to be assigned to a processor.

o Running: The process is currently being executed by the CPU.

Question 2.2 (4 marks)

What is a Context Switch? What is a Process Control Block (PCB), and what is its role in a context
switch?

 Answer: A Context Switch is the process of the scheduler saving the state of one process and
switching the CPU to another process. A Process Control Block (PCB) is a data structure used
by the OS to represent and store information about each process. During a context switch,
the scheduler saves the current process's information into its PCB and then loads the
information for the new process from its PCB.

Question 2.3 (4 marks)

What is a Thread, and how is it different from a process? Name two benefits of using threads.

 Answer: A Thread is a lightweight process and the basic unit of CPU utilization. It is different
from a process because multiple threads can exist within a single process and share
resources like code and data, while processes are independent. Two benefits are:
Responsiveness and Resource Sharing.

Question 2.4 (4 marks)

Briefly explain the Many-to-One and One-to-One multithreading models.

 Answer: In the Many-to-One model, many user-level threads are mapped to a single kernel
thread. In the One-to-One model, each user-level thread is mapped to a separate kernel
thread.
Question 2.5 (4 marks)

What is the purpose of the fork() system call? What is the difference in its return value for the
parent and child processes?

 Answer: The fork() system call is used to create a new process, which is a duplicate of the
calling process. For the parent process, fork() returns the process ID of the newly created
child. For the child process, it returns 0.

Chapter 3: Process Scheduling

Question 3.1 (4 marks)

What are the primary goals of process scheduling?

 Answer: The main goals of CPU scheduling are:

o High processor utilization (keeping the CPU busy).

o High throughput (number of processes completed per unit time).

o Low response time (time from request submission to first response).

o Low waiting time (time a process spends waiting in queues).

Question 3.2 (4 marks)

Explain the difference between a CPU-bound process and an I/O-bound process.

 Answer: A CPU-bound process has long CPU bursts and needs the CPU for most of its
execution time. An I/O-bound process has many short CPU bursts and spends a lot of time
waiting for I/O operations to complete.

Question 3.3 (4 marks)

Briefly describe the purpose of the Long-term, Short-term, and Medium-term schedulers.

 Answer:

o Long-term scheduler: Selects jobs from the job pool to be loaded into main memory.

o Short-term scheduler: Selects a process from the ready queue and allocates the CPU
to it.

o Medium-term scheduler: Swaps processes in and out of main memory.

Question 3.4 (4 marks)

What is the primary difference between Preemptive and Non-preemptive scheduling? Also, explain
the problem of starvation in priority scheduling and a possible solution to it.

 Answer: In preemptive scheduling, the OS can interrupt a running process. In non-


preemptive scheduling, a process runs until it finishes or voluntarily gives up the CPU.
Starvation is a problem in priority scheduling where a low-priority process may never get to
run. A solution is aging, where the priority of a waiting process is gradually increased over
time.
Question 3.5 (4 marks)

Explain how the Round Robin (RR) scheduling algorithm works, and what is a time quantum?

 Answer: The Round Robin algorithm is a preemptive FCFS algorithm designed for time-
sharing systems. Each process gets a small unit of CPU time called a time quantum. If a
process doesn't finish within its quantum, it is preempted and put at the back of the ready
queue.
Summary of all the 3 chapters and what are they about.
Chapter 1: Introduction to OS

This chapter introduces the fundamental concepts of an Operating System (OS). It defines an OS as
system software that acts as a bridge between users and computer hardware, managing resources
and controlling program execution. The chapter outlines the four main components of a computer
system: Hardware, the Operating System, Application Programs, and Users. It also details key OS
functions, including process, memory, and file management, as well as security and protection.

Chapter 2: Processes

This chapter focuses on the concept of a Process, defining it as a program in execution and
differentiating it from a static program. It explains the five different states a process can be in (New,
Ready, Running, Waiting, Terminated) and introduces the Process Control Block (PCB), which is a data
structure used by the OS to manage process information. The chapter also covers the concept of a
Context Switch and introduces Threads as a lightweight alternative to processes, explaining their
benefits and different multithreading models.

Chapter 3: Process Scheduling

This chapter dives into Process Scheduling, which is the process of deciding which process gets to use
the CPU. It explains the CPU-I/O cycle and differentiates between CPU-bound and I/O-bound
processes. The chapter discusses the various goals of a good scheduling algorithm, such as high
processor utilization and low response time. It then describes the three types of schedulers (Long-
term, Short-term, and Medium-term) and covers several key scheduling algorithms, including FCFS,
SJF, Priority Scheduling (and the problem of starvation), and Round Robin.

You might also like