Assignments & Practice Sheets – Operating Systems
Assignment Set 1: Core Concepts & Theory
Instructions: Attempt all short-answer questions. Write answers in your own words based on course content.
Â
- Explain the difference between multitasking, multiprocessing, and multithreading.
Â
- What are the different types of operating systems? Give one real-world example of each.
Â
- Define a process. How is it different from a program?
Â
- Describe the five states of a process using a state transition diagram.
Â
- What are system calls? List at least 4 categories of system calls with examples.
Assignment Set 2: Analytical Thinking
Instructions: Solve the following problems based on algorithms and memory management concepts.
Â
- Given the arrival and burst times of 4 processes, compute the average turnaround and waiting time using:
a. FCFS
b. SJF (Non-preemptive)
Â
- Simulate Round Robin scheduling with a time quantum of 4 units. Use a given set of process burst times.
Â
- A page reference string is given:
7, 0, 1, 2, 0, 3, 0, 4
.
a. Find number of page faults using FIFO with 3 frames.
b. Repeat for LRU.
Â
- Differentiate between internal and external fragmentation with illustrations.
Â
- Construct a Gantt chart and calculate waiting and turnaround times for the following process set.
Practice Sheet: Memory & File Systems
Objective: Solidify understanding of memory management and file organization.
Â
- Explain the concepts of paging and segmentation. How do they differ in address translation?
Â
- Write short notes on:
a. TLB (Translation Lookaside Buffer)
b. Multi-level Paging
c. Segment Table
Â
- Compare contiguous, linked, and indexed file allocation methods with diagrams.
Â
- Describe any two directory structures and their use cases.
Â
- What is a page fault? When does it occur?
Challenge Questions: Advanced & GATE-Oriented
Level: Intermediate to Advanced
Â
- A system has 4 processes and 3 resources. Use Banker’s Algorithm to determine if the system is in a safe state. Show all steps.
Â
- Given a set of process arrival and burst times, solve using:
a. Preemptive SJF
b. Priority Scheduling (both preemptive & non-preemptive)
Â
- Solve page replacement using the Optimal Algorithm.
Â
- Given memory size and logical/physical addresses, compute page number and offset.
Â
- Calculate the number of page faults using Second-Chance algorithm for a given reference string.
Hands-On Task (For Project Module)
-
Use any open-source OS (e.g., Ubuntu) and run terminal commands to:
- Check process IDs
- Observe context switches using
top
orhtop
- Create and kill processes using
ps
,kill
,nice
,renice
Â
-
Research task: Write a 1-page comparison of how Android and iOS handle memory and process management.