The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
PRo*C program for SQL queries using threading concept user71408 UNIX for Dummies Questions & Answers 0 05-21-2008 02:11 AM
LUN concept Prem HP-UX 1 02-22-2007 05:02 PM
Having difficulty with UNIX concept. Please help! ALon UNIX for Dummies Questions & Answers 4 01-11-2007 11:42 AM
IPTABLES Firewall concept help Bradley Porter UNIX for Dummies Questions & Answers 1 01-02-2007 05:39 AM
concept of mount point Vikas Sood UNIX for Dummies Questions & Answers 3 06-08-2006 06:31 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-28-2007
maverix maverix is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 12
semaphore concept

Hi All,

I am going through the semaphore concept and have a doubt regarding the same and hope to get a resolution here.

I have a file which has a number of records.
I want to write an application (in C) which will be able to do concurrent read/write on these records.

Of what I have understood about semaphores, I know that a process can obtain a lock on the critical section of code, read/write into records, then release the lock so the other processes waiting to access the data can obtain a lock.

I am confused and tend to think that "Wouldn't this concept lead to a more serious problem?" as another process, actually wanting to read/write a different record on the same file has to wait for the lock to get released by the process which has obtained the lock. If this is the case, think of a situation where we have a large number of processes (say, more than 1000) wanting to do a read/write on same/different records. Wouldn't this concept slow down the application?

Please let me know if I have misunderstood the concept and throw some light on this...

Regards
maverix

Last edited by maverix; 08-28-2007 at 11:35 AM.. Reason: remove my name in the signature
 

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0