Skip to content

dawid-walkiewicz/os-simulations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

OS Simulations

This repository includes a set of operating system simulations in java that cover essential OS concepts such as CPU scheduling, disk scheduling, page replacement, memory allocation, and load balancing. Further details about each simulation are in Zadania.pdf file (in Polish). Project from the course "Operating Systems" at the University of Wroclaw, year 2022.

Simulations

CPU Scheduling Algorithms

Simulate and analyze different CPU scheduling algorithms. The following algorithms are implemented:

  • FCFS (First-Come, First-Served)
  • SRTF (Shortest Remaining Time First) - Preemptive version of SJF
  • Round Robin: With configurable time quantum

The goal is to measure the average waiting time for processes under each algorithm.

Disk Scheduling Algorithms

Simulate disk scheduling algorithms to optimize disk head movements. The algorithms implemented are:

  • FCFS (First-Come, First-Served)
  • SSTF (Shortest Seek Time First)
  • SCAN
  • C-SCAN

Additionally, real-time applications are incorporated, requiring the use of EDF (Earliest Deadline First) and FD-SCAN. The performance impact of these algorithms is analyzed.

Page Replacement Algorithms

Simulate page replacement algorithms to study their efficiency in handling memory access. The following algorithms are implemented:

  • FIFO (First-In-First-Out)
  • OPT (Optimal)
  • LRU (Least Recently Used)
  • Approximated LRU
  • RAND (Random)

The simulation generates random page reference strings and analyzes the number of page faults for different frame sizes.

Advanced Page Replacement

Build upon Task 3 by introducing multiple processes, each with its own page reference sequence. Different page allocation strategies are tested:

  • Proportional Allocation
  • Equal Allocation
  • Frequency Control
  • Zone Model

The effects of these strategies on page faults are studied, with the ability for users to adjust simulation parameters.

Distributed Load Balancing

Simulate distributed load balancing across multiple processors. Processes arrive with varying computational needs, and the simulation tests different load balancing strategies:

  • Strategy 1: A processor queries a randomly chosen processor to check its load and decides whether to send the task based on the load threshold.
  • Strategy 2: A processor migrates tasks to another processor if its load exceeds a specified threshold.
  • Strategy 3: Low-load processors can migrate tasks to others with higher loads under certain conditions.

The simulation calculates the average processor load, deviation from the average, and task migration statistics.

About

A collection of operating system simulations in java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages