- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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 |