Skip to content

Initial scheduler#138

Merged
DrDeano merged 1 commit intodevelopfrom
feature/initial_multitasking
Jul 18, 2020
Merged

Initial scheduler#138
DrDeano merged 1 commit intodevelopfrom
feature/initial_multitasking

Conversation

@DrDeano
Copy link
Member

@DrDeano DrDeano commented Apr 27, 2020

Fix TSS

Also change to .{} syntax where appropriate.
Added the SS segment
Fixed spelling

Refactoring GDT

Handlers return the stack pointer that will be used to restore the tasks stack, normal handlers will return the same stack pointer it was called with where task switching will return the stack pointer of the next task and restore its state using the interrupt stub.

Initial scheduler done

@DrDeano DrDeano requested a review from SamTebbs33 April 27, 2020 17:15
Copy link
Collaborator

@SamTebbs33 SamTebbs33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, nice job on getting it working

@SamTebbs33
Copy link
Collaborator

SamTebbs33 commented Apr 27, 2020

Closes #35

@DrDeano DrDeano force-pushed the feature/initial_multitasking branch from f94bb3a to 1d75e47 Compare June 24, 2020 19:21
@DrDeano DrDeano force-pushed the feature/initial_multitasking branch 2 times, most recently from 2c21330 to 2db6a87 Compare July 14, 2020 21:18
Copy link
Collaborator

@SamTebbs33 SamTebbs33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking snazzy

Copy link
Collaborator

@SamTebbs33 SamTebbs33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous review for comments

Copy link
Collaborator

@SamTebbs33 SamTebbs33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

Fix TSS

Also change to .{} syntax where appropriate.
Added the SS segment
Fixed spelling

Refactoring GDT


Multitasking working for now


WIP scheduler

Refactored Bitmap a bit

WIP still


Task switching working

Handlers return the stack pointer that will be used to restore the tasks stack, normal handlers will return the same stack pointer it was called with where task switching will return the stack pointer of the next task and restore its state using the interrupt stub.

Initial scheduler done


Created a stage 2 init task


Change u32 to usize


Move Task to arch specific


WIP


WIP2


Removed esp from task, replaced with stack_pointer


Removed the debug logs


Fixed init task stack


Change pickNextTask to pointer manipulation

This allows less allocations so faster switching

Temporary enable interrupts for some runtime tests

PIT and RTC need interrupts enabled to run their runtime tests

Renamed schedule => pickNextTask, comptime bitmap for pids not task init

And some other stuff: No pub for the task anymore
Use the leak detector allocator

Fmt


Fix unit tests

And some other stuff :P

PR review

Moved Task out of arch and have the stack init in the arch file
Mocking clean up
Removed commented code
Renamed createTask to scheduleTask where the user will have to provide a task to schedule
Removed redundant pub in log runtime test
Removed global allocator for scheduler
Cleaner assembly in paging

Fmt


Added new Scheduler test mode


Added new test mode to CI


Removed one of the prints


Added doc comment, task test for i386


Removed test


WIP


Runtime tests work

Have a global set in one task and reacted to in another. Also test that local variables are preserved after a task switch.

Removed new lines


Increased line length


Move the allocation of the bool above the task creation
@DrDeano DrDeano force-pushed the feature/initial_multitasking branch from dc8b366 to d600be8 Compare July 18, 2020 21:47
@DrDeano DrDeano merged commit 7e0c1fd into develop Jul 18, 2020
@DrDeano DrDeano deleted the feature/initial_multitasking branch July 18, 2020 22:48
This was referenced Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants