Sign Up

Talk Programming , Career, Mental Health, Talk Personal Finance ❤️‍ Post a query and receive responses ✅

Have an account? Sign In


Have an account? Sign In Now

Sign In

Post a query and receive responses. Ask anything, Ask Mitra ❤️‍

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

Sorry, you do not have permission to ask a question, 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

Ask Mitra

Ask Mitra Logo Ask Mitra Logo

Ask Mitra Navigation

  • Home
  • About Us
  • Find Jobs
  • Blogs
    • Add New Blog !
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Ask a Question
  • Home
  • All Categories
  • Find Jobs
  • Points and Swags
    • Badges and Points
    • Ask Mitra Swags
  • Blog
    • Add New Blog !
  • FAQs
  • Community Members 💓
  • About Us
  • Contact Us
Home| Questions|Q 76465
Next
In Process
Prakash_Bhatt
Prakash_Bhatt
Asked: August 21, 20222022-08-21T09:44:56+05:45 2022-08-21T09:44:56+05:45In: —Java

How does multithreading take place on a computer with a single CPU ?

How does multithreading take place on a computer with a single CPU ?
multithreaded programming
  • 0
  • 3 3 Answers
  • 47 Views
  • 0 Followers
  • 0
Share
  • Facebook

    Related Questions

    • how can i join class i am stuck here .. what i do after login
    • How do i start Programming with Java. please suggestion me best video source.
    • What is wrong with the following program code:
    • I need resources to learn java(not tutorials)
    • How to Implement action listener or event handling in JMenu.

    You must login to add an answer.


    Forgot Password?

    Need An Account, Sign Up Here

    3 Answers

    • Voted
    • Oldest
    • Recent
    • Random
    1. Virtual Wiz Tech Nerd Love to Code | Just a Tech Enthusiast
      2022-08-21T10:25:10+05:45Added an answer on August 21, 2022 at 10:25 am

      you can do multithreading on a single processor system.

      In multi-processor system , multiple threads execute , simultaneously on different cores. Eg- If there are two threads and two cores , then each thread would run on individual core.

      In a single-processor system, multiple threads execute , one after the other or wait until one thread finishes or is preempted by the OS , depending on the thread priority and the OS policy.But the running threads , gives an illusion that they run simultaneous , relative to the required application response time of the User space application.

      Time Comparison(Example):

      if two threads take 10us each to execute, then on a 2 processor system , the net time take is 10us

      if two threads take 10us each to execute, then on a 1 processor system , the net time take is 20us

      • 2
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. Hailkot Beginner
      2022-08-21T10:49:22+05:45Added an answer on August 21, 2022 at 10:49 am
      This answer was edited.

      The microprocessors back in the 2000s could execute only one thread per core now they have expanded to two.

      The threading is said to execute multiple programs at a time. But on the hardware level, there is only one data bus, only one address bus, one memory controller, and the CPU executes only one instruction at a time. The CPU may take a lot of time executing an instruction and holds it during processing and acquiring the next instruction. This switching process is too fast and it seems as running parallel. But it’s not.(PCs at our homes or Vonn Neumann Architecture).

      Multithreading shares the same physical location. The threads seem like a process but are different as processes might not share the same physical location.

      Multithreading codes are inefficient, hard to manage, and prone to deadlocks and data races. It is better if anyone could avoid multi-threaded patterns for single-threaded ones.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    3. Yujan Ranjitkar Explainer Hey you! Yes you, Let’s build something awesome together.
      2022-08-21T15:02:10+05:45Added an answer on August 21, 2022 at 3:02 pm

      The operating system’s task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially.

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

    Sidebar

    Ask A Question

    Your Favourite Topics

    • Announcements
    • Blockchain
    • Books

        • —Non Tech Books
        • —technical books
    • Business and Entrepreneurship
    • Careers
    • College
    • Content and Blog
    • CyberSecurity
    • Design and Arts
    • Devices and Gadgets
    • Digital Marketing
    • Entertainment

        • —Movies-Series-TV
        • —Music
        • —Sports
    • Events
    • For Admins only.
    • Health

        • —Fitness
    • Money

        • —Personal Finance
        • —Stock Market
    • Operating System

        • —linux
        • —windows
    • Other
    • Paid Internship
    • Programming

        • —AI/ML
        • —APIs
        • —C & C#
        • —Django
        • —Flutter
        • —Go
        • —HTML&CSS
        • —Java
        • —JavaScript
        • —Mobile Apps Development
        • —Node Js
        • —NoSQL
        • —Php
        • —Python
        • —React JS
        • —SQL

    Stats

    • Questions 1k
    • Answers 10k
    • Best Answers 391
    • Users 2k

    Top 6 Members This Month

    Vicky

    Vicky

    • 0 Questions
    • 78 Points
    Sensei
    puppet

    puppet

    • 0 Questions
    • 23 Points
    Beginner
    wtfixair

    wtfixair

    • 0 Questions
    • 22 Points
    Beginner
    Dhanmaya

    Dhanmaya

    • 0 Questions
    • 20 Points
    Beginner
    Riyesh

    Riyesh

    • 0 Questions
    • 20 Points
    Beginner
    pranitkarki

    pranitkarki

    • 0 Questions
    • 20 Points
    Beginner

    Trending Tags

    askmitra blockchain c++ career coding College cybersecurity Django Flutter help javascript laptop laravel linux poll Programming python question react web web development wordpress
    • Popular
    • Answers
    • Rounak Agrawal

      Ask Mitra Udemy Courses Giveaway

      • 76 Answers
    • Subedi Bibek

      The Complete JavaScript Course 2022: From Zero to Expert! Udemy ...

      • 73 Answers
    • Subedi Bibek

      Mega Giveaway at askmitra.com 🔥

      • 69 Answers
    • bishwaKiran
      bishwaKiran added an answer Try getting into githubs student program, use your university/collage/school ID… January 30, 2023 at 7:44 pm
    • Sandeep Poudel
      Sandeep Poudel added an answer SOLVED: It was due to unfinished SSL certificate installation January 27, 2023 at 7:11 pm
    • Aashutosh_k
      Aashutosh_k added an answer Software piracy protection system Fingerprint voting system Stock price prediction… January 26, 2023 at 7:37 pm

    Related Questions

    • how can i join class i am stuck here .. ...

      • 6 Answers
    • How do i start Programming with Java. please suggestion me ...

      • 4 Answers
    • What is wrong with the following program code:

      • 3 Answers
    • I need resources to learn java(not tutorials)

      • 2 Answers
    • How to Implement action listener or event handling in JMenu.

      • 2 Answers

    Explore

    • Home
    • Trending Category
      • Programming
      • Web Development
      • —Mobile Apps Development
      • —Stock Market
      • Business and Entrepreneurship
      • Blockchain
      • College
      • —Personal Finance
      • —HTML&CSS
      • —JavaScript
      • —Python
      • —React JS
      • —Node Js
      • —C & C#
      • Content and Blog
      • Careers
    • All Categories
      • Go to All Categories
      • Health
      • —Go
      • —Flutter
      • Digital Marketing
      • —APIs
      • Devices and Gadgets
    • Find Job and Internships
    • Points and Swags
      • Badges and Points
      • Ask Mitra Swags
    • All Blogs
      • Add New Blog !
    • FAQs
    • Community Members 💓
    • Questions
      • Un Answered
      • New Questions
      • Most Seen Questions
      • Most Answered
      • Trending Questions
    • Tags

    Footer

    Ask Mitra

    Ask Mitra

    Ask Mitra is a social question and answer engine that will assist you in forming a community and connecting with others. Talk about programming, your career, your mental health, and your personal finances. ❤️‍ Post a query and receive responses ✅

    Quick Navigation

    • Ask a Question
    • Home
    • All Categories
    • Find Jobs
    • Points and Swags
      • Badges and Points
      • Ask Mitra Swags
    • Blog
      • Add New Blog !
    • FAQs
    • Community Members 💓
    • About Us
    • Contact Us

    Legal Stuff

    • Terms of use and policy