Drobe :: The archives
About Drobe | Contact | RSS | Twitter | Tech docs | Downloads | BBC Micro

Reply to thread

Viking, how can you split the API from the OS? The API is just the entry point, the OS contains the code and the context. You can't just have multiple copies of the same code running in different threads, what is needed is change the code to allow multiple contexts.

Take a simple one such as directory enumeration. Currently the OS only has one context, so an application must call a SWI to get the first file, then make a number of additional calls to get the rest of the files. It cannot allow another task to run during this operation, as if that also talks to the OS, it will destroy the context, and the enumeration will subsequently fail.

Now you can't just run two copies of the entire OS to get round this, firstly because there is only one set of disc hardware, and even if you got round that with virtual machines, you then have not only two separate contexts for the enumeration, but also the disc contents. i.e. the contents of the disc could appear different to each application.

The filing system code needs to be re-written to allow use of the API by separate threads, providing a context for each of them, but maintaining a single consistent state for the filing system (synchronsisng reads and writes by each thread), and driving the disc hardware.

This can only be done by re-writing the OS to be thread aware. There are no short cuts that can be taken, "fork everything" just wont work.

 is a RISC OS Userdruck on 29/5/09 11:07AM
[ Reply | Permalink | Report ]

Please login before posting a comment. Use the form on the right to do so or create a free account.

Search the archives

Today's featured article

  • The story behind RISC OS's file rescuer: DiscKnight

     Discuss this. Published: 31 Jan 2001

  • Random article

  • Build your own computer
    Acorn machine made from Lego
     11 comments, latest by ajpullan on 3/8/03 12:04AM. Published: 29 Jul 2003

  • Useful links

    News and media:

    Top developers:
    RISCOS LtdRISC OS OpenMW SoftwareR-CompAdvantage SixVirtualAcorn

    CJE MicrosAPDLCastlea4X-AmpleLiquid SiliconWebmonster


    RISCOS.org.ukRISCOS.orgRISCOS.infoFilebaseChris Why's Acorn/RISC OS collectionNetSurf

    Non-RISC OS:
    The RegisterThe InquirerApple InsiderBBC NewsSky NewsGoogle Newsxkcddiodesign

    © 1999-2009 The Drobe Team. Some rights reserved, click here for more information
    Powered by MiniDrobeCMS, based on J4U | Statistics
    "Your attitude is appalling and childish"
    Page generated in 0.0552 seconds.