{"id":88534,"date":"2023-10-23T18:00:23","date_gmt":"2023-10-23T12:30:23","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=88534"},"modified":"2023-10-23T18:00:23","modified_gmt":"2023-10-23T12:30:23","slug":"thread-scheduler-in-java","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/","title":{"rendered":"Thread Scheduler in Java"},"content":{"rendered":"<p>In this article, we aim to shed light on the critical role thread scheduling plays in shaping our computing experiences. We&#8217;ll dissect the inner workings of scheduling algorithms, dissecting their strengths and limitations. By unravelling the threads behind thread scheduling, we hope to inspire a deeper appreciation for the complex choreography that allows our devices to execute tasks seamlessly, bringing us one step closer to unravelling the enigmatic heartbeat of modern computing.<\/p>\n<h2>Thread Scheduler<\/h2>\n<p>If more than one thread is waiting for a chance to run, the Thread Scheduler will determine which thread should be executed. The exact algorithm followed by the Thread scheduler will not be determined, as the algorithm followed by each Thread scheduler varies from JVM to JVM. Hence, in multithreading, we can\u2019t guarantee the exact output; every time we run the code, we will get different outputs.<\/p>\n<h3>Algorithms used by the Thread Scheduler:<\/h3>\n<h4>Round-Robin Scheduling:<\/h4>\n<p>In this algorithm, each thread is given a fixed time slice (quantum) to execute. When the time slice expires, the scheduler interrupts the thread and moves it to the back of the queue. The next thread in line gets a chance to run.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Round-Robin-Scheduling.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88769\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Round-Robin-Scheduling.webp\" alt=\"Round Robin Scheduling\" width=\"500\" height=\"468\" \/><\/a><\/p>\n<h4>Priority-Based Scheduling:<\/h4>\n<p>Threads are assigned priority levels, and the scheduler selects the highest-priority thread to execute. This approach can lead to priority inversion, where lower-priority threads block higher-priority ones, impacting overall system performance. To mitigate this, techniques like priority inheritance and priority ceiling protocols are employed.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/priority-scheduling-algorithm.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88770\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/priority-scheduling-algorithm.webp\" alt=\"priority scheduling algorithm\" width=\"500\" height=\"255\" \/><\/a><\/p>\n<h4>Shortest Job Next (SJN) Scheduling:<\/h4>\n<p>Also known as Shortest Job First (SJF) or shortest remaining time scheduling, this algorithm selects the thread with the smallest execution time remaining. SJN aims to minimize average waiting time and turnaround time, but it requires knowledge of thread execution times, which can be challenging to estimate accurately.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Shortest-Job-Next.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88771\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Shortest-Job-Next.webp\" alt=\"Shortest Job Next\" width=\"500\" height=\"266\" \/><\/a><\/p>\n<h4>First-Come, First-Served (FCFS) Scheduling:<\/h4>\n<p>Threads are executed in the order they arrive in the ready queue. While simple to implement, FCFS may lead to the &#8220;convoy effect,&#8221; where a long-running thread prevents shorter tasks from executing, causing inefficiencies.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/fcfs-example.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88772\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/fcfs-example.webp\" alt=\"fcfs example\" width=\"500\" height=\"247\" \/><\/a><\/p>\n<h4>Multilevel Queue Scheduling:<\/h4>\n<p>Threads are divided into multiple queues based on priority, and each queue may have its own scheduling algorithm. This approach provides differentiation between threads of varying importance, such as interactive and background tasks.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/multilevel-queue-scheduling.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88773\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/multilevel-queue-scheduling.webp\" alt=\"multilevel queue scheduling\" width=\"500\" height=\"367\" \/><\/a><\/p>\n<h4>Completely Fair Scheduler (CFS):<\/h4>\n<p>Found in the Linux kernel, CFS allocates CPU time based on the concept of fairness among threads. It attempts to distribute CPU time proportionally among threads, ensuring that each thread gets its fair share over time.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Completely-Fair-Scheduler.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88774\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Completely-Fair-Scheduler.webp\" alt=\"Completely Fair Scheduler\" width=\"500\" height=\"373\" \/><\/a><\/p>\n<h4>Deadline-Based Scheduling:<\/h4>\n<p>Primarily used in real-time systems, this algorithm assigns deadlines to threads and schedules them to meet their respective deadlines. Threads with tighter deadlines are given priority.<\/p>\n<h4>Multicore Scheduling:<\/h4>\n<p>With the advent of multi-core processors, thread scheduling extends to distributing threads across multiple cores. Algorithms focus on load balancing, minimizing contention, and optimizing cache utilization.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/multicore-scheduling.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88775\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/multicore-scheduling.webp\" alt=\"multicore scheduling\" width=\"500\" height=\"378\" \/><\/a><\/p>\n<h4>User-Level Threading Schedulers:<\/h4>\n<p>User-level threading (ULT) schedulers operate at the application level rather than within the operating system kernel. In this approach, the application itself manages its own threads and scheduling, bypassing the kernel&#8217;s thread management. User-level threads provide a level of control and flexibility for application developers, but they also come with trade-offs in terms of efficiency and system interaction.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/User-Level-Threading.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88776\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/User-Level-Threading.webp\" alt=\"User-Level-Threading\" width=\"500\" height=\"531\" \/><\/a><\/p>\n<h4>Time-Sliced Scheduling:<\/h4>\n<p>Time-sliced scheduling, also known as time-sharing or round-robin scheduling, involves dividing CPU time into fixed intervals called time slices or quanta. Each thread is allocated a time slice during which it can execute on the CPU. Once a thread&#8217;s time slice expires, it is preemptively moved out of the CPU, and another thread is given a chance to execute. The preempted thread is placed at the end of the scheduling queue and will receive another time slice when its turn comes up again. Time-sliced scheduling ensures that all threads get a fair share of CPU time, preventing any single thread from monopolizing the CPU for extended periods. This approach is particularly effective for scenarios where responsiveness and fairness are essential, such as interactive multitasking environments.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/time-sliced-scheduling-2.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88787\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/time-sliced-scheduling-2.webp\" alt=\"time sliced scheduling\" width=\"500\" height=\"399\" \/><\/a><\/p>\n<h4>Preemptive Scheduling:<\/h4>\n<p>Preemptive scheduling takes the concept of time slicing further by allowing the scheduler to forcibly interrupt a running thread and switch to another thread. This interruption is known as preemption. In preemptive scheduling, threads can be preempted at any time, even before their time slice expires, based on certain events or priorities. Preemptive scheduling introduces finer control over thread execution and enables the operating system to respond quickly to high-priority tasks or events. It is especially useful in scenarios where real-time responsiveness, priority-based execution, and resource allocation are critical.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Preemptive-Scheduling.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-88778\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/09\/Preemptive-Scheduling.webp\" alt=\"Preemptive Scheduling\" width=\"500\" height=\"419\" \/><\/a><\/p>\n<h3>Working of Thread Scheduler:<\/h3>\n<h4>Thread States:<\/h4>\n<p>Threads typically go through different states during their lifecycle, including &#8220;running,&#8221; &#8220;ready,&#8221; &#8220;blocked,&#8221; and &#8220;terminated.&#8221; The scheduler manages transitions between these states based on thread behaviour and external events.<\/p>\n<h4>Thread Queue Management:<\/h4>\n<p>Threads that are ready to execute but are waiting for CPU time are placed in a queue known as the &#8220;ready queue.&#8221; The scheduler maintains this queue, which holds threads with varying priorities or characteristics.<\/p>\n<h4>Scheduling Criteria:<\/h4>\n<p>The scheduler uses various criteria to make decisions about which thread to run next. These criteria can include thread priorities, execution history, expected CPU burst times, and any special requirements (e.g., real-time constraints).<\/p>\n<h4>Scheduling Algorithms:<\/h4>\n<p>Different scheduling algorithms dictate how threads are selected from the ready queue for execution. Common algorithms include:<\/p>\n<p><strong>1. Round-Robin Scheduling:<\/strong> Threads are given a fixed time slice (quantum) to execute, and they rotate in and out of the CPU in a circular fashion.<\/p>\n<p><strong>2. Priority-Based Scheduling:<\/strong> Threads are assigned priorities, and the scheduler runs the highest-priority thread that is ready to execute.<\/p>\n<p><strong>3. Shortest Job Next (SJN) Scheduling:<\/strong> The thread with the shortest estimated execution time is selected next.<\/p>\n<p><strong>4. Multilevel Queue Scheduling:<\/strong> Threads are divided into priority-based queues, and the scheduler chooses threads from different queues based on their priorities.<\/p>\n<p><strong>5. Preemption: <\/strong>Many modern schedulers use preemption, which allows the scheduler to forcibly interrupt a running thread to give another thread a chance to execute. Preemption is essential for enforcing priority-based scheduling and ensuring that high-priority threads get CPU time when needed.<\/p>\n<h4>Context Switching:<\/h4>\n<p>When the scheduler decides to switch from one thread to another, it performs a context switch. During a context switch, the current thread&#8217;s state is saved, and the state of the next thread to be executed is loaded. This involves updating registers, memory mappings, and other relevant information.<\/p>\n<h4>Interrupt Handling:<\/h4>\n<p>The scheduler interacts with hardware interrupts and timers to handle events such as I\/O completion, timeouts, or hardware interrupts. These events can trigger context switches and affect thread execution.<\/p>\n<h4>Resource Management:<\/h4>\n<p>The scheduler manages various system resources that threads might contend for, such as memory, I\/O devices, and synchronization primitives like locks and semaphores.<\/p>\n<h4>Dynamic Adjustment:<\/h4>\n<p>Some schedulers dynamically adjust priorities or time slices based on factors like thread behavior, past execution history, or system load. This adaptive approach helps optimize performance under varying conditions.<\/p>\n<h4>Real-Time Scheduling:<\/h4>\n<p>In real-time systems, where meeting deadlines is critical, the scheduler ensures that threads with strict timing constraints are given priority to execute within their specified time frames.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public class Main {\n    public static void main(String[] args) {\n    \t\/\/creating thread1\n    \tMyRunnable1 r1=new MyRunnable1();\n    \t\/\/creating thread2\n    \tMyRunnable2 r2=new MyRunnable2();\n    \tThread t1=new Thread(r1);\n    \t\/\/setting the name for the thread1\n        t1.setName(\"TechVidvan-Thread1\");\n    \tt1.start();\n    \tThread t2=new Thread(r2);\n    \t\/\/setting the name for the thread2\n        t2.setName(\"TechVidvan-Thread2\");\n    \tt2.start();\n    }\n}\n\/\/defining the thread1\nclass MyRunnable1 implements Runnable {\n    int i=1;\n    public void run() {\n    \twhile(i&lt;4){\n            System.out.println(Thread.currentThread().getName()+\" \"+i);\n        \ti++;\n    \t}\n    }\n}\n\/\/defining the thread2\nclass MyRunnable2 implements Runnable {\n    int i=1;\n    public void run() {\n    \twhile(i&lt;4){\n            System.out.println(Thread.currentThread().getName()+\" \"+i);\n        \ti++;\n    \t}\n    }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>TechVidvan-<\/strong>Thread1 1<\/p>\n<p><strong>TechVidvan-<\/strong>Thread1 2<\/p>\n<p><strong>TechVidvan-<\/strong>Thread1 3<\/p>\n<p><strong>TechVidvan<\/strong>-Thread2 1<\/p>\n<p><strong>TechVidvan-<\/strong>Thread2 2<\/p>\n<p><strong>TechVidvan-<\/strong>Thread2 3<\/p>\n<p>Two instances of Runnable implementations were created: MyRunnable1 and MyRunnable2. Two thread objects, t1, and t2, are created, each taking the corresponding Runnable as a parameter. The threads are named &#8220;TechVidvan-Thread1&#8221; and &#8220;TechVidvan-Thread2&#8221;, respectively. Both Threads started using the start() method. The MyRunnable1 class implements the Runnable interface. It contains a loop that runs as long as the variable i is less than 4. In each iteration, it prints the name of the current thread (Thread.currentThread().getName()) along with the current value of i. The MyRunnable2 class also implements the Runnable interface and has a similar loop that prints the name of the current thread along with the value of i.<\/p>\n<h3>Conclusion<\/h3>\n<p>In conclusion, the thread scheduler is an essential part of modern operating systems that enables efficient multithreading, concurrency, and resource utilization. Employing various scheduling policies, ensures fairness, responsiveness, and optimal execution of threads, contributing to the overall performance and stability of the system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we aim to shed light on the critical role thread scheduling plays in shaping our computing experiences. We&#8217;ll dissect the inner workings of scheduling algorithms, dissecting their strengths and limitations. By&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":89364,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[296,5203,4330,5204,5205,5206,5207],"class_list":["post-88534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-java","tag-java-thread-scheduler","tag-scheduling-algorithms","tag-scheduling-criteria","tag-thread-scheduler","tag-thread-scheduler-in-java","tag-working-of-thread-scheduler"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Thread Scheduler in Java - TechVidvan<\/title>\n<meta name=\"description\" content=\"The thread scheduler is an essential part of modern operating systems that enables efficient multithreading concurrency.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Thread Scheduler in Java - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"The thread scheduler is an essential part of modern operating systems that enables efficient multithreading concurrency.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-23T12:30:23+00:00\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Thread Scheduler in Java - TechVidvan","description":"The thread scheduler is an essential part of modern operating systems that enables efficient multithreading concurrency.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Thread Scheduler in Java - TechVidvan","og_description":"The thread scheduler is an essential part of modern operating systems that enables efficient multithreading concurrency.","og_url":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2023-10-23T12:30:23+00:00","author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Thread Scheduler in Java","datePublished":"2023-10-23T12:30:23+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/"},"wordCount":1329,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#primaryimage"},"thumbnailUrl":"","keywords":["java","java thread scheduler","Scheduling Algorithms","Scheduling Criteria","thread scheduler","thread scheduler in java","working of thread scheduler"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/","url":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/","name":"Thread Scheduler in Java - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#primaryimage"},"thumbnailUrl":"","datePublished":"2023-10-23T12:30:23+00:00","description":"The thread scheduler is an essential part of modern operating systems that enables efficient multithreading concurrency.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/thread-scheduler-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Thread Scheduler in Java"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/88534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=88534"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/88534\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=88534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=88534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=88534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}