Skip to content

Commit 1dc55bd

Browse files
authored
some more additions to the scheduling page (#39)
* dereferenced the context pointer passed * small troubleshooting tip * fixed empty line issue * Update 02_Scheduler.md fixed as per the maintainers request
1 parent e2652e7 commit 1dc55bd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

04_Scheduling/02_Scheduler.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ We'll delve into what exactly a process might need to contain in a separate chap
4545
```c
4646
typedef struct {
4747
status_t process_status;
48-
cpu_status_t context;
48+
cpu_status_t* context;
4949
} process_t;
5050
```
5151

@@ -221,6 +221,13 @@ void idle_main(void* arg) {
221221
222222
The idle task is scheduled a little differently: it should only run when there is nothing else to run. You wouldn't want it to run when there is real work to do, because it's essentially throwing away a full quantum that could be used by another thread.
223223
224+
### Troubleshooting
225+
226+
#### Interrupts Stop After Context Switch
227+
228+
Make sure to check the value of the flags register (rflags/eflags).
229+
You might've set it to a value where the interrupt bit is cleared, causing the computer to disable hardware interrupts.
230+
224231
## Wrapping Up
225232
226233
This chapter has covered everything needed to have a basic scheduler up and running. In the next chapter we'll look at creating and destroying processes. As mentioned this scheduler was written to be simple, not feature-rich. There are a number of ways you could improve upon it in your own design:

0 commit comments

Comments
 (0)