From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9c78d085847f47af X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: file locking in Ada Date: 1997/03/28 Message-ID: <1997Mar28.111002.1@eisner>#1/1 X-Deja-AN: 229043736 X-Nntp-Posting-Host: eisner.decus.org References: <333BB430.BF8@aston.ac.uk> <5hglog$lf8@top.mitre.org> X-Nntp-Posting-User: KILGALLEN X-Trace: 859565410/16219 Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-03-28T00:00:00+00:00 List-Id: In article <5hglog$lf8@top.mitre.org>, mfb@mbunix.mitre.org (Michael F Brenner) writes: > In any language, such as Ada or C, you can call an underlying operating > system or file management system, such as Mips OS, VxWorks, Desqview, > Apple OS, CP/M, Starlet, Linus, DOS, etc. > > Ada is a lanaguage which lets you implement file locking within the > language itself. Set up a task which processes all requests for files. > Lets say you are using this for a database management system with > file-at-a-time access, since you wish to have file locking instead of > record locking. Therefore your operations will be a subset of relational > algebra, such as the following: select, merge (or join), import, delete, > and update. Each of these operations would be an entry in the file > request task. No other software talks to the files except through > that file request task. The task processes the requests one at a time, > and that implements TOTAL file locking. Ensuring that no other software accesses the file, however, is a local problem unless you rely on an operating system guarantee. Such an operating system guarantee can only be foolproof if it uses inner modes or other hardware protection (i.e., not DOS). Larry Kilgallen