gwsystems / composite

A component-based OS
composite.seas.gwu.edu
184 stars 70 forks source link

Addition to the capmgr initargs: the list of components in shared virtual address spaces #460

Closed gparmer closed 1 year ago

gparmer commented 1 year ago

Summary of this Pull Request (PR)

The current thinking is for the ICBs to be created and maintained by the capmgr so that they can be added to with additional thread allocations. The capmgr needs capabilities to the ICBs when creating threads. Thus, this PR simply uses the initargs to pass the components in shared virtual address spaces to the capmgr.

Intent for your PR

Choose one (Mandatory):

Reviewers (Mandatory):

@evanstella This PR is dedicated to you ;-)

Code Quality

As part of this pull request, I've considered the following:

Style:

Code Craftsmanship:

Testing

Tested with a composition script with and without shared vas.

gparmer commented 1 year ago

Example output with shared VAS (see the second line):

...
Starting the capability manager.      
Components in shared address spaces: 6 4 3 2                                                   
Capmgr: processing 12 capabilities for components that have already been booted
        Creating component tests.unit_pingpong.global.ping: id 6, caps (captbl:88, pgtbl:92,comp:96), captbl frontier 100, heap pointer 1649272823808, scheduler 3
        Creating component tests.unit_schedcomp.global.schedtest: id 5, caps (captbl:76, pgtbl:80,comp:84), captbl frontier 124, heap pointer 5382144, scheduler 3
        Creating component pong.pingpong.global.pong: id 4, caps (captbl:64, pgtbl:68,comp:72), captbl frontier 64, heap pointer 1099517009920, scheduler 3
        Creating component sched.root_fprr.global.sched: id 3, caps (captbl:52, pgtbl:56,comp:60), captbl frontier 136, heap pointer 549761507328, scheduler 2
Capmgr: 1 components that need execution
        Created scheduling execution for 3
...

...and without...

...
Starting the capability manager.      
Components in shared address spaces: none 
Capmgr: processing 12 capabilities for components that have already been booted
        Creating component tests.unit_pingpong.global.ping: id 6, caps (captbl:88, pgtbl:92,comp:96), captbl frontier 100, heap pointer 1649272823808, scheduler 3
        Creating component tests.unit_schedcomp.global.schedtest: id 5, caps (captbl:76, pgtbl:80,comp:84), captbl frontier 124, heap pointer 5382144, scheduler 3
        Creating component pong.pingpong.global.pong: id 4, caps (captbl:64, pgtbl:68,comp:72), captbl frontier 64, heap pointer 1099517009920, scheduler 3
        Creating component sched.root_fprr.global.sched: id 3, caps (captbl:52, pgtbl:56,comp:60), captbl frontier 136, heap pointer 549761507328, scheduler 2
Capmgr: 1 components that need execution
        Created scheduling execution for 3
...

See the cos_init in the capmgr to see where the print out comes from. The print out isn't useful. But you can use similar logic (or lookups in the initargs path for a specific component, instead of the iteration).