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

  • SEARCH
  • Home
  • 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 8496843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:57:43+00:00 2026-06-10T23:57:43+00:00

My VC++ 2010 express install time has expired so i cant use it anymore

  • 0

My VC++ 2010 express install time has expired so i cant use it anymore without changing the date from right-down. I dont want to do this so i am asking you these questions:

Do you think, below multi-threaded program’s threads working in an order?

What if i put similar 3 more threads to calculate next-1000 particles, does the contet-switches become exhausting or just the Sleep(10)s are exhausting?

Note: Each calculation(each one of force,vel., pos.) takes about 9 ms.

Something like this:
core1:first 1000 particles forces     //
core2:first 1000 particles velocities //===>these 3 are connected
core3:first 1000 particles positions  // ------------------------------
                                                                      |
core4:next 1000 particles forces      //                               ====these 2 will be connected
core5:next 1000 particles velocities  //===>these 3 are connected     |
core6:next 1000 particles positions   // ------------------------------

boolean locker1;
boolean locker2;
boolean locker3;

boolean worker1;
boolean worker2;
boolean worker3;

void core1(void * x)
{
    while(worker1)
    {
         while(!locker1){Sleep(10);}
         for(int i=0;i<1000;i++)
         {
              //calculate 1000 particles forces
         }
         locker2=true; //starts core2 thread
         while(locker2){Sleep(10);} //core2 must be working
         while(locker3){Sleep(10);} //core3 must be working
    }
   _endthread();
}

void core2(void * y)
{
    while(worker2)
    {
         if(!locker2){Sleep(10);}
         for(int i=0;i<1000;i++)
         {
              //calculate 1000 particles velocities
         }
         locker3=true; //starts core3 thread
         while(locker3){Sleep(10);} //core3 must be working
         while(locker1){Sleep(10);} //core1 must be working
    }
   _endthread();

}

void core3(void * z)
{
    while(worker3)
    {
         if(!locker3){Sleep(10);}
         for(int i=0;i<1000;i++)
         {
              //calculate 1000 particles positions
         }
         locker1=true; //starts core1 thread
         while(locker1){Sleep(10);} //core1 must be working
         while(locker2){Sleep(10);} //core2 must be working
    }
   _endthread();

}

int main()
{
    locker1=false; 
    locker2=false;
    locker3=false;
    worker1=true; 
    worker2=true;
    worker3=true;
    _beginthread(core1,0,(void *)0);
    _beginthread(core2,0,(void *)0);
    _beginthread(core3,0,(void *)0);

    locker1=true; //gets the waiting core1-thread working
                  //so i think when it finishes, it releases core2 to work
                  //when core2 finishes, core3 starts working

    Sleep(100);
    worker1=false;
    worker2=false;
    worker3=false; //after a while i shut them down

}

Please if any one having VC++ could give me some hints or suggestions i appreciate.

Or should i just forget the 3+3-->2 system and do this(6)? :

core1 first 233 particles for computing forces ----->all for velocity ----->all for psoition
core2 next 233 particles for computing forces ----->all for velocity ----->all for psoition
core3 next 233 particles for computing forces ----->all for velocity ----->all for psoition
core4 next 233 particles for computing forces ----->all for velocity ----->all for psoition
core5 next 233 particles for computing forces ----->all for velocity ----->all for psoition
core6 last 233 particles for computing forces ----->all for velocity ----->all for psoition

and just wait all of them finish to get to next calculation?
  • 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-06-10T23:57:45+00:00Added an answer on June 10, 2026 at 11:57 pm

    “Do you think, below multi-threaded program’s threads working in an order?”

    Not at all. You violate way too many rules on multi-threaded programming.

    Also, the point of threads is to execute things in parallel. If you need to do A, B and C in sequence, do them in the same thread.

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

Sidebar

Related Questions

I want to use iis express with vs 2010 but i can't install sp1
How do you install and use OpenCV 2.4.3 under VC++ 2010 Express?
I have a visual C# 2010 express install. Built a .NET 4.0 dll that
I'm using VS Team System 2008 and gonna install VS 2010 Express editions.
I use VisualStudio 2010 and olso have Visual C# 2010 Express installed on my
I'm trying to install Visual Studio 2010 Express. I got error 1935 during installation
Is there a way to install Crystall Report Free on Visual Basic 2010 Express?
I use Visual C++ 2010 Express Edition to compile and run the .exe files
I have just downloaded and installed the VC++ 2010 Express tool from Microsoft. I
I currently use VS 2010 Express for my C++ IDE needs, but have found

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.