Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6104527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:51:08+00:00 2026-05-23T13:51:08+00:00

I have read some tips that multithread implementation largely depends on the target OS

  • 0

I have read some tips that multithread implementation largely depends on the target OS you are working on. And the OS finally provides the multithread capability. Such as Linux has POSIX standard implementation and windows32 has another way.

But I want to know major different in programming language level. C seems to provide more choice for synchronization such as Mutex, read-write locks, record locking, Posix semaphores.

But in Java, I know we can use synchronized works like Mutex? And some other high-level API like AtomicXX and volatile. But I didn’t find anything like record locking and read-write locks. Is it a weak side of Java language? Or it is a sacrifice for crossing platform?

Also, I want to know is this a major reason that web server like Nginx and DB like oracle are all written in C/C++?

I am actually a Java developer and I am very curious about it.
Hope someone can give me some advice about it.

EDIT:

Paul and Jesper already advised that Java support all the similar lock class like C/C++ after JDK1.5. But if possible, I still wish someone can explain more details why Java provides enough support, we still cannot find a pure Java "oracle".

EDIT:

Also, I want to add something interesting I learned from developer.com by Nasir Khan.
Understanding Java Multithreading and Read-Write Locks.

Some topic in it.

  • The interaction of the shared main
    memory with the thread’s local
    memory,
  • The meaning of "synchronization"
    with respect to this interaction
    and mutual exclusion.
  • Clarify the distinction of an
    object’s lock and the resources it guards.

EDIT:

From FileLock JavaDocs

File locks are held on behalf of the entire Java virtual machine. They are not suitable for controlling access to a file by multiple threads within the same virtual machine.

File lock in Java is exactly as same as in C/C++.

UPDATE

I find another interesting area to compare that is

in C++, there is some thing like

atomic<int> x, y;

in JAVA we also have AtomicInteger.
Are they the same thing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:51:09+00:00Added an answer on May 23, 2026 at 1:51 pm

    Java does provide read-write locks – http://download.oracle.com/javase/6/docs/api/java/util/concurrent/locks/ReadWriteLock.html.

    Have a look at the java.util.concurrent package if you haven’t already. I suspect Java’s support is comparable to C’s. There are also a number of web servers written in Java that use either multithreaded or async IO (NIO).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read in some of the ClickOnce posts that ClickOnce does not allow
I just got Delphi 2009 and have previously read some articles about modifications that
I have read on Stack Overflow some people that have converting to C#2.0 to
I have read some tutorials for bezier curve such as this one http://www.codeproject.com/KB/recipes/BezirCurves.aspx .
I have read through several reviews on Amazon and some books seem outdated. I
I have to read data from some files and insert the data into different
Imagine I have some code to read from the start to end of a
I have been attempting to write some routines to read RSS and ATOM feeds
I just started to read about this new technology... Does someone have some knowledge
I have read a lot that LISP can redefine syntax on the fly, presumably

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.