CC 277: Using Files in Concurrent Linux Designs

In the August issue of Circuit Cellar, columnist Robert Japenga, who has been designing embedded systems since 1973, wraps up his eight-part series on the benefits and challenges of designing concurrency into your systems and some of the specific tools Linux provides for IPC.

His final installment discusses file usage. It also recounts how the development of read/write nonvolatile memory (i.e., flash technology) enabled embedded systems to contain cost-competitive file systems.

“Disk drives in the early days were too big and weren’t reliable enough for embedded systems. The first real disk drive I used in 1975 was a Digital Equipment RK-05 for a PDP-11 that held an amazing 2.5 MB of data,” Japenga says in his column. “The RK-05 was released in 1972. It initially weighed 100 lbs. The $74 monthly maintenance cost would buy a 1-TB drive today or 12 per year.

In 1972, a Digital Equipment RK-05 disk drive held only 2.5 MB of data. (Photo courtesy of Mark Csele)

“In 1977, a friend from Bell Labs carried an RK-05 with a copy of Unix onto a plane. At the gate, the inspector opened the lid and put his finger on the magnetic platter. Whoops. The disk gloriously crashed when inserted into my disk drive. It seemed I would have to wait for my first copy of Unix.

“”For a time, companies produced hardened disk drives. The cost was very prohibitive and the reliability was questionable. Then in 2001, the iPod changed all that when Apple used Toshiba’s 1.8” hard drive, which is only 0.2” thick. As a consumer product, it had to be extremely rugged. Very small embedded systems now had hard drives.

“But not all of us built millions of systems, nor could we afford to put a hard disk in our temperature controllers, motion-control devices, or avionics boxes. However, with the advent of read/write nonvolatile memory (i.e., flash technology), embedded systems now had a way to contain cost-competitive file systems. This paved the way for putting real OSes into embedded systems. In the late 1990s and later, we were putting DOS on a flash card. Well, not everything was a real OS! And that is where Linux comes into the picture.”

Japenga’s column goes on to discuss file systems and the mechanisms to create concurrent systems, including nonvolatile flag files, volatile flag files, data sharing, and event triggering. It concludes with a thorough discussion of some of the risks of using a file system in a concurrent system.

“Modern embedded systems are doing more than I ever imagined when I started out,” Japenga says. “Adding a file system to your design can provide significant advantages to improve your product. As with all OS functions, we need to understand how our file system works if we are going to use it properly—especially in systems with concurrency.”

For more, check out  Japenga’s column, Embedded in Thin Slices, in Circuit Cellar‘s August issue.

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>