Functions of an Operating System — DIT Unit 2 Article 2.2 | Notes, Questions & MCQs

Functions of an Operating System DIT Notes
DIT Operating System 2.2 - Functions of an Operating System
DIT • SEMESTER 1 • OPERATING SYSTEM • ARTICLE 2.2

Functions of an Operating System

A clear, exam-oriented guide to the major functions performed by an Operating System, including memory, process, resource and file management, security, deadlock prevention, and coordination between users and software.

Unit 2Functions of an Operating SystemArticle 2.27 Core FunctionsExam Preparation7 Short3 Long15 MCQs

Quick Access

Jump directly to any part of Article 2.2.

2.2 Functions of an Operating System

How the OS makes a computer system efficient, secure, reliable and easy to use.

An Operating System (OS) performs several important functions to make a computer system efficient, secure, reliable, and easy to use. It manages hardware resources, controls running programs, organizes data, protects the system, and coordinates communication between users and software.

Key Idea: The OS is responsible for managing resources and providing a controlled environment in which programs and users can work safely and efficiently.
FIGURE 1 • OS FUNCTION MAP
Seven Core Functions Covered in Article 2.2
MemoryManages RAM allocation and safe use.
ProcessControls running programs and CPU time.
ResourcesShares CPU, storage, devices and network.
FilesOrganizes and controls files and folders.
SecurityProtects data and system resources.
DeadlockHelps prevent permanent resource blocking.
CoordinationConnects users, software and hardware.
Caption: These functions work together to keep the computer system organized, protected and usable.

2.2.1 Memory Management

Managing the computer's main memory (RAM).

Memory Management is the OS function that manages the computer's main memory, or RAM. Running programs need memory to store instructions and data, so the operating system decides how available memory is allocated and used.

Main Tasks

  • Allocates memory to programs when required.
  • Releases memory when a program finishes.
  • Keeps track of which memory areas are being used.
  • Prevents programs from improperly accessing another program's memory.
  • Manages memory when several programs run simultaneously.
FIGURE 2 • MEMORY MANAGEMENT
How the OS Shares RAM Between Running Programs
Program ARequests memory for instructions and data.
Program BReceives another available memory area.
Main Memory (RAM)
Area allocated to Program A
Area allocated to Program B
Available / tracked memory
OS ControlTracks used and available memory.
ProtectionHelps prevent improper memory access.
Caption: The OS allocates available RAM to programs, tracks usage and releases memory when it is no longer needed.
Example: If a user opens a web browser and a word processor, the OS allocates part of the available RAM to each application.

In short: Memory management ensures that available RAM is used efficiently and safely.

2.2.2 Process Management

Controlling and coordinating programs that are currently running.

A process is a program that is currently being executed. Process Management is the OS function responsible for controlling and coordinating these running programs.

Main Tasks

  • Creates and terminates processes.
  • Allocates CPU time to processes.
  • Schedules processes for execution.
  • Suspends and resumes processes when necessary.
  • Coordinates processes and helps prevent conflicts.

Process States

A process commonly passes through the following states:

FIGURE 3 • PROCESS STATES
Typical Process Life Cycle
NewProcess is being created.
→
ReadyWaiting for CPU.
→
RunningCurrently executing.
WaitingWaiting for an event or resource.
→
TerminatedExecution has finished.
Caption: The notes describe the common sequence New → Ready → Running → Waiting → Terminated.
Example: While a user listens to music and writes a document, the OS manages the processes of both applications and allocates CPU time to them.

In short: Process management ensures that programs receive the CPU resources they need and execute properly.

2.2.3 Resources Management

Sharing limited computer resources among programs and users.

A computer has limited resources such as CPU, memory, storage, input/output devices, and network resources. The OS manages these resources and distributes them among programs and users.

FIGURE 4 • RESOURCE MAP
Major System Resources Managed by the OS
CPUAllocates processor time to processes.
MemoryAllocates RAM to programs.
StorageManages available disk space.
I/O DevicesControls printers, keyboards and disks.
NetworkManages connections and communication.
Caption: Resource management helps the OS share limited resources efficiently and fairly.

Importance

  • Uses resources efficiently.
  • Helps prevent conflicts between programs.
  • Improves system performance.
  • Supports fair resource allocation.
  • Supports multiple applications and users.
Example: If several applications request access to a printer, the OS manages their requests and determines which application can use the printer.

In short: Resource management ensures that hardware and other system resources are properly shared among users and programs.

2.2.4 File Management

Organizing, accessing and protecting files and directories.

File Management is the OS function that organizes and controls files and directories stored on storage devices. It gives users and applications a convenient way to create, access, modify and organize data.

Main File Management Operations

  • Create files and folders
  • Open and close files
  • Read and write files
  • Rename files
  • Copy and move files
  • Delete files and folders
  • Search for files
  • Manage file permissions
File Organization: Files are generally organized into folders or directories. Example: Documents → Computer Science → Operating System → Chapter 2.

Importance

  • Organizes information.
  • Helps users locate files easily.
  • Protects important data.
  • Helps manage storage space.

In short: File management provides an organized method for storing, accessing and protecting files.

2.2.5 Security

Protecting systems, data, programs and resources from unauthorized access and misuse.

Security is an important OS function that protects computer systems, data, programs and resources from unauthorized access and misuse.

FIGURE 5 • OS SECURITY
Main Security Measures
AuthenticationPassword, PIN, fingerprint or facial recognition.
User AccountsSeparate accounts can have different permissions.
OS
Security &
Protection
Access ControlDetermines which users or programs may access resources.
Data & System ProtectionMay use encryption and controls for critical resources.
Caption: Authentication verifies identity, while access control and protection mechanisms limit unauthorized use of data and resources.

Major Security Measures

  1. User Authentication: verifies identity using passwords, PINs, fingerprints or facial recognition.
  2. Access Control: determines which users or programs are allowed to access particular files and resources.
  3. User Accounts: allow different users to have separate permissions.
  4. Data Protection: may include encryption and other mechanisms for sensitive information.
  5. System Protection: helps prevent unauthorized users and programs from accessing critical system resources.
Example: A user may have permission to read a file but not modify or delete it.

In short: OS security protects data and resources from unauthorized access and harmful activities.

2.2.6 Deadlock Prevention

Preventing processes from becoming permanently blocked while waiting for resources.

A deadlock occurs when two or more processes are waiting for resources held by each other and none of them can continue.

FIGURE 6 • DEADLOCK SITUATION
Two Processes Waiting for Each Other's Resources
Process A

Holds Resource 1
and waits for Resource 2.

Process B

Holds Resource 2
and waits for Resource 1.

Circular waiting continues → neither process can proceed.
Caption: The example becomes a deadlock because each process holds one resource and waits for the resource held by the other.

Four Conditions of Deadlock

  1. Mutual Exclusion: a resource can be used by only one process at a time.
  2. Hold and Wait: a process holds one resource while waiting for another.
  3. No Preemption: a resource cannot be forcibly taken from a process.
  4. Circular Wait: processes wait for resources held by each other.

Deadlock Prevention Techniques

  • Allocate resources carefully.
  • Avoid circular waiting conditions.
  • Require processes to request resources in a specific order.
  • Release resources before requesting new ones in suitable situations.
  • Check whether resource allocation can lead to an unsafe state.
Why it matters: Deadlock prevention helps processes continue to execute, keeps resources from being permanently blocked, supports reliable performance, and prevents programs from remaining stuck indefinitely.

In short: Deadlock prevention ensures that processes do not become permanently blocked while waiting for resources.

2.2.7 Coordination Between Users and Software

The OS acts as a communication and control layer between users, software and hardware.

The operating system provides a communication and control layer between users, application software and computer hardware. Users normally do not communicate directly with hardware. Instead, they interact with applications or the OS interface, while the OS manages access to hardware resources.

FIGURE 7 • COMMUNICATION MODEL
User → Application → OS → Hardware
UserMakes a request or starts an action.
→
Application SoftwareSends the request to the OS.
→
Operating SystemProvides services, allocates resources and controls access.
→
HardwarePerforms the requested operation.
↩
Caption: Results return through the OS and application to the user, creating a controlled bridge between software and hardware.

Role of the Operating System

  • Provides a user interface.
  • Allows users to start and control applications.
  • Provides services to application programs.
  • Allocates resources to applications.
  • Controls access to hardware.
  • Provides security and protection.
  • Coordinates multiple applications.
  • Handles communication between software and hardware.

Example: Printing a Document

  1. The user selects Print in a word processor.
  2. The application sends a print request to the OS.
  3. The OS communicates with the printer through the appropriate device software.
  4. The printer produces the document.
  5. The OS and application report the result to the user.

In short: The OS acts as a bridge between users, software and hardware, ensuring that requests are handled safely and efficiently.

Quick Revision

Fast review of the most important points from Article 2.2.

  • Memory Management: manages RAM, allocates and releases memory, tracks usage and helps prevent improper access.
  • Process Management: creates, schedules, coordinates, suspends, resumes and terminates processes.
  • Process states: New, Ready, Running, Waiting and Terminated.
  • Resource Management: shares CPU, memory, storage, I/O devices and network resources.
  • File Management: organizes files and directories and supports operations such as create, open, read, write, rename, copy, move, delete and search.
  • Security: uses authentication, access control, user accounts, data protection and system protection.
  • Deadlock: processes can become permanently blocked when they wait for resources held by each other.
  • Four deadlock conditions: mutual exclusion, hold and wait, no preemption and circular wait.
  • Coordination: the OS connects users and application software with hardware and controls resource access.
Exam Focus
  • Memorize the definitions and main tasks of the seven functions.
  • Know all five process states in the correct order.
  • Learn the five major security measures.
  • Memorize the four conditions of deadlock.
  • Understand the User → Application → OS → Hardware communication model.
  • Practice the 7 short questions, 3 long questions and 15 MCQs below.

7 Short Questions & Answers

Concise exam-oriented answers strictly from Article 2.2.

Q1. What is Memory Management?

Memory Management is the OS function that manages the computer's main memory (RAM), including allocating memory to programs, tracking its use and releasing it when no longer required.

Q2. What is Process Management?

Process Management controls and coordinates running programs, including creating, scheduling, suspending, resuming and terminating processes.

Q3. What is Resource Management?

Resource Management is the OS function of allocating computer resources such as CPU, memory, storage, I/O devices and network resources among users and programs.

Q4. What is File Management?

File Management organizes and controls files and directories and provides operations such as creating, opening, reading, writing, copying, moving, deleting and searching files.

Q5. What is OS Security?

OS Security protects computer systems, data, programs and resources from unauthorized access and misuse through mechanisms such as authentication and access control.

Q6. What is a Deadlock?

A deadlock occurs when two or more processes wait for resources held by each other and none of them can continue execution.

Q7. How does an OS coordinate users and software?

The OS acts as a bridge between users, application software and hardware. It receives requests, provides services, allocates resources, controls hardware access and returns results to the user.

3 Long Questions & Answers

Structured answers suitable for approximately 5-mark preparation.

Q1. What is Memory Management? Explain how an OS manages and allocates memory.

Memory Management is the OS function that manages the computer's main memory (RAM). Running programs need memory to store instructions and data.

  • The OS allocates memory to programs when required.
  • It releases memory when a program finishes.
  • It keeps track of which memory areas are being used.
  • It helps prevent one program from improperly accessing another program's memory.
  • It manages memory when several programs run simultaneously.

Therefore, memory management helps ensure that available RAM is used efficiently and safely.

Q2. What is Process Management? Explain process states and CPU scheduling.

Process Management controls and coordinates programs that are currently executing. The OS creates and terminates processes, allocates CPU time, schedules processes, suspends and resumes them when necessary, and coordinates them.

A process commonly moves through New → Ready → Running → Waiting → Terminated. New means the process is being created; Ready means it is waiting for CPU time; Running means it is executing; Waiting means it is waiting for an event or resource; and Terminated means execution has finished.

CPU scheduling helps determine which ready process receives CPU time so that running programs can execute properly.

Q3. What is a Deadlock? Explain its conditions and prevention techniques.

A deadlock occurs when two or more processes wait for resources held by each other and none can continue.

The four conditions are:

  • Mutual Exclusion: a resource is used by only one process at a time.
  • Hold and Wait: a process holds one resource while waiting for another.
  • No Preemption: a resource cannot be forcibly taken from a process.
  • Circular Wait: processes wait for resources held by each other.

Prevention techniques include careful resource allocation, avoiding circular waiting, requesting resources in a specific order, releasing resources before requesting new ones in suitable situations, and checking whether allocation can lead to an unsafe state.

15 Important MCQs

Open a question to see its options, then use Show Answer to check yourself.

1. Memory Management deals primarily with:
A) RAM
B) Keyboard
C) Printer
D) Monitor
Show Answer
Correct Answer: A) RAM
2. The OS allocates memory to:
A) Running programs
B) Printers only
C) Network cables
D) Monitors
Show Answer
Correct Answer: A) Running programs
3. Process Management is concerned with:
A) Running programs
B) File names only
C) Screen brightness
D) Keyboard layout
Show Answer
Correct Answer: A) Running programs
4. Which component determines which process gets CPU time?
A) File Manager
B) CPU Scheduler
C) Printer Manager
D) Security Manager
Show Answer
Correct Answer: B) CPU Scheduler
5. Which of the following is a system resource?
A) CPU
B) Wallpaper
C) Desktop Icon
D) Window Title
Show Answer
Correct Answer: A) CPU
6. Resource Management is responsible for:
A) Allocating system resources
B) Designing applications
C) Creating websites
D) Editing documents
Show Answer
Correct Answer: A) Allocating system resources
7. File Management mainly deals with:
A) Files and directories
B) CPU cores
C) RAM chips
D) Network cables
Show Answer
Correct Answer: A) Files and directories
8. Which operation is related to File Management?
A) Creating a folder
B) Increasing CPU speed
C) Changing RAM size
D) Manufacturing a disk
Show Answer
Correct Answer: A) Creating a folder
9. The main purpose of OS security is to:
A) Protect data and resources
B) Increase monitor size
C) Speed up typing
D) Create applications
Show Answer
Correct Answer: A) Protect data and resources
10. Which is an example of user authentication mentioned in the notes?
A) Password
B) Folder name
C) File extension
D) Screen resolution
Show Answer
Correct Answer: A) Password
11. Which condition of deadlock means a process holds one resource while waiting for another?
A) Mutual Exclusion
B) Hold and Wait
C) No Preemption
D) Circular Wait
Show Answer
Correct Answer: B) Hold and Wait
12. A deadlock occurs when processes:
A) Execute normally
B) Wait indefinitely for resources
C) Finish execution
D) Release all resources
Show Answer
Correct Answer: B) Wait indefinitely for resources
13. Which technique can help prevent circular waiting?
A) Require processes to request resources in a specific order
B) Give every process unlimited resources
C) Disable memory management
D) Remove all files
Show Answer
Correct Answer: A) Require processes to request resources in a specific order
14. What is the basic communication model described in Article 2.2?
A) User → Application Software → Operating System → Hardware
B) Hardware → User → Application → OS
C) User → Hardware → Application → OS
D) Application → User → Hardware → OS
Show Answer
Correct Answer: A) User → Application Software → Operating System → Hardware
15. When a user prints a document, what does the application send to the OS?
A) A print request
B) A new CPU
C) A RAM module
D) A network cable
Show Answer
Correct Answer: A) A print request

Final Exam Reminder

Revise the core Article 2.2 points before the exam.

Before the exam, revise:
  • Definitions and main tasks of Memory, Process, Resource and File Management.
  • The five process states: New, Ready, Running, Waiting and Terminated.
  • Authentication, access control, user accounts, data protection and system protection.
  • The four deadlock conditions and major prevention techniques.
  • The coordination model between users, applications, the OS and hardware.
  • The 7 short questions, 3 long questions and 15 MCQs above.

No comments