ArjiJethin /
StockPulse
A Spring boot Java Web Application for Stocks and Exchanges
56/100 healthLoading repository data…
Helios117 / repository
A Stock Exchange Simulator built using Java
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A comprehensive stock trading simulator demonstrating graduate-level Operating Systems concepts through a realistic market trading system. This project implements CPU scheduling, virtual memory management, inter-process communication, transactional file systems, and process control mechanisms.
This simulator models a stock exchange where multiple trader processes execute trades concurrently while demonstrating core OS concepts:
StockExchange/
├── README.md # Project documentation
├── .gitignore # Git ignore rules
│
├── src/ # Source code
│ ├── StockSimulator.java # Main simulation runner
│ ├── StockExchange.java # OS kernel simulation
│ │
│ ├── Core Data Structures
│ │ ├── Stock.java # Stock representation
│ │ ├── Order.java # Trade order objects
│ │ └── Portfolio.java # Trader portfolio management
│ │
│ ├── OS Components
│ │ ├── CustomScheduler.java # CPU scheduling algorithms
│ │ ├── Task.java # Schedulable task abstraction
│ │ ├── ProcessControlBlock.java # Process control blocks
│ │ ├── VirtualMemoryManager.java # Virtual memory & paging
│ │ ├── MessageQueue.java # Message passing IPC
│ │ ├── SharedMemory.java # Shared memory IPC
│ │ ├── CustomSemaphore.java # Semaphore synchronization
│ │ └── TransactionalFS.java # File system with WAL
│ │
│ └── Process Management
│ ├── TraderProcess.java # Trader process implementation
│ └── PerformanceMonitor.java # Performance tracking
│
├── docs/
│ └── QUICK_REFERENCE.md # Quick reference guide
│
└── logs/ # Runtime logs (gitignored)
└── transactions.log # Transaction log (generated)
File: CustomScheduler.java
Implements four scheduling algorithms with full state management:
Key Features:
File: VirtualMemoryManager.java
Simulates demand paging with page replacement:
Configuration:
MessageQueue.java)SharedMemory.java)CustomSemaphore.java)File: TransactionalFS.java
Implements ACID properties with write-ahead logging:
Log Format: [TXN:id] operation @ timestamp | data
File: ProcessControlBlock.java
Complete process lifecycle management:
States: NEW → READY → RUNNING → WAITING → TERMINATED
Tracked Metrics:
File: StockExchange.java
Coordinates all OS components:
cd src
javac *.java
# Normal mode (simplified output - recommended for reports)
java StockSimulator
# Verbose mode (detailed OS operation visibility - for understanding)
java StockSimulator -v
rm -f *.class
Normal mode provides clean performance reports perfect for analysis and lab reports.
Verbose mode (-v flag) shows detailed:
Use normal mode for running experiments and collecting metrics. Use verbose mode to understand exactly how OS concepts are working under the hood.
The simulator runs three configurations automatically:
Each simulation tracks and reports:
╔════════════════════════════════════════════════════════╗
║ Stock Trading Simulator - OS Concepts Demo ║
╚════════════════════════════════════════════════════════╝
============================================================
SIMULATION 1: Priority Scheduling + LRU Page Replacement
============================================================
=== Stock Exchange Starting ===
Scheduler: PRIORITY
Virtual Memory: VMM[Policy=LRU, Frames=0/20, ...]
Traders: 5
Stocks: 5
================================
--- Trading Status ---
Scheduler[Algo=PRIORITY, ReadyQueue=2, WaitingQueue=0, ContextSwitches=45]
VMM[Policy=LRU, Frames=15/20, PageFaults=23, Hits=187, FaultRate=10.95%]
...
============================================================
FINAL PERFORMANCE REPORT
============================================================
--- Trader Statistics ---
Trader 0: 10 trades, 12 context switches, 145ms wait time
Trader 1: 10 trades, 15 context switches, 203ms wait time
...
--- OS Component Statistics ---
Scheduler: PRIORITY
Total Context Switches: 67
Virtual Memory: VMM[...]
Page Faults: 45
Page Hits: 312
Fault Rate: 12.61%
Thrashing: NO
...
--- Performance Metrics ---
Total Execution Time: 5420ms
Total Trades: 50
Throughput: 9.23 trades/sec
Avg Context Switch Time: 80.90ms
Which scheduling algorithm provides best throughput?
How does page replacement affect performance?
What is the overhead of context switching?
How do IPC mechanisms compare?
What causes thrashing?
Modify these parameters in StockSimulator.java:
int numTraders = 5; // Number of concurrent traders
int physicalFrames = 20; // Physical memory frames
int virtualPages = 100; // Virtual memory pages
int timeQuantum = 100; // RR quantum (ms)
int maxConcurrentTraders = 5; // Semaphore permits
int messageQueueCapacity = 1000; // Max pending orders
Solution: Ensure logs directory exists or code will create it automatically
Solution: Increase physicalFrames or decrease numTraders
Solution: Reduce virtualPages or increase
Selected from shared topics, language and repository description—not editorial ratings.
ArjiJethin /
A Spring boot Java Web Application for Stocks and Exchanges
56/100 healthxinchentechnote /
A Java implementation of financial protocol codecs for various exchanges including SSE (Shanghai Stock Exchange), SZSE (Shenzhen Stock Exchange), and BSE (Beijing Stock Exchange)
63/100 healthsaurabha994 /
Create a Stock Exchange Platform to buy and sell shares
melohub-xbit /
This project aims to simulate how an HFT (High-Frequency Trading) firm executes its strategies to profit through the stock exchanges. The project also simulates how a stock exchange manages its order book to match and execute orders efficiently using advanced data structures and algorithms to minimize the latency.
34/100 healthdjordje34 /
A console stock exchange platform made with Java
39/100 health254binaryninja /
A real-time financial data processing system for the Nairobi Stock Exchange (NSE) with a Python scraper and Java API components.
53/100 health