Chore: update README.md

This commit is contained in:
2025-04-26 08:37:30 +08:00
parent 72320ede22
commit 7001ba4222
2 changed files with 13 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
# Intro. to OS HW1 # Introduction to OS 2024 HW
## Docker Compose usage ## Docker Compose usage

View File

@@ -56,19 +56,19 @@ class Instruction {
void void
Machine::Run() Machine::Run()
{ {
Instruction *instr = new Instruction; // storage for decoded instruction Instruction *instr = new Instruction; // storage for decoded instruction
if (debug->IsEnabled('m')) { if (debug->IsEnabled('m')) {
cout << "Starting program in thread: " << kernel->currentThread->getName(); cout << "Starting program in thread: " << kernel->currentThread->getName();
cout << ", at time: " << kernel->stats->totalTicks << "\n"; cout << ", at time: " << kernel->stats->totalTicks << "\n";
} }
kernel->interrupt->setStatus(UserMode); kernel->interrupt->setStatus(UserMode);
for (;;) { for (;;) {
OneInstruction(instr); OneInstruction(instr);
kernel->interrupt->OneTick(); kernel->interrupt->OneTick();
if (singleStep && (runUntilTime <= kernel->stats->totalTicks)) if (singleStep && (runUntilTime <= kernel->stats->totalTicks))
Debugger(); Debugger();
} }
} }