Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework redesign? #11

Open
BarclayII opened this issue Oct 5, 2015 · 8 comments
Open

Framework redesign? #11

BarclayII opened this issue Oct 5, 2015 · 8 comments

Comments

@BarclayII
Copy link
Owner

After trying on MSIM I found my design... awful, as it's not very scalable.

I guess I'll change my framework some time after dynamic memory allocation implementation.

@davidgao
Copy link
Collaborator

davidgao commented Oct 6, 2015

please explain what is going wrong.

@BarclayII
Copy link
Owner Author

I'm not satisfied with current driver function implementation, which switches drivers by compiler macro switches, and therefore having an underlying assumption that there's only one input device, one output device, etc.

What I'm thinking is that our kernel framework should at some point support multiple input/output/storage devices. Even if our boxes have only one such device, our framework should allow multiple devices to plug themselves in.

I had sent you a tutorial PDF earlier in this holiday which somehow addressed this problem.

Of course redesigning involves much work, so I'm wondering whether it's essential to do so.

@davidgao
Copy link
Collaborator

davidgao commented Oct 7, 2015 via email

@BarclayII
Copy link
Owner Author

Agree.

I've uploaded the device structure header to include/device.h.

Where's the gitbook stuff?

@davidgao
Copy link
Collaborator

davidgao commented Oct 9, 2015

https://www.gitbook.com/@davidgao/dashboard

contains two book, one as a fork of xv6-book and one as the lab document
connect to gitbooks and i'll give you collaborator access

@BarclayII
Copy link
Owner Author

Can't access your book: 403 Forbidden.

Strange...

@davidgao
Copy link
Collaborator

After looking things up, I have come to an idea:

  1. We leave the drivers here AS IS, at this moment, so that we can use the devices before we come to memory management.
  2. We deal with memory management properly.
  3. We register devices and drivers dynamically, like we do in linux. This is what a modern OS should do.

Any ideas?

@BarclayII
Copy link
Owner Author

Totally agreed.

That's why I intended to reimplement driver framework after dealing with dynamic memory allocation

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

No branches or pull requests

2 participants