0% found this document useful (0 votes)
21 views3 pages

OS Midterm Review

The Operating System Midterm Review is scheduled for February 27, 2025, lasting 60 minutes at AUPP Campus, Classroom B2, covering four chapters. The exam will consist of 5 short Q&A, 5 multiple choice questions, and 5 coding exercises. Key topics include operating system functions, types of storage, process types, and Linux commands.

Uploaded by

Tommy smith
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)
21 views3 pages

OS Midterm Review

The Operating System Midterm Review is scheduled for February 27, 2025, lasting 60 minutes at AUPP Campus, Classroom B2, covering four chapters. The exam will consist of 5 short Q&A, 5 multiple choice questions, and 5 coding exercises. Key topics include operating system functions, types of storage, process types, and Linux commands.

Uploaded by

Tommy smith
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/ 3

Summary of the Operating System Midterm Review

• Exam Date: 27th February 2025


• Duration: 60 minutes
• Location: AUPP Campus, Classroom B2
• Exam Structure:
o 5 Short Q&A
o 5 Multiple Choice Questions
o 5 Coding Exercises
• Chapters Covered:
o Chapter 1: Fundamental Concept
o Chapter 2: Operating System Structure
o Chapter 3: Linux Command Lines
o Chapter 4: Processes

Q&A Preparation

1. What are the primary functions of an operating system?


o An operating system manages hardware resources, provides a user interface, and
executes and provides services for applications.
2. What is the primary function of the Central Processing Unit (CPU)?
o The CPU executes instructions from programs, performing the basic arithmetic,
logic, control, and input/output (I/O) operations.
3. How many types of storage exist in a computer system?
o There are two types of storage: Volatile (RAM) and Non-Volatile (hard drives,
SSDs).
4. How many types of Operating Systems are there?
o Three main types: Uniprogramming, Multiprogramming, and Multitasking (Time
Sharing).
5. Can user programs or applications access hardware directly?
o No, user programs and applications do not have the right to access hardware
directly; they use system calls provided by the operating system.
6. What is a process in a computer system?
o A process is an instance of a program in execution, which includes the program
code, its current activity, and the resources allocated to it.
7. What are the types of processes?
o Processes can be classified as CPU-bound or I/O-bound.
8. What is the difference between CPU-bound and I/O-bound processes?
o CPU-bound processes spend more time doing computations, while I/O-bound
processes spend more time waiting for I/O operations to complete.
9. What happens when a new process is created?
o When a new process is created, it can either run concurrently with its parent
process or wait until the parent process finishes execution.
10. What is a Zombie Process? Is it harmful to the system?
o A zombie process is a terminated process whose exit status has not been read by
its parent. It is not harmful but consumes system resources.
11. What is an Orphan Process?
o An orphan process is a child process whose parent process has finished or
terminated, leaving it to be reparented by the system’s init process.

Details

5 Short Q&A

1. What is the primary function of an operating system?


o The operating system manages hardware, provides a user interface, and facilitates
the execution of applications.
2. What are the types of storage in a computer system?
o Volatile (RAM) and Non-Volatile (e.g., SSD, HDD).
3. What is the difference between CPU-bound and I/O-bound processes?
o CPU-bound processes spend more time on computations, while I/O-bound
processes wait for I/O operations to complete.
4. What is a Zombie process?
o A zombie process is a terminated process that has not been reaped by its parent,
holding system resources until it is fully removed.
5. How does multitasking differ from multiprogramming?
o Multitasking allows multiple processes to run simultaneously by sharing CPU
time, while multiprogramming switches between processes to keep the CPU busy.

5 Multiple Choice Questions

1. Which of the following is NOT a primary function of an operating system?


o a) File management
o b) Process management
o c) Memory management
o d) Application development (Correct)
2. Which command is used to create a new process in Unix/Linux?
o a) CreateProcess()
o b) open()
o c) fork() (Correct)
o d) shm_open()
3. Which type of storage is volatile?
o a) Hard drive
o b) SSD
o c) RAM (Correct)
o d) ROM
4. What happens when a process is orphaned?
o a) It becomes a zombie
o b) It is terminated immediately
o c) It is reparented to init (Correct)
o d) It continues running normally without a parent
5. What is the role of chmod in Unix/Linux?
o a) Manage processes
o b) Set file permissions (Correct)
o c) Sleep a process
o d) Close a file

5 Coding Exercises (including Linux Commands)

1. Write a simple C program to print "Hello, World!"


o #include <stdio.h>
o int main() {
o printf("Hello, World!\n");
o return 0;
o }

2. Linux Command: Display the current working directory.


o Command: pwd
3. Linux Command: List all files (including hidden files) in a directory.
o Command: ls -a

4. Write a simple shell script that creates a file named "midterm.txt" and writes
"Operating System Exam" into it.
o #!/bin/bash
o echo "Operating System Exam" > midterm.txt

5. Modify file permissions to make "midterm.txt" readable, writable, and executable


by the owner, and readable by others.
o Command: chmod 744 midterm.txt

You might also like