[Baypiggies] File IO question

Mike Cheponis mac at Wireless.Com
Tue Jul 25 20:46:42 CEST 2006


Bryan is right.

I suggest you glue on a piece of battery-backed (or super-cap-backed) SRAM for your semaphore, or maybe use FRAM:
http://www.fujitsu.com/emea/services/microelectronics/fram/
http://www.ramtron.com/

You definitely don't want to beat on the flash FS too much...

-Mike


On Tue, 25 Jul 2006, Bryan O'Sullivan wrote:

> Date: Tue, 25 Jul 2006 10:53:21 -0700
> From: Bryan O'Sullivan <bos at serpentine.com>
> To: davidoff56 at alluvialsw.com
> Cc: baypiggies at python.org
> Subject: Re: [Baypiggies] File IO question
> 
> On Tue, 2006-07-25 at 10:32 -0700, Monte Davidoff wrote:
>
>> 1. Write new data file.
>> 2. Invoke /bin/sync to ensure the new data file is written to disk, if
>> shelve did not take care of this already.
>
> Just use os.fsync(fp.fileno()).
>
>> I'm also working on an embedded Linux application that writes to a flash
>> drive.  To get journaling, I've used XFS on the flash drive, although I
>> have not tried JFFS2.
>
> This is not a very good idea.  Linux's flash filesystems are designed
> specifically to limit the number of write cycles they make to any given
> region of memory ("wear leveling"), which disk-oriented filesystems do
> not need to worry about.  You'll significantly reduce the usable
> lifetimes of your flash devices if you use an inappropriate filesystem.
> Also, XFS is enormous, hardly a good fit for a presumably
> resource-constrained embedded system.
>
> 	<b


More information about the Baypiggies mailing list