Lesson 1 of 8Article15 minFREE
Operating Systems Introduction
An OS is a resource manager between hardware and applications. It handles CPU scheduling, memory management, file storage, networking, and security.
Role of an operating system
An OS is a resource manager between hardware and applications. It handles CPU scheduling, memory management, file storage, networking, and security.
- Abstraction: files, processes, sockets.
- Isolation: one app crash should not kill the system.
- Efficiency: maximize throughput and responsiveness.
Kernel and user mode
System call boundary
#include <unistd.h>
#include <stdio.h>
int main(void) {
pid_t pid = getpid(); // user-space app calling kernel API
printf("Current PID: %d
", pid);
return 0;
}