Fwrite() and fread() of a shared FAT32 formatted file is taking long time in MAC osx Lion C program

Hi
Is there any provision or api in MAC to open a file in shared mode same as windows
   hUSBdrive = CreateFile(pDriveName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, NULL);
we have the follwing scenario where a file is shared among two processes for read/write.one is running on Linux and the other one is running on MAC.where both the processses are reading/writing into the same memory location in the file say "X"
FAT 32 formatted raw data file which is located on the device, is shared among two processes.
One process is running on Linux device which is connected to MAC book through usb.In this linux process, the file is opened using fopen() and we have used fcntl() with O_DIRECT flag.This process continuously reads/writes data on memory location "X" in the shared file .
The other process is running on Mac which has simple c program that opens the file on the connected device i.e from usb drive and reads/writes data using fread()/fwrite().fopen() is used to open the file and FILE_NOCACHE flag is used to avoid caching.
The value at memory location "X" is updated by mac by using fwrite() and the linux process reads the memory location "X" by using fread(). Linux process is taking around 30 sec to get the updated value.
If the value is updated by Linux process at memory location "X" by using fwrite() the MAC process is also taking long time more than a minute to read the updated value by usng fread().
fwrite()/fread() on mac is taking long time where as the windows application which uses the same apis is taking msec time.
Do we need to use other api s or flags to open file?
thanks in advance.......

does any one face this kind of problem?
fwrite() and fread() takes long time?
Is there any problem in read/write to a fat32 file on MAC?

Similar Messages

  • We use a doc template to create a purchased part spec document and then save them as pdf formatted files.  These part spec documents are also appended with the datasheets for these purchased parts.  When we want to update/revise the document, is there a m

    We use a doc template to create a purchased part spec document and then save them as pdf formatted files.  These part spec documents are also appended with the datasheets for these purchased parts.  When we want to update/revise the document, is there a method, using Acrobat, to make those updates to the pdf, or must we go back to the doc template and basically generate a new document?
    Also, our resulting pdf documents aren't searchable.  How can we generate pdf documents that are searchable?  I may want to search for a part value or name within the body of these pdf documents, but currently can't do that...very inconvenient.
    Can you assist?

    Not totally sure about the search issue. A lot depends on how you created the PDF and what is in the datasheets you attached (like are they graphics?). The doc portion should be searchable as long as you used print to the Adobe PDF printer or PDF Maker. For your use, it may be that the print is adequate. However, the result should be searchable (unless maybe you had a form with filled in fields and created the PDF with PDF Maker. I think the form data may be retained in form fields and the fields are not searchable. In that case, a print might be a better procedure. (it would help to know the versions of WORD and Acrobat as well as the exact process you used to create the PDF.)
    If the appended data sheets do not change, then you might try opening the original PDF and then using Replace Pages to replace the file created from the DOC file.

  • I have a Macbook Air that had some coffee spilled on the keyboard and as a result the plus/equals key is no longer functioning. Can I use a program like Ukelele to reprogram a different key to be my plus/equals key? Can I program a function key? key

    I have a Macbook Air that had some coffee spilled on the keyboard and as a result the plus/equals key is no longer functioning. Can I use a program like Ukelele to re-program another key to do that function? Can I re-program a function key to do this function?

    Water + electronics do not mix.  Something was damaged insode, and the logic board may be corroding as is.
    Take it to a Genius Bar for an evaluation and repair estimate.
    This is accidental damage and not covered by warranty.

  • I am a new mac user and I switch to mac due to the graphics that it brings. I do website in pc and I heard iweb is the best.NOW i heard that iweb will be discontinue. so what is the best application there for website using MAC OSX lion?

    I am a new mac user and I switch to mac due to the graphics that it brings. I do website in pc and I heard iweb is the best.NOW i heard that iweb will be discontinue. so what is the best application there for website using MAC OSX lion?

    It is now confirmed  that iWeb, and iDVD, has been discontinued by Apple. This is evidenced by the fact that new Macs are shipping with iLife 11 installed but without iWeb and iDVD.
    On June 30, 2012 MobileMe will be shutdown. However, iWeb will still continue to work but without the following:
    Features No Longer Available Once MobileMe is Discontinued:
    ◼ Password protection
    ◼ Blog and photo comments
    ◼ Blog search
    ◼ Hit counter
    ◼ MobileMe Gallery
    All of these features can be replaced with 3rd party options.
    I found that if I published my site to a folder on my hard drive and then uploaded with a 3rd party FTP client subscriptions to slideshows and the RSS feed were broken.  If I published directly from iWeb to the FPT server those two features continued to work correctly.
    There's another problem and that's with iWeb's popup slideshows.  Once the MMe servers are no longer online the popup slideshow buttons will not display their images.
    Click to view full size
    However, Roddy McKay and I have figured out a way to modify existing sites with those slideshows and iWeb itself so that those images will display as expected once MobileMe servers are gone.  How to is described in this tutorial: #26 - How to Modify iWeb So Popup Slideshows Will Work After MobileMe is Discontinued.
    It now appears that the iLife suite of applications offered on disc is now a discontinued product and the remaining supported iApps will only be available thru the App Store from now on. However, the iLife 11 boxed version that is still available at the online Apple Store (Store button at the top of the page) and those still on the shelves of retailers will include iWeb and iDVD. Those two apps were listed in small, gray text on the iLife 11 box that I bought.
    Personally, if I didn't already have a copy I would purchase one to have it for reinstallation purposes if ever needed.
    This might be of some interest to you at this time: Life After MobileMe.
    OT

  • HT201250 my time capsule is taking too much time indexing backup and then taking longer time to back up ( 207 days ) or longer !!! what shall i do ?

    my time capsule is taking too much time indexing backup and then taking longer time to back up ( 207 days ) or longer !!! what shall i do ?

    Try 10.7.5 supplemental update.
    This update seems to have solved this problem for many.
    Best.

  • I am running Mac OSx Lion 10.7.2. My problem is I can't search on an external network server for a file with the finder toolbar anymore. Nothing shows up and it will not search. I was able to in snow-leopard and am no longer able to w. Lion. Suggestions?

    I am running Mac OSx Lion 10.7.2.
    My issue is that I am not able to run a search in the finder toolabar on a network server. No files show up nor does it search on the server anymore. I was able to run the search in snow-leopard and am no longer able to do so with Lion. Is there a preference I can change or some kind of app or program I can download that will help me with this issue? This is extremely problematic for me as I am searching for files all day everyday. Thank you!

    Hello,
    It isn't the fw in Network you want o use or look at, that's for something completely different.
    My first suspect is the Power Adapter on the LaCie has gone.
    At the Apple Icon at top left>About this Mac, then click on More Info, then click on Hardware>Firewire, what is listed there?
    Reset the Firewire bus
    If your Firewire or USB isn't recognizing any device.  A solution which has worked for some whose hard drive became invisible in 10.4 was simply to follow these four steps to reset the Firewire/USB bus:
    1. Shut the machine down.
    2. UNPLUG the power lead to the computer and any firewire/USB drive or devices.
    3. leave it for 10 minutes.
    4. Connect back up and reboot.
    http://www.macmaps.com/firewirebug2.html

  • HT4818 hey, I want to install windows on my mac, I have mac osx lion and I'm soon going to get mountain lion. If I use Boot camp to install windows do I need a windows disc, will i lose all my data, etc. If so how to I save them. Can I switch back to osx

    hey, I want to install windows on my mac, I have mac osx lion and I'm soon going to get mountain lion. If I use Boot camp to install windows do I need a windows disc, will i lose all my data, etc. If so how to I save them. Can I switch back to osx after I install windows. ( can I switch between Windows and OS X as many times as I want.) thanks for answering.
    Sebastian

    hey, I want to install windows on my mac, I have mac osx lion and I'm soon going to get mountain lion. If I use Boot camp to install windows do I need a windows disc, will i lose all my data, etc. If so how to I save them. Can I switch back to osx after I install windows. ( can I switch between Windows and OS X as many times as I want.) thanks for answering.
    Sebastian

  • PLEASE HELP 2/24/13 Brand new iPod Touch 5th Gen froze on set up and I tried to shut it down and it was on the apple logo screen for a long time and it shut down but now it won't turn on! PLEASE HELPPPPPP

    DESPERATE PLEASE HELP So my mother got herself an iPod touch 5g for Christmas and barely asked me to set it up last night, (BRAND NEW NOT OPENED YET).. I set it up not plugged into iTunes (directly on iPod). I was setting up a new iTunes account for her (got passed Wi-fi set up and location services) and as I was doing that, it mysteriously froze somehow. So I held the home button and power button down simultaneously, which I thought would restart the iPod/shut it down.. so it did, and it was on the apple logo screen for a LONG TIME.. and when I checked after a long time, it was black. I tried to turn it on, charge, and plug it into itunes (iMac computer) and it won't turn on!!!!! PLEASE HELP

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • My final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help

    my final cut is running extremely slow after having for 6 months.  I use external hard drives and save nothing on my computer.  it takes a long time to render now. do you think something is wrong with computer. took it to mac store but they fail to help me.  I have a 13 inch mac book pro 10.6.8 8gb 2.3 gfz intel core i5

    What did Apple tell you about what they did (or did not) find here?
    See if working on the main disk is any faster.
    USB2 is glacial, as I/O interconnects go.  And USB2 disks have been known to fail, or sometimes to drop back to USB1 speeds, too.  FireWire 800 is substantially faster than USB2, but still not as fast as the internal drive connections can provide.
    Put another way, start varying your configuration, and see which configuration changes (still) have the problem, and which don't.

  • Trying to update cc desktop on mac osx lion and keep getting file download error 204

    Hi ,
    I have Mac OSX Lion 10.7.5 and keep getting this error when trying to update my cc desktop app that is reporting an update. There seems to be a problem with the file download. For troubleshooting tips, please visit our customer support page.(Error code: 204)Contact Customer Support
    please resolve.

    I have the same problem and was on lots off sides of adobe, no answer then i searched in the log data and found this.
    06/21/14 19:04:06:710 | [INFO] |  | ACC | LBS | ApplicationFacade |  |  | 43925 | ****************Starting LBS workflow*******************
    06/21/14 19:04:06:715 | [INFO] |  | Download | LBS | ProductInfo |  |  | 43925 | Product locale not specified in the product information file
    06/21/14 19:04:06:715 | [INFO] |  | Download | LBS | ProductInfo |  |  | 43925 | Product name not specified in the product information file
    06/21/14 19:04:06:715 | [INFO] |  | Download | LBS | LBSUtils |  |  | 43925 | Launching LBS in elevated mode
    06/21/14 19:04:12:270 | [INFO] |  | ACC | LBS | ApplicationFacade |  |  | 43999 | ****************Starting LBS workflow*******************
    06/21/14 19:04:12:276 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 43999 | LBS launched in LEGACY mode
    06/21/14 19:04:12:399 | [INFO] |  | Download | LBS | SystemCheck |  |  | 44009 | System OS Version - major = 10, minor = 7, bugFix = 5
    06/21/14 19:04:12:399 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 44009 | ACCC System requirements check passed
    06/21/14 19:04:12:433 | [INFO] |  | Download | LBS | ProductInfo |  |  | 44009 | Product locale not specified in the product information file
    06/21/14 19:04:12:433 | [INFO] |  | Download | LBS | ProductInfo |  |  | 44009 | Product name not specified in the product information file
    06/21/14 19:04:12:433 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 44009 | Bootstrap LBS is successful
    06/21/14 19:04:12:451 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 44009 | Bootstrapper Lock acquired
    06/21/14 19:04:12:469 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 44009 | LBS Lock acquired
    06/21/14 19:04:12:501 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 44009 | Deployment lock check passed
    06/21/14 19:04:12:519 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 44009 | The resolved URL for package service is https://prod-rel-ffc.oobesaas.adobe.com/adobe-ffc-external/core/v1/applications?name=Creat iveCloud&name=CCLBS&osVersion=10.7.5&platform=osx10
    06/21/14 19:04:14:236 | [INFO] |  | ACC | LBS | WorkflowManager |  |  | 44009 | Successfully downloaded application xml at path /tmp/912ACE51-6B35-48F6-9D63-D863680F0EE3/applications.xml
    06/21/14 19:04:14:314 | [INFO] |  | ACC | LBS | WorkflowManager |  | FileUtils | 44009 |
    06/21/14 19:04:14:314 | [ERROR] |  | ACC | LBS | PDM | PackageDownloadManager |  | 44009 | Failed to create folder at temp location for download operations
    06/21/14 19:04:15:143 | [ERROR] |  | ACC | LBS | PDM | PackageDownloadManager |  | 44033 | Could not init xml parser with download manifest file at
    06/21/14 19:04:15:222 | [ERROR] |  | ACC | LBS | WorkflowManager |  |  | 44009 | PDM stopped with fatal error in downloading PIM with error -3
    06/21/14 19:04:15:344 | [ERROR] |  | ACC | LBS | WorkflowManager |  |  | 44009 | Failed in DOWNLOAD PIM
    06/21/14 19:07:19:779 | [INFO] |  | Download | LBS | ETS |  |  | 43999 | Waiting for the async thread to get the task completed
    06/21/14 19:07:19:788 | [INFO] |  | Download | LBS | ETS |  |  | 44013 | Async thread is completed. Now exiting from function.
    06/21/14 19:07:19:790 | [INFO] |  | ACC | LBS | ApplicationFacade |  |  | 43999 | ACC installation end with exit code: 214
    06/21/14 19:07:19:790 | [INFO] |  | ACC | LBS | ApplicationFacade |  |  | 43999 | ****************Closing LBS workflow*******************
    Adobe please help, it´s not the first problem installing updates in CC, i we pay for it !!!

  • Question:  Do I need to run and anti virus program with MAC OSX Lion? Have heard different opinions! If so what would you recommend? Was looking at Sophos. Does anyone have any experience with this? Thanks

    Question:  Do I need to run and anti virus program with MAC OSX Lion? Have heard different opinions! If so what would you recommend? Was looking at Sophos. Does anyone have any experience with this? Thanks

    Do I need to run and anti virus program with MAC OSX Lion? Have heard different opinions!
    You will continue to hear different opinions here, where thoughts range everywhere between "anti-virus software is the evil spawn of Satan" to "anyone not running anti-virus software is a fool."
    Truth is, this is still a very personal decision on a Mac. Depending on circumstances, it is still very easily possible to stay safe without using anti-virus software, but circumstances and personal preferences vary widely. Besides which, anti-virus software cannot even remotely provide you a guarantee of protection!
    To learn how to stay safe (with or without anti-virus software), and how to decide whether to use anti-virus software, see my Mac Malware Guide.

  • HT1338 The application can't be updated due to the presence of Mac Osx 10.7.5. I updated the software of my mac to the latest update and still the application can't be updated. I'm using Mac osx lion (10.7.4)!?

    The application can't be updated due to the presence of Mac Osx 10.7.5. I updated the software of my mac to the latest update and still the application can't be updated. I'm using Mac osx lion (10.7.4)!?
    Regards,
    Mhareky

    OS X Lion Update 10.7.5 (Client Combo).

  • I just upgraded to Mac OSX Lion and can't attach documents to my hotmail.  Can anyone help?

    I just upgraded to Mac OSX Lion and can't attach documents to my hotmail.  Can anyone help?

    Hi there,
    Over the last few days, this issue has been driving me up the wall too!
    I downloaded Lion OS a few months ago, but it was only until a few days ago did i attempt to logon to Hotmail to check my account & send an email with an attachment.
    Normally i use the MAC Mail app, which is synchronised to my hotmail account.
    Anyway, I'm not sure whether the Lion OS is the root cause of the issue, however after much digging around on various forums - the issue for me was resolved by downloading the latest version of Microsoft Silverlight 5 (www.microsoft.com/silverlight). Its a free download....

  • When selecting playback from itunes library on Mac (purchased album from itunes!) i get random song played from that album and my selected song disappears from view. Nothing to do with shuffle.Mac OSX 10.6.8. Help, doing my nut in!!

    When selecting playback from itunes library on Mac (purchased album from itunes!) i get random song played from that album and my selected song disappears from view. Nothing to do with shuffle.Mac OSX 10.6.8. Help, doing my nut in!!

    What is your iTunes version?
    If iTunes 11, have you checked the "Up Next" list? If it is not empty, try if clearing "UP Next" will help:

  • It´s Time Capsule compatible with 10.7.2 Mac OsX Lion and iOS5?

    Hi. I want to buy Time Capsule of 2TB but.. it is compatible with Mac OSX Lion MacBook Pro Middle 2009 and with my iPhone 4 iOS5?

    As far as backing up your Mac, yes it is. Time Capsule serves no purpose as far as backup for the iPhone though. It will give the iPhone a wireless signal though, using dual band technology. iPhone backups must be done through iTunes or iCloud.

Maybe you are looking for

  • Facebook doesn't work with Firefox 28.0 + Flashplayer 12,0,0,77

    Hey everybody, first of all let me tell you the specs of my system: Laptop: Windows 7 Home Premium  64 bit Acer Aspire 7745G Laptop Intel i7 Q720 @1,6 GHz 4,00 GB RAM Browser: Mozilla Firefox 28.0 Flash Player Version: 12,0,0,77 Problem: So the Flash

  • Error while control update

    I have a problem. I have a large project and I need to modify it. I want to add some elements to control (Strict Type Def.). My control - it is a cluster with numbers (or arrays). But I can't to do it. When I want to save a new (modify) control, it a

  • Problems with Spanish language

    Hello! i'm connecting my DB with PHP, my problem comes when i try to capture ñ's or accents (á, é, í, ó, ú ). When i capture these character from my APEX they appear: 20 fátima 20 But, when i insert info from PHP the characters don't appear: 15 f�tim

  • JAVA Browser Plugin for Mozilla on Linux Debian

    Hi! I run a Mozilla Firefox (iceWeasel) on a DEBIAN. It does NOT display german or french special characters like "Umlaute öäüÄÖÜß" and alike properly. The text is displayed within an Applet from a 3rd Party, so i can only change the text which is di

  • I generated responsive layout and my mp4 videos do not play in kindle Fire

    They play on all other devices. This is Kindle Fire 7" HD