
An operating system acts as an interface between user applications and hardware, and as software that provides a virtual machine on top of the hardware, simplifying programming and managing resources.
Discover how operating systems act as a virtual machine and illusionist, enabling easier programming, multitasking through rapid context switching, and virtual memory to extend ram.
Discover how operating systems provide services through a file system interface, coordinate memory and CPU sharing with virtual memory, and navigate trade-offs between efficiency and convenience.
The lecture explains the computer system structure by showing hardware, the operating system, application programs, and users, and how the operating system coordinates access to cpu, ram, and input/output devices.
Coordinate concurrency across programs, users, and threads on multicore systems. Manage memory, disk interactions, file system organization, and networking to enable efficient IO and distributed processing.
Think of the operating system as a juggler that time-slices the cpu to give the illusion of concurrent progress, while protecting processes, fairly sharing resources, and securing inter-process communication.
Explore the principles of layered computing systems, where each layer uses services from below and provides services above, enabling independent development and clear interfaces.
Explore the exceptions to layered design and how cross-layer optimization, including hardware accelerators, memory and cache awareness, and compiler techniques, boosts software performance.
Explore techniques to maximize performance by hardware optimization, including custom chips, then, if hardware changes are impossible, handcraft software with the fastest algorithms and expert assembly to beat general-purpose compilers.
Explore the operating system user interface and how it enables running programs, managing files, and accessing I/O devices, while delivering performance, usability, and security.
Explore the three main operating system interfaces—command line interpreters, graphical user interface, and touchscreens—and their roles with files, programs, IoT devices, utilities, control panels, and a built-in web browser.
Explore how operating systems separate user interfaces from program interfaces and enforce protection by restricting privileged instructions to the kernel, using hardware support to enable system calls and APIs.
Determine how the CPU distinguishes kernel mode from user mode using a reserved status bit, enforcing protections by trapping privileged instructions and restricting direct IO access.
Explains how user applications request privileged I/O operations from the kernel via system calls, triggering a trap and switching to kernel mode while the kernel checks permissions and resumes the process.
Explore how system calls implement protection boundaries for user programs and compare similar calls across Unix and Windows, including fork, exit, open, read, and write.
Explore the five major system call categories: process control, file management, device management, information maintenance, and communication, and learn to use Linux man pages to deepen your knowledge.
Explore how traps arise from system calls and illegal conditions, and how the operating system uses trap handlers, trap vectors, and context switches to manage and resume processes.
Discover how application programming interfaces boost portability and ease for programmers by wrapping system calls with convenient APIs such as Win32, POSIX, and Java.
The lecture shows how api calls translate into system calls via the C library, using write to display greetings, and explains parameters and return values.
Explore how system calls are implemented via the runtime interface, move from user mode to kernel mode, and pass parameters through a numbered table of memory addresses.
Explains how programs pass parameters to system calls across user and kernel spaces, detailing register, memory block, and stack methods; highlights Linux's mixed approach and example system calls.
Explore the life cycle of program creation from problem specification to executable, and dive into processes, context switches, and scheduling basics—fcfs, priority, round robin—plus fork and process communication.
Explore the memory footprint of a program in main memory, showing the code section, data section, heap, and stack with room for growth between heap and stack.
Distinguish between a program and a process, then see how the operating system runs multiple processes, sometimes from the same program, allocating cpu time, memory, and input and output operations.
Understand multiprogramming and multitasking on a single cpu, where ready processes in main memory maximize cpu utilization during io waits through time slices and preemption.
The operating system's scheduler selects a ready process to run on the CPU using attributes and system properties, ensuring fairness and avoiding starvation via the ready queue.
A process transitions through new, ready, running, waiting, and terminated states as it loads, executes on the CPU, handles user input, and responds to interrupts.
Understand how the operating system uses ready and wait queues to track processes, with each process represented by a process control block containing state, IDs, program counter, and CPU registers.
The operating system validates executable and permissions, checks resources to prevent thrashing, allocates memory, loads the program, creates the process control block, and enqueues the process in the ready queue.
Running processes relinquish the cpu due to interrupts, io requests, or waiting for events like a child process, while users may kill it, moving between ready, wait, and terminated states.
A queuing diagram illustrates how processes cycle from the ready queue to the CPU, to IO and waiting queues, with events like IO requests, interrupts, and time-slice expiry.
Perform a context switch by saving the program counter and registers in its process control block and loading the next process state to resume execution; overhead varies with hardware support.
Explore how cpu scheduling allocates a shared cpu and other resources, and examine cpu bursts and io bursts that drive scheduling decisions across devices.
Distinguish cpu-bound and io-bound processes by bursts; cpu-bound spend most time computing, io-bound wait for io and benefit from optimized response time; examples include scientific simulations and Windows apps.
Explore when the cpu scheduler runs: after process termination, io requests, interruptions, io completion, and new process arrivals, and distinguish preemptive versus non-preemptive scheduling.
Explore cpu scheduling algorithms and how their properties affect performance in different situations. Learn key metrics—cpu utilization, throughput, turnaround time, waiting time, response time, and starvation to compare algorithms.
Analyze how cpu scheduling algorithms affect turnaround time and waiting time using single cpu bursts, arrival times, and termination times in the ready queue.
Examine CPU scheduling algorithms, non preemptive and preemptive types, such as first come first served, shortest remaining time first, and round robin, along with goals like fairness and throughput.
Explore the first come first served scheduling algorithm, examining a ready queue, gantt chart, and a three-process example to compute waiting times and the average waiting time.
Demonstrates how arrival order affects FCFS scheduling and CPU start times, admitting P2, then P3, then P1, and yielding an average wait time of 3 milliseconds.
Examine FCFS scheduling advantages, including no starvation under finite CPU bursts and simple queue-based implementation, alongside disadvantages such as variable waiting times, potential CPU hogging, and convoy effects.
Shortest job first is a non-preemptive scheduling method. It assigns cpu to the smallest next cpu burst, breaking ties by arrival order; an example shows arrival times and waiting times.
Prioritize short cpu bursts to minimize average waiting time and favor io-bound interactive processes. Risk starvation for long cpu-bound tasks and cpu hogging due to non-preemptive execution and burst-length unpredictability.
Assigns a priority number to each process and, non-preemptively, allocates the CPU to the highest-priority ready process, breaking ties by first-come, first-served; shortest job first is a special case.
Explains starvation in priority and shortest-job algorithms, and shows aging as a solution by gradually increasing waiting process priority, plus a maximum wait time rule to guarantee CPU access.
Explore the shortest remaining time first preemptive scheduling algorithm, how new arrivals preempt the running process, and how to compute Gantt charts, turnaround times, and waiting times for multiple processes.
SRTF scheduling minimizes average waiting time by always selecting the shortest remaining CPU burst, favoring IO-bound and interactive tasks, but long CPU-burst processes may starve, even with aging.
Examine fcfs, sjf, and srtf scheduling by simulating four processes with defined arrivals and bursts, and present their gantt charts, start times, and completion times.
Explain preemptive priority scheduling where a higher-priority arrival can preempt the current process, illustrated with a four-process example, a Gantt chart, and derived waiting, turnaround, and termination times.
Preemptive priority scheduling gives high-priority processes short wait times. However, low-priority processes can starve in heavily loaded systems, unless aging prevents this starvation.
In round robin scheduling, preemption with a fixed time quantum partitions CPU time among processes in a FIFO ready queue, triggering context switches via timer interrupts when the quantum expires.
Demonstrate the round robin scheduling of four processes P1, P2, P3, P4 with a 20 ms time quantum, including arrivals, preemption, and completion.
Round robin scheduling prevents starvation by cycling through the ready queue, allocating each process one time quantum, yielding better average response time than shortest remaining time first for interactive systems.
Modern operating systems combine scheduling algorithms by partitioning the ready queue into foreground and background queues. A meta level scheduler selects next queue, using fixed priority, aging, or time slicing.
Explore how the Linux completely fair scheduler allocates CPU time among tasks using targeted latency, nice values, and virtual runtime, with scheduling classes and real-time priority.
This lecture uses a two-task Linux CPU scheduling example to show how the CFS scheduler uses vruntime to decide who runs next, with I/O-bound t1 gaining priority over CPU-bound t2.
Explore how programs create a parent–child process tree, and examine Linux decisions on execution (parallel or wait), address space (duplicate vs different program), and resource sharing (full, subset, or none).
Fork creates a new child with its own pid and pcb in the ready queue, scheduled by the cpu scheduler, and runs concurrently with the parent unless wait suspends it.
Explore the fork system call, which returns a pid_t representing the new process id; see how the parent and child become copies, continue after fork, and run concurrently under scheduling.
Fork creates a child with a separate memory space that copies the parent’s data; the child gets 0 and the parent gets the child’s pid, with exec replacing the child.
Explore how Linux creates and manages parent and child processes through fork, exec, and wait, how resources are inherited via file descriptors, and how interprocess communication enables collaboration.
Explore a simple fork example that contrasts child and parent processes running concurrently, using a switch-case to print I am the child or I am the parent with child pid.
Explore how a process forks to create a child, uses exec to replace its memory with the ls program, and how the parent waits for the child to finish.
Explore how fork creates a child with its own copy of the parent's counter; both run loops, incrementing separate counters, with interleaving determined by the scheduler.
The lecture analyzes a parent process with two fork statements, showing that the program creates four processes in total, including the initial parent.
Interprocess communication (IPC) explains independent and cooperating processes and why cooperation enables information sharing, faster computation, and modular design. It introduces shared memory and message parsing models.
Establish a shared memory region for interprocess communication between processes A and B, attach it to both address spaces with system calls, then exchange data with fast reads and writes.
Explore message passing for IPC, where two cooperating processes on separate machines communicate via send and receive system calls, contrasting networked IPC with shared memory.
Cooperating processes must agree on predetermined data exchange protocols, including data format and timing, such as a client-server game exchanging name and score in a fixed order.
Ace operating systems (OS) principles, system calls, OS protection, processes, CPU scheduling, CPU scheduling algorithms, interprocess communication questions in competitive exams, job interviews, and OS course exams.
Do you know: How OS protects itself from the user programs? How does OS protect user programs from each other? Why can user programs not directly access I/O devices? Why do programmers prefer to use APIs over system calls in programs? How is the CPU shared between so many active processes? How does executing processes create new child processes? How do cooperating processes communicate? Learn the explanations to these and many more intriguing questions in this course!
Specifically, the course will cover the following in detail.
What is an operating system (OS)?
Modern OS functionalities.
Layered design of computing systems.
OS user interface.
Protection in OS.
Kernel mode and user mode.
System calls.
Traps.
Application programming interface (API).
How APIs invoke system calls?
System call implementation.
Parameter passing to system calls.
Life cycle of program creation
Memory footprint of a program.
What is a process?
Multiprogramming and multitasking.
CPU Scheduler and process scheduling.
Process states.
Process control block (PCB).
When do processes relinquish CPU?
Context switching.
CPU scheduling basics and performance metrics.
CPU-bound and IO-bound processes.
When would CPU scheduler run?
Turnaround time and waiting time.
FCFS scheduling.
Shortest job first (SJF) scheduling.
Nonpreemptive priority scheduling.
Starvation.
Shortest remaining time first (SRTF) scheduling.
Preemptive priority scheduling.
Round robin (RR) scheduling.
Combining scheduling algorithms.
Linux CPU scheduling algorithm.
Programs with multiple processes.
Creating multiple processes in Linux.
Fork system call with illustrative examples.
Interprocess communication (IPC).
Shared memory for IPC.
Message passing for IPC.
30 day money back guaranteed by Udemy.
Wisdom scholarships. If you are interested in taking one of our courses but cannot purchase it, you can apply for a scholarship to enroll. Learn more about the application process at my website.