

{"id":100287,"date":"2021-08-24T09:00:14","date_gmt":"2021-08-24T03:30:14","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=100287"},"modified":"2021-08-22T23:18:32","modified_gmt":"2021-08-22T17:48:32","slug":"kernel-in-operating-system","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/","title":{"rendered":"Kernel in Operating System"},"content":{"rendered":"<p>The core component of the OS is known as a kernel. Kernel helps the OS manage the operations of the computer system and hardware, basically the memory and CPU time. It uses inter-process communication and system calls to act as a bridge between applications and data processing performed at hardware level.<\/p>\n<p>It is the first program to load after the bootloader as it needs to handle the rest of the system for the OS. When an OS loads, the Kernel also loads into the memory and remains there until the OS is shut down again.<\/p>\n<p>It handles disk management, task management, and memory management and decides which process to allocate to the CPU for execution. It also manages communication between the software and hardware<\/p>\n<h3>Functions of a Kernel<\/h3>\n<p>Following are the functions of Kernel:<\/p>\n<p><strong>1. Access Computer resource:<\/strong> A Kernel can access the CPU, I\/O devices and other resources and acts as a interpreter between the user and the system resources.<\/p>\n<p><strong>2. Resource Management:<\/strong> A Kernel shares resources between processes such that every process has uniform access to the resources.<\/p>\n<p><strong>3. Memory Management:<\/strong> The kernel allocates and deallocates memory for process execution.<\/p>\n<p><strong>4. Device Management:<\/strong> Kernel manages the allocation of peripheral devices.<\/p>\n<h3>Kernel Mode and User Mode<\/h3>\n<p>Some instructions can only be executed by Kernel and in the Kernel Mode. As for the User Mode, the processes provided by the user are executed by the processor in the User Space.<\/p>\n<h3>Objectives of Kernel in OS<\/h3>\n<ul>\n<li>Establishes communication between software and hardware.<\/li>\n<li>Decides the state of incoming processes.<\/li>\n<li>Disk management.<\/li>\n<li>Memory management.<\/li>\n<li>Task management.<\/li>\n<\/ul>\n<h3>Types of Kernel<\/h3>\n<p>Following are the five types of kernel:<\/p>\n<h4>1. Monolithic Kernel:<\/h4>\n<p>In this, all OS services operate in the kernel space i.e., user services and kernel services are implemented in the same memory space. This increases the size of Kernel and OS makes the execution of a process faster. There are dependencies between system components. It has huge lines of code that make it complex.<\/p>\n<p><strong>Advantages of Monolithic kernel<\/strong>:<\/p>\n<ul>\n<li>Good performance.<\/li>\n<li>Provides CPU scheduling, memory scheduling, and file management only through System calls.<\/li>\n<\/ul>\n<p><strong>Disadvantages of Monolithic Kernel<\/strong>:<\/p>\n<ul>\n<li>Dependencies between system components and lines of code are in millions.<\/li>\n<li>Failure of a service leads to the failure of the entire system.<\/li>\n<li>The OS needs to be modified if there is addition of a new service.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/Monolithic-Kernel.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-100352\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/Monolithic-Kernel.jpg\" alt=\"Monolithic Kernel\" width=\"276\" height=\"326\" \/><\/a><\/p>\n<h4>2. Micro Kernel:<\/h4>\n<p>This type has a minimalist approach along with virtual memory and thread scheduling. It is stable, has less services in the kernel space and puts rest in user space. This means that it makes use of both the kernel space and user. This reduces the size of the Kernel and OS. Communication is done through message parsing and that reduces the speed of execution.<\/p>\n<p><strong>Advantages of Micro Kernel<\/strong>:<\/p>\n<ul>\n<li>More stable.<\/li>\n<li>New services can be easily added.<\/li>\n<\/ul>\n<p><strong>Disadvantages of Micro Kernel<\/strong>:<\/p>\n<ul>\n<li>Huge amounts of system calls and context switches.<\/li>\n<li>Communication reduces overall execution time.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/Micro-Kernel.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-100353\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/Micro-Kernel.jpg\" alt=\"Micro Kernel\" width=\"510\" height=\"314\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/Micro-Kernel.jpg 510w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/Micro-Kernel-320x197.jpg 320w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<h4>3. Hybrid Kernel:<\/h4>\n<p>With the speed and design of a monolithic kernel and the modularity and stability of a microkernel, this type is a combination of monolithic and micro kernel. Some services like network stack and file systems are run in Kernel space in order to reduce performance overhead. Though, it runs kernel code as servers in the user-space.<\/p>\n<p><strong>Advantages of Hybrid kernel:<\/strong><\/p>\n<ul>\n<li>Combination of monolithic and micro kernel.<\/li>\n<\/ul>\n<p><strong>Disadvantages of Hybrid kernel<\/strong>:<\/p>\n<ul>\n<li>Similar to monolithic kernel.<\/li>\n<\/ul>\n<h4>4. Exo Kernel:<\/h4>\n<p>This kernel follows an end-to-end principle with least hardware abstractions. It handles the allocation of physical resources to applications. Separation of resource protection from management allows us to perform application-specific customization.<\/p>\n<p><strong>Advantages of Exo Kernel<\/strong>:<\/p>\n<ul>\n<li>Least hardware abstractions.<\/li>\n<\/ul>\n<p><strong>Disadvantages of Exo Kernel<\/strong>:<\/p>\n<ul>\n<li>More work for application developers.<\/li>\n<li>Has a complex design.<\/li>\n<\/ul>\n<h4>5. Nano Kernel:<\/h4>\n<p>This type offers hardware abstraction without system services. Due to micro kernels also not having system services, these two have become analogous to each other. The code of the kernel is very small and the Kernel supports nanosecond clock resolution.<\/p>\n<p><strong>Advantages of nano Kernel<\/strong>:<\/p>\n<ul>\n<li>Offers hardware abstractions without system services.<\/li>\n<\/ul>\n<p><strong>Disadvantages of Nano Kernel<\/strong>:<\/p>\n<ul>\n<li>It is used less due to being similar to micro kernels.<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<p>Kernel is the main and central component of an OS. It has five types, namely, monolithic kernel, microkernel, hybrid kernel, nano kernel, and exo kernel. The functions of a kernel include accessing computer resources, memory management, device management, and resource management.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The core component of the OS is known as a kernel. Kernel helps the OS manage the operations of the computer system and hardware, basically the memory and CPU time. It uses inter-process communication&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":100350,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24565],"tags":[24969,24968],"class_list":["post-100287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-operating-system-tutorials","tag-kernel-in-operating-system","tag-kernel-in-os"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Kernel in Operating System - DataFlair<\/title>\n<meta name=\"description\" content=\"Kernel is the main and central component of an Operating System. See the functions, uses and types of Kernel like nano. exo, monolithic, etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kernel in Operating System - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Kernel is the main and central component of an Operating System. See the functions, uses and types of Kernel like nano. exo, monolithic, etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-24T03:30:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/OS-KERNEL.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kernel in Operating System - DataFlair","description":"Kernel is the main and central component of an Operating System. See the functions, uses and types of Kernel like nano. exo, monolithic, etc.","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:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/","og_locale":"en_US","og_type":"article","og_title":"Kernel in Operating System - DataFlair","og_description":"Kernel is the main and central component of an Operating System. See the functions, uses and types of Kernel like nano. exo, monolithic, etc.","og_url":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-08-24T03:30:14+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/OS-KERNEL.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Kernel in Operating System","datePublished":"2021-08-24T03:30:14+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/"},"wordCount":723,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/OS-KERNEL.jpg","keywords":["Kernel in Operating System","Kernel in OS"],"articleSection":["Operating System Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/","url":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/","name":"Kernel in Operating System - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/OS-KERNEL.jpg","datePublished":"2021-08-24T03:30:14+00:00","description":"Kernel is the main and central component of an Operating System. See the functions, uses and types of Kernel like nano. exo, monolithic, etc.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/OS-KERNEL.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/08\/OS-KERNEL.jpg","width":1200,"height":628,"caption":"OS KERNEL"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/kernel-in-operating-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Operating System Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/operating-system-tutorials\/"},{"@type":"ListItem","position":3,"name":"Kernel in Operating System"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=100287"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100287\/revisions"}],"predecessor-version":[{"id":100354,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100287\/revisions\/100354"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/100350"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=100287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=100287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=100287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}