Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Another OS-related post

Another OS-related post

Scheduled Pinned Locked Moved The Lounge
csscomsysadmintoolsquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 0 Offline
    0 Offline
    0x3c0
    wrote on last edited by
    #1

    A few hours ago, I put the last few pieces of my kernel together; for the moment, it's functionally complete. Message passing is working, I have rudimentary support for multiple CPUs, (and hence multiple schedulers) and I can load and run a bootstrap program which initializes the FPU and thus brings my scheduler to life. Driver management is done, and my system calls are pretty much complete (shared page functions are stubbed.) All I need to do now is start working on an interface for each driver type. Given the volume of stuff that I've got to do before it's workable, I've got two (non-programming) questions:

    1. I've got the code and I'm ready to start offering around the web address, but haven't firmly decided on a license for it yet. At the moment, I'm considering just adding something in a readme file which says that no license more restrictive than the BSD license can be applied without my written consent, and that any direct copies must credit me and link back to the repository; are there any obvious loopholes in that which I might have overlooked?
    2. To identify a driver, I use a bitmask with the following types: timer, bus, storage, display, sound, network interface, keyboard, mouse, printer, scanner, camera, port, CPU, plain-text input device, plain-text output device. Are there any common types of device that I might have missed?

    OSDev :)

    L 1 Reply Last reply
    0
    • 0 0x3c0

      A few hours ago, I put the last few pieces of my kernel together; for the moment, it's functionally complete. Message passing is working, I have rudimentary support for multiple CPUs, (and hence multiple schedulers) and I can load and run a bootstrap program which initializes the FPU and thus brings my scheduler to life. Driver management is done, and my system calls are pretty much complete (shared page functions are stubbed.) All I need to do now is start working on an interface for each driver type. Given the volume of stuff that I've got to do before it's workable, I've got two (non-programming) questions:

      1. I've got the code and I'm ready to start offering around the web address, but haven't firmly decided on a license for it yet. At the moment, I'm considering just adding something in a readme file which says that no license more restrictive than the BSD license can be applied without my written consent, and that any direct copies must credit me and link back to the repository; are there any obvious loopholes in that which I might have overlooked?
      2. To identify a driver, I use a bitmask with the following types: timer, bus, storage, display, sound, network interface, keyboard, mouse, printer, scanner, camera, port, CPU, plain-text input device, plain-text output device. Are there any common types of device that I might have missed?

      OSDev :)

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      You may want: - batteries - modems - system devices (Windows has a huge list) maybe differentiate displays and display adapters? maybe differentiate storage devices themselves from their interface? maybe group all imaging devices (camera, scanner, ...)? how about interrupt management as a separate device? what with SD cards and the like? and why would you want a bitmask? seems like a limitation you will end up regretting... :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      I only read formatted code with indentation, so please use PRE tags for code snippets.


      I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).


      0 1 Reply Last reply
      0
      • L Luc Pattyn

        You may want: - batteries - modems - system devices (Windows has a huge list) maybe differentiate displays and display adapters? maybe differentiate storage devices themselves from their interface? maybe group all imaging devices (camera, scanner, ...)? how about interrupt management as a separate device? what with SD cards and the like? and why would you want a bitmask? seems like a limitation you will end up regretting... :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


        I only read formatted code with indentation, so please use PRE tags for code snippets.


        I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).


        0 Offline
        0 Offline
        0x3c0
        wrote on last edited by
        #3

        Thanks for the device suggestions.

        Luc Pattyn wrote:

        maybe differentiate displays and display adapters?

        Good idea, I'll be doing that shortly.

        Luc Pattyn wrote:

        maybe differentiate storage devices themselves from their interface?

        An interface can usually store multiple devices, so I class it as a bus.

        Luc Pattyn wrote:

        maybe group all imaging devices (camera, scanner, ...)?

        Camera and scanner are image input devices, so I can understand that. But printers? Perhaps the best way to work with this is for a imaging input device type, and an imaging output device type...

        Luc Pattyn wrote:

        how about interrupt management as a separate device?

        Are you talking about the IOAPIC and such? Again, I'll add that shortly.

        Luc Pattyn wrote:

        what with SD cards and the like?

        I class them as a storage device.

        Luc Pattyn wrote:

        and why would you want a bitmask? seems like a limitation you will end up regretting...

        Ugh. My typos strike again. I'm using a bit_map_, so that my OS can adapt to any strange devices that might come out, such as cameras which can also store data, or keyboards with USB hubs (buses) in, or sound cards which also perform interrupt redirection (hopefully not the last case - it sounds like a horrid design) [edit] As if by magic, my errors have disappeared... ;)

        OSDev :)

        L 1 Reply Last reply
        0
        • 0 0x3c0

          Thanks for the device suggestions.

          Luc Pattyn wrote:

          maybe differentiate displays and display adapters?

          Good idea, I'll be doing that shortly.

          Luc Pattyn wrote:

          maybe differentiate storage devices themselves from their interface?

          An interface can usually store multiple devices, so I class it as a bus.

          Luc Pattyn wrote:

          maybe group all imaging devices (camera, scanner, ...)?

          Camera and scanner are image input devices, so I can understand that. But printers? Perhaps the best way to work with this is for a imaging input device type, and an imaging output device type...

          Luc Pattyn wrote:

          how about interrupt management as a separate device?

          Are you talking about the IOAPIC and such? Again, I'll add that shortly.

          Luc Pattyn wrote:

          what with SD cards and the like?

          I class them as a storage device.

          Luc Pattyn wrote:

          and why would you want a bitmask? seems like a limitation you will end up regretting...

          Ugh. My typos strike again. I'm using a bit_map_, so that my OS can adapt to any strange devices that might come out, such as cameras which can also store data, or keyboards with USB hubs (buses) in, or sound cards which also perform interrupt redirection (hopefully not the last case - it sounds like a horrid design) [edit] As if by magic, my errors have disappeared... ;)

          OSDev :)

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Yeah, bitmap/bitmask, same difference; you could still run out of bits. For multi-function devices, I don't know; haven't thought that one through yet. A logical approach would be to consider them an aggregate of multiple devices, however them sharing some resources (such as interrupt logic, DMA) may cause some problems. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          I only read formatted code with indentation, so please use PRE tags for code snippets.


          I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).


          0 1 Reply Last reply
          0
          • L Luc Pattyn

            Yeah, bitmap/bitmask, same difference; you could still run out of bits. For multi-function devices, I don't know; haven't thought that one through yet. A logical approach would be to consider them an aggregate of multiple devices, however them sharing some resources (such as interrupt logic, DMA) may cause some problems. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            I only read formatted code with indentation, so please use PRE tags for code snippets.


            I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).


            0 Offline
            0 Offline
            0x3c0
            wrote on last edited by
            #5

            Luc Pattyn wrote:

            Yeah, bitmap/bitmask, same difference; you could still run out of bits.

            I've already considered that, and have a custom Bitmap class ready for implementation. Perhaps when I allow a process to become a driver, I should let it provide an array of n integers to form a large bitmap?

            Luc Pattyn wrote:

            A logical approach would be to consider them an aggregate of multiple devices, however them sharing some resources (such as interrupt logic, DMA) may cause some problems.

            The interrupt logic is what confounds me about the multiple device approach. For the moment, I just give them an interface (still designing) to adhere to for every bit they choose to set and treat them as a single device. But even then I hit a problem when it comes to code duplication. I might create a shared library of common device management functions, and link my drivers against it.

            OSDev :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups