KERNEL ARCHITECTURE.

Slides:



Advertisements
Similar presentations
Chapter 3 Process Description and Control
Advertisements

Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Introduction to Kernel
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Process Management. External View of the OS Hardware fork() CreateProcess() CreateThread() close() CloseHandle() sleep() semctl() signal() SetWaitableTimer()
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Chapter 11 Operating Systems
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Process Description and Control A process is sometimes called a task, it is a program in execution.
OS Organization. OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Concurrency Thread abstraction of.
Operating System Organization
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Kernel, processes and threads Windows and Linux. Windows Architecture Operating system design Modified microkernel Layered Components HAL Interacts with.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Threads G.Anuradha (Reference : William Stallings)
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Processes Introduction to Operating Systems: Module 3.
UNIX Unit 1- Architecture of Unix - By Pratima.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
What is a Process ? A program in execution.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Overview of today’s lecture Major components of an operating system Structure and internal architecture of an operating system Monolithic Vs Micro-kernels.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Introduction to Operating Systems Concepts
Computer System Structures
Introduction to Kernel
Kernel Design & Implementation
Processes and threads.
Chapter 3: Process Concept
Operating Systems •The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that.
Chapter 9: Virtual Memory
Process Management Presented By Aditya Gupta Assistant Professor
Operating System Structure
Chapter 3: Windows7 Part 2.
Lecture 2: Processes Part 1
Threads, SMP, and Microkernels
Threads and Data Sharing
Recap OS manages and arbitrates resources
Chapter 2: The Linux System Part 2
Chapter 2: System Structures
Chapter 3: Windows7 Part 2.
Mid Term review CSC345.
Multithreaded Programming
Chapter 2: Operating-System Structures
Introduction to Operating Systems
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Operating Systems: A Modern Perspective, Chapter 3
Operating System Introduction.
Chapter 2: Operating-System Structures
Operating Systems Structure
Structure of Processes
Mr. M. D. Jamadar Assistant Professor
Presentation transcript:

KERNEL ARCHITECTURE

Contents What is Kernel ? Kernel Architecture Overview User Space Kernel Space Kernel Functional Overview File System Process Management Memory Management

What is Kernel ? A kernel is a central component of an operating system that acts as an interface between the user applications and the hardware. The aim of the kernel is to manage the communication between the software (user level applications) and the hardware (CPU, disk memory etc).

What is Kernel ? The main tasks of the kernel are : Process management Device management Memory management Interrupt handling I/O communication File system. System call control

Types of Kernels Monolithic kernel Micro kernel (Modular kernel) Hybrid kernel Nano kernel Exo kernel

Monolithic Kernel All operating system services run along the main kernel thread in a monolithic kernel, which also resides in the same memory area, thereby providing powerful and rich hardware access.

Micro Kernel Define a simple abstraction over hardware that use primitives or system calls to implement minimum OS services such as multitasking, memory management and interprocess communication.

Hybrid Kernel Run a few services in the kernel space to reduce the performance overhead of traditional microkernels where the kernel code is still run as a server in the user space.

Nano Kernel Simplify the memory requirement by delegating services, including the basic ones like interrupt controllers or timers to device drivers.

Exo Kernel Allocate physical hardware resources such as processor time and disk block to other programs, which can link to library operating systems that use the kernel to simulate operating system abstractions

Kernel Architecture Overview User Space Kernel Space

User Space The User Space is the space in memory where user processes run. This Space is protected. The system prevents one process from interfering with another process. Only Kernel processes can access a user process

Kernel Space The kernel Space is the space in memory where kernel processes run. The user has access to it only through the system call.

System Call User Space and Kernel Space are in different spaces. When a System Call is executed, the arguments to the call are passed from User Space to Kernel Space. A user process becomes a kernel process when it executes a system call.

User Space and Kernel Space Relationship

Kernel Functional Overview File System Process Management Memory Management

Kernel Functional Overview

Functional & Architectural Layer

File System It is responsible for storing information on disk and retrieving and updating this information. The File System is accessed through system calls such as : open, read, write, …

File System Structure Boot Block : information needs to boot the system Super Block : File System Specifications  Size  Max. number of files  Free blocks  Free inodes Inode List Block List : The files data

Inode The inode represents all the information needed by the kernel to manipulate a file Each file has an inode structure that is identified by an i-number. It doesn’t contain file name.

Virtual File System It manages all the different file system. It is an abstraction layer between the application program and the file system implementations. It describes the system’s file in term of superblocks and inodes

Process Management The Unix OS is a time-sharing system. Every process is scheduled to run for a period of time (time slice). Kernel creates, manages and deletes the processes

Process Management (Cont.) Every process (except init) in the system is create as the result of a fork system call. The fork system call splits a process into two processes (Parent and Child). Each process has a unique identifier (Process ID).

Type of Processes Create(new) Terminated When a process is first created, it occupies the "created" or "new" state. In this state, the process awaits admission to the "ready" state. Ready and Waiting A "ready" or "waiting" process has been loaded into main memory and is awaiting execution on a CPU Running A process moves into the running state when it is chosen for execution. Terminated A process may be terminated, either from the "running" state by completing its execution or by explicitly being killed.

Memory Management Physical memory is actually present in the machine and limited. Virtual memory is makes the system appear to have more memory than it actually has by sharing it between competing processes as they need it.

Virtual memory Large Address space Protection Memory mapping Fair physical memory allocation Shared virtual memory

Virtual memory Large Address Spaces The operating system makes the system appear as if it has a larger amount of memory than it actually has. The virtual memory can be many times larger than the physical memory in the system.

Virtual memory Protection Each process in the system has its own virtual address space. These virtual address spaces are completely separate from each other and so a process running one application cannot affect another. Also, the hardware virtual memory mechanisms allow areas of memory to be protected against writing. This protects code and data from being overwritten by rogue applications.

Virtual memory Memory Mapping Memory mapping is used to map image and data files into a processes address space. In memory mapping, the contents of a file are linked directly into the virtual address space of a process.

Virtual memory Fair Physical Memory Allocation The memory management subsystem allows each running process in the system a fair share of the physical memory of the system,

Virtual memory Shared Virtual Memory Although virtual memory allows processes to have separate (virtual) address spaces, there are times when you need processes to share memory. For example there could be several processes in the system running the bash command shell. Rather than have several copies of bash, one in each processes virtual address space, it is better to have only one copy in physical memory and all of the processes running bash share it. Dynamic libraries are another common example of executing code shared between several processes.

Physical and Virtual memory

Hazırlayan: Nilden ÜNVER 10070006007