CPU Virtualization Mechanisms

CPU Virtualization Mechanisms

This document explains how OS virtualizes the CPU using limited direct execution, managing mode switches between user/kernel, system call trapping, timer interrupts, and context switching to achieve efficient and controlled process execution.

Semaphores

Semaphores

This lecture covers semaphores as synchronization primitives with counters and their operations (up/post and down/wait). Topics include binary semaphores as mutexes, semaphore usage in producer-consumer problems, and handling deadlocks caused by semaphore misuse.

Threads

Threads

This lecture explains threads as lightweight processes sharing memory space. It discusses thread control blocks, POSIX threads in Linux, concurrency issues like race conditions, critical sections, locks, and synchronization primitives.