Python Operating System???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Rubin

    #31
    Re: Python Operating System???

    "Roose" <b@b.b> writes:[color=blue]
    > Well, then of course you know I have to say: An OS does not run inside a
    > browser. There's a sentence I never thought I'd utter in my lifetime.
    >
    > So that is an irrelevant example, since it obviously isn't a task scheduler
    > in the context of this thread.[/color]

    Huh? I'm just baffled why you think writing a scheduler in an OS is
    harder than writing one in an application. You have some means of
    doing a coroutine switch in one situation, and some means of doing a
    hardware context switch in the other. Aside from that the methods are
    about the same.

    Why do you think there's anything difficult about doing this stuff in
    Python, given the ability to call low level routines for some hardware
    operations as needed?

    Comment

    • Roose

      #32
      Re: Python Operating System???

      [color=blue]
      > Huh? I'm just baffled why you think writing a scheduler in an OS is
      > harder than writing one in an application. You have some means of
      > doing a coroutine switch in one situation, and some means of doing a
      > hardware context switch in the other. Aside from that the methods are
      > about the same.[/color]

      Because of performance. Task schedulers and device drivers tend to be
      timing sensitive. Go look up "task schedular latency". The longer your
      scheduler spends trying to figure out which thread to run, the longer the
      latency will be.

      I mean in the worst case, if you are interpreting everything, what if you
      change the task scheduler code? Then an interrupt happens, and oh shit we
      have to parse and recompile all the scheduling code. Oh wait now we ran out
      of kernel memory -- now we have to run the garbage collector! Let your
      interrupt wait, no?

      It just seems nonsensical. Maybe not impossible, as I've already said. I
      haven't tried it. But go ahead and try it -- I would honestly be interested
      in the results, all kidding aside. It shouldn't be too time-consuming to
      try, I suppose. Get Python running in the Linux kernel, and then replace
      the task scheduling algorithm with some Python code. See how it works. I
      suspect you will degrade the performance of an average system significantly
      or unacceptably. But who knows, I could be wrong.

      Of course, hardware is getting faster as you say. But multitasking
      performance is still an active and important area of OS research, and I
      doubt that any designer of an OS (that is actually meant to be used) would
      spend any cycles to have their task scheduler in Python -- and that will be
      probably be true for a very long time. Or maybe I'm wrong -- go bring it up
      on comp.os.linux or whatever the relevant newsgroup is. I'd like to hear
      what they have to say.

      [color=blue]
      >
      > Why do you think there's anything difficult about doing this stuff in
      > Python, given the ability to call low level routines for some hardware
      > operations as needed?[/color]



      Comment

      • JanC

        #33
        Re: Python Operating System???

        jtauber schreef:
        [color=blue]
        > see http://cleese.sourceforge.net/[/color]

        There is not much to see there, most of the wiki is filled with spam...

        --
        JanC

        "Be strict when sending and tolerant when receiving."
        RFC 1958 - Architectural Principles of the Internet - section 3.9

        Comment

        Working...