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 9205559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:58:41+00:00 2026-06-17T23:58:41+00:00

I have created a simple program in java: public static void main(String[] args) throws

  • 0

I have created a simple program in java:

public static void main(String[] args) throws InterruptedException {
    while (true) 
        ;
}

If I run this on a Linux machine, it shows 100% CPU usage, but doesn’t cause the OS to appear slow. However, if I run the exact same code on Windows, it only shows about 20% CPU usage.

I am using Oracle JRE on Windows and OpenJDK 6 on Linux.

I’m wondering if Windows’ scheduler preempt threads randomly and Linux’s doesn’t?

  • 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-17T23:58:43+00:00Added an answer on June 17, 2026 at 11:58 pm

    By default, top on Linux runs in so-called IRIX mode, while the Windows Task Manager does not. Let’s say you have 4 cores:

    • With IRIX mode on, 1 fully utilized core is 100% and 4 cores are 400%.

    • With IRIX mode off, 1 fully utilized core is 25% and 4 cores are 100%.

    This means that by default, top on Linux will show an infinite loop as ~100% and Windows will show it as ~25%, and it means exactly the same thing.

    You can toggle IRIX mode while top is running with Shift+i. This will make the numbers match up.

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

Sidebar

Related Questions

public class RunScript { public static void main(String[] args) { System.out.println(Hello World); } }
I've created this simple program in Eclipse: import java.util.*; import java.io.*; public class prob1
I have a question about java syntax. I've found sample program. public class Main
I have created this simple program to learn shared_ptr using namespace std; #define Yes
I have created the simple web service. Code: [ServiceContract] public interface ITsdxService { [OperationContract]
i have created a simple public ref class in the vc++ project, which is
I have started learning Java and am having problem with a simple program that
I have a simple java program that creates a series of temporary files stored
I have a simple program. The main idea is that I have a list
I just created a simple java-me program for my cellphone with Netbeans 7.1 I

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.