This repository contains example source codes to complement the course Operating Systems Concepts by Sarun Intakosum.
| Directory | Description |
|---|---|
fork/ |
Process creation using fork(), exec(), and waitpid() |
pipe/ |
Inter-process communication with pipes and dup2() |
pthread/ |
POSIX threads (pthreads) creation and management |
pthread-semaphore/ |
Thread synchronization using POSIX semaphores |
shared-memory/ |
Shared memory IPC between processes |
signal/ |
Signal handling and inter-process signaling |
file/ |
File I/O examples |
Java-Thread/ |
Java thread creation and lifecycle |
Java-Process/ |
Java process management |
Java-Semaphore/ |
Java semaphore-based synchronization |
Java-Synchronization/ |
Java synchronized blocks and monitors |
from-socrative/ |
In-class exercise examples |
simpleshell.sh |
Simple shell script example |
- Docker installed and running
Pull the pre-built image directly from Docker Hub:
docker pull ajsarun/os_conceptThen tag it locally so the Dev Container config can find it:
docker tag ajsarun/os_concept os_conceptClone the repository and build the image yourself:
git clone https://github.com/ajsarun/os_course.git
cd os_course
docker build -t os_concept .Run interactively and drop into a bash shell:
docker run -it os_conceptTo mount your local source codes into the container so edits are reflected immediately:
docker run -it -v $(pwd):/os_concept os_conceptInside the container, navigate to any directory and compile with gcc or javac:
# C example
cd /os_concept/fork
gcc fork_example.c -o fork_example
./fork_example
# Java example
cd /os_concept/Java-Thread
javac First.java
java FirstThe repository includes a Dev Container configuration so you can develop directly inside the os_concept Docker image from VS Code, with full IntelliSense, a built-in terminal, and debugger support.
- VS Code
- Dev Containers extension (
ms-vscode-remote.remote-containers) - Docker running
os_conceptimage available locally (pull or build using the steps above)
-
Clone this repository and open it in VS Code:
git clone https://github.com/ajsarun/os_course.git code os_course
-
Make sure the
os_conceptimage is available locally — pull it from Docker Hub:docker pull ajsarun/os_concept docker tag ajsarun/os_concept os_concept
-
When prompted, click Reopen in Container — or open the Command Palette (
F1) and run:Dev Containers: Reopen in Container -
VS Code will start a container from the
os_conceptimage and install the following extensions automatically:- C/C++ IntelliSense & debugger
- Java language support & debugger
- Makefile tools
-
The workspace opens at
/os_conceptwith all source codes ready to edit, compile, and run from the integrated terminal.
Operating Systems Concepts Instructor: Sarun Intakosum