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

  • UniPod speed tested
    IDE and ethernet with a need for speed
     28 comments, latest by micken on 17/8/04 3:53PM. Published: 2 Jun 2004

  • Random article

  • Element14 engineers to enjoy 170 million windfall

     Discuss this. Published: 5 Oct 2000

  • 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
    "As their reports are full of errors, [omissions] and mis-reporting - so readers you have been warned... unfortunately Drobe articles cannot be taken at face value"
    Page generated in 0.0483 seconds.