CMSC 125 COURSE GUIDE        1st Semester AY 2024-2025

I.        Course Description

Course Number

CMSC 125

Course Title

Operating Systems

Description

Processor management, memory management, file and disk management, resource management, concurrent processes, networks and distributed systems.

Prerequisite

CMSC 123 or COI

II.        Course Introduction

Welcome to CMSC 125! The aim of this course is to introduce students to operating systems concepts.

III.        Course Objectives

At the end of the course, you should be able to

IV.        Course Prerequisite

This course will require that you have taken CMSC 123, Data Structures.

V.        Course Materials and Schedule

Wk

Scheduled Dates

Actual Dates

Topics

Expected Learning Outcomes

Learning Resources

Labs

F2F/Async Activities

1

Aug 19-23

  • Introduction to the Course

Tutorial01: Installing Ubuntu Desktop 20.04 on VirtualBox,

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

2

Aug 26-30

Aug 26-30

  • Introduction to OS
  • The Process Abstraction
  • Process API Example
  • Describe  the main services provided by an operating system in the context of virtualization, concurrency, and persistence
  • Differentiate a program from a process
  • Describe the different states a process can be in
  • Differentiate CPU-bound process and I/O-bound processes
  • Explain how a process transitions from one state to another
  • Explain how the fork(), wait(), and exec() system calls work
  • Describe other process control functions

Lab01: Advanced Linux Commands

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

3

Sep 2-6

Sep 2- 6

Sep 9-13

  • Limited Direct Execution
  • Scheduling

  • Multi-Level Feedback Queue
  • Fair-Share Scheduling
  • Multiprocessor Scheduling
  • Illustrate the Limited Direct Execution Protocol
  • Describe how the trap and return-from-trap instructions work
  • Differentiate user mode from kernel mode
  • Describe the approaches on how the kernel takes back control when switching processes
  • Explain how the timer interrupt  is used for the kernel to regain control
  • Evaluate various CPU scheduling policies based on certain metrics given some assumptions on the input processes
  • Describe how MLFQ works
  • Describe the different approaches to proportional share scheduling
  • Describe the challenges, and  solutions, in multiprocessor scheduling

Lab02: BASH Shell Scripting

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

4

Sep 9-13

Sep 16-20

  • Address Spaces
  • Memory API
  • Address Translation
  • Explain what the address space of a process is
  • Illustrate the address space of a process
  • Explain the function and behaviour of each section of a process’ address space: code, data, stack, heap
  • Describe the goals for virtualizing memory
  • Explain how the malloc(), free(), sbrk(), and other  functions are used in C programs
  • Explain the importance and mechanisms of address translation: virtual  address to physical address
  • Illustrate Limited Direct Execution with Dynamic Relocation at boot time and at run time
  • Illustrate internal fragmentation

Lab03: Process API in Linux

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

5

Sep 16-20

Sep 23-27

Sep 30-Oct 4

Oct 7-11

  • Segmentation
  • Free Space Management
  • Paging
  • TLB
  • Swapping Mechanisms
  • Advanced Page Tables

  • Illustrate how segmentation works
  • Explain how the hardware determines the segment and offset within a segment given a memory address
  • Illustrate external fragmentation
  • Describe a basic algorithm for implementing malloc()
  • Illustrate how paging works
  • Illustrate how the TLB helps in improving paging performance
  • Illustrate how paged-segmentation works
  • Illustrate how multi-level paging works

Lab04: CPU Scheduling Simulations

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

6

Sep 23-27

  • Policies and Mechanisms for Memory (reading assignment)

  • Explain the role and implementation of swap space
  • Illustrate what happens during a page fault
  • Explain what thrashing is

Lab05: Understanding the PC Boot Process

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

7

Sep 30-Oct  4

  • (Review and Exam Week)

Lab06: Virtual Memory Simulation

EXAM 1 (Oct 3, Thu, 7PM-9PM)

8

Oct 7-11

Nov 4-8

  • Concurrency
  • Thread API
  • Locks

  • Explain what a thread is and its advantages
  • Differentiate a process from a thread
  • Explain terms related to concurrency: race condition, critical section, mutual exclusion, atomicity
  • Write multithreaded programs using the PThreads API
  • Describe the lock abstraction
  • Describe and evaluate different lock implementations
  • Describe how basic data structures are implemented to support concurrent access
  • Explain what a thread is and its advantages
  • Differentiate a process from a thread
  • Explain terms related to concurrency: race condition, critical section, mutual exclusion, atomicity
  • Write multithreaded programs using the PThreads API
  • Describe the lock abstraction
  • Describe and evaluate different lock implementations
  • Describe how basic data structures are implemented to support concurrent access

Lab07: Unix System V Shared Memory API

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

Oct 14-19

READING BREAK

9

Oct 21-24

Nov 11-15

  • Lock-based concurrent data structures
  • Condition Variables
  • Semaphores

  • Articulate when and how to use condition variables in concurrent programs
  • Articulate when and how to use semaphores in concurrent programs
  • Describe and evaluate solutions to the Bounded-Buffer Problem
  • Articulate when and how to use reader-writer locks in concurrent programs
  • Describe and evaluate solutions to the Dining Philosophers Problem
  • Implement semaphores using locks and condition variables
  • Describe some non-deadlock concurrency bugs
  • Explain why deadlocks occur
  • Describe the approaches on how to prevent and avoid deadlocks as well as detect and recover from it
  • Describe how event-based concurrency works
  • Explain how select() works
  • Explain what asynchronous I/O is

Lab08: Programming with PThreads

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

10

Oct 28-Nov 1

Nov 18-22

  • Common Concurrency Problems
  • Event-based Concurrency
  • I/O Devices
  • HDD

  • Describe modern computer system architecture
  • Describe a basic I/O device and its interface
  • Differentiate programmed I/O from interrupt-driven I/O
  • Explain how Direct Memory Access (DMA) works
  • Describe approaches on how the CPU interacts with the hardware: I/O instructions and memory-mapped I/O
  • Describe what a device driver is and how it interacts with the kernel
  • Explain how a simple IDE Disk driver works
  • Explain the interface and geometry of hard disk drives
  • Explain the factors that contribute to disk performance
  • Calculate the I/O time and rate of I/O of a disk given a disk specification and different workloads
  • Describe various disk scheduling algorithms and their properties

Lab09: Thread Synchronization in PThreads

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

11

Nov 4-8

Nov 25-30

Dec 2-6

  • Files and Directories
  • File System Implementation

  • Explain the  file and directory abstractions as well as associated terminologies
  • Describe and use the File System API: creating, reading and writing, renaming, mounting, etc.
  • Describe a simple File System Implementation
  • Explain the importance of caching and buffering in File Systems
  • Describe how the Fast File System works

Lab10a: [ICS-OS] Building and Booting ICS-OS

Lab10b: [ICS-OS] Command Line Interface, System Calls, and System Utilities

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

12

Nov 11-15

  • (buffer week)

Lab11: [ICS-OS] Environment Variables, Processes, and Threads

  • F2F: Discussion/Quizzes/Lab
  • Async: Readings/Videos/Consultation via Slack

13

Nov 18-22

  • (buffer week)

*Lab12: [ICS-OS] Implementing Lottery Scheduling in ICS-OS

14

Nov 25-30

  • (Review and Exam Week)

EXAM 2

15

Dec 2-6

16

Dec 9-12

VI.        References

VII.        Grading

Two Lecture Exams                40%

Lecture Quizzes/Homework/Problem Set        10%

ICS-OS Project                10%

Laboratory                 40%

Total                100%

95.00

100.00

1.00

90.00

94.99

1.25

85.00

89.99

1.50

80.00

84.99

1.75

75.00

79.99

2.00

70.00

74.99

2.25

65.00

69.99

2.50

60.00

64.99

2.75

55.00

59.99

3.00

0.00

54.99

5.00

VIII. On Course Requirements

Attendance

Exams

Labs

Other activities

IX.        On Academic Integrity

Intellectual honesty is one of the most important values which this university upholds. Therefore, as a student of the University of the Philippines, it is expected that any work you submit for this course is your own. This means that cheating in exercises, plagiarism and other forms of intellectual dishonesty will not be tolerated. It is said that each one of us has his own brilliant idea and therefore you should not miss the chance of discovering yours.

If you are caught cheating in this course, the policy below will be followed:

X.        Teaching Staff

The faculty members handling the course for this semester are the following:

Feel free to email or message them in Slack if you have concerns about CMSC 125 this semester.

ICS-UPLB | Last Update: 2024-12-04