- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between green and native thread
Green threads are created and scheduled by Virtual machine without using OS libraries.
“Green” was the project code name of the thread project which was developed by the Java, therefore the name of the thread is “Green”. It can not make use of multiprocessor.
On the other hand, Native threads are created and scheduled by Kernel of operating system. It can swap between threads from running thread to non-running thread. All modern OS supports native thread.
Sr. No. | Key | Green Thread | Native Thread |
---|---|---|---|
1 | Basic | Green threads are created and scheduled by Virtual machine without using OS libraries | Native threads are created and scheduled by Kernel of operating system |
2 | Platform Dependent | It is platform dependent | It is platform independent |
3 | Multiprocessor | It can run only on one CPU | It can run on distinct CPUs |
4. | Scheduling | It can’t adjust scheduling among all the threads | It can adjust scheduling among all the threads |
- Related Articles
- Difference between Process and Thread
- Difference between Fixed thread pool and cached thread pool.
- Difference between Thread and Runnable in Java
- Difference between Goroutine and Thread in Golang.
- What is the difference between java method and native method?
- What is difference between a Java method and native method
- Difference between scheduledThread pool and Single Thread Executor.
- Difference Between Thread Class and Runnable Interface in Java
- What is the difference between a Java method and a native method?
- Difference between Open SQL, Native SQL in SAP HANA
- Comparison between different React Native UI libraries
- What are the differences between yarn and thread?
- What's the difference between a context switch, a process switch and a thread switch in Linux?
- Difference Between & and &&
- Difference between Voltage Drop and Potential Difference
