PatchMixolydic / spinel

An operating system built to explore systems programming
MIT License
4 stars 1 forks source link

Mutual exclusion #12

Open PatchMixolydic opened 4 years ago

PatchMixolydic commented 4 years ago

While SMP isn't planned for a long while now, mutual exclusion will still be needed before task scheduling is added.

For example, say there were two processes. Process A allocates memory, but in the middle of malloc, its timeslice expires. Process B then also allocates memory. Without mutual exclusion, it's possible that both process A and process B might allocate the same block of memory.

PatchMixolydic commented 4 years ago

Partially done, but see #13

PatchMixolydic commented 3 years ago

Currently using spinlocks, but maybe atomics would be more performant? Need to investigate