Operating Systems •The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
IT Systems Operating System EN230-1 Justin Champion C208 –
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Figure 1.1 Interaction between applications and the operating system.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Operating System Organization
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Operating Systems The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Operating Systems Process Management.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
CENG334 Introduction to Operating Systems 1 Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
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.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Introduction to Operating Systems Concepts
Computer System Structures
Input/Output (I/O) Important OS function – control I/O
Computer System Structures
Introduction to Computing Systems
OPERATING SYSTEM CONCEPT AND PRACTISE
Chapter Objectives In this chapter, you will learn:
Processes and threads.
Operating System Review
Interrupts and signals
Process Management Process Concept Why only the global variables?
CS 6560: Operating Systems Design
Advanced OS Concepts (For OCR)
Operating Systems (CS 340 D)
OPERATING SYSTEMS CS3502 Fall 2017
Chapter 4 Threads.
Operating System Structure
Introduction to Operating System (OS)
KERNEL ARCHITECTURE.
Operating Systems (CS 340 D)
Operating System Review
CSCI 315 Operating Systems Design
Threads, SMP, and Microkernels
Chapter 2: System Structures
Processor Fundamentals
Memory Management Tasks
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Process Description and Control
Lecture Topics: 11/1 General Operating System Concepts Processes
Process Description and Control
Lecture 4- Threads, SMP, and Microkernels
Process Description and Control
Multithreaded Programming
Process Description and Control
Process Description and Control
PROCESSES & THREADS ADINA-CLAUDIA STOICA.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Operating System Introduction.
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Operating Systems •The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that occurs in the system. •The kernel is the first part of the operating system to load into the main memory (DRAM) during booting, and it remains in the memory for the entire duration of the computer session. •The kernel is usually loaded into a protected area of memory, which prevents it from being overwritten by other programs. •The kernel performs its tasks (e.g. executing processes and handling interrupts) in kernel space, whereas everything a user normally does is done in user space. •the processor usually provides two modes of execution to separate normal user modes from the special supervisor privileges e.g. when a process executes a system call, the execution mode of the process changes from user mode to kernel mode. •When a computer crashes, it actually means the kernel has crashed.

•The kernel provides basic services for all other parts of the operating system, typically including memory management, process management, file management and I/O (input/output) management (i.e., accessing the peripheral devices). •A typical kernel contains: Memory management:Allocates the system's address spaces among all users of the kernel's services. Timers: Kernel timers. System Calls: System calls interface. Interrupts and Exceptions: Interrupts and exceptions handling. Processes: Process management. Scheduling: Process scheduling. I/O: Low level•The kernel should not be confused with the BIOS(Basic Input/Output System) which is an independent program stored in a chip on the motherboard that is used during the booting (i.e., startup) process for such tasks as initializing the hardware and loading the kernel into memory (RAM). Whereas the BIOS always remains in the computer and is specific to its particular hardware the kernel is different for every operating system or version.

Kernels can be classified into three broad categories: monolithic kernels microkernels􀂾 Hybrid kernels Monolithic kernels, which have traditionally been used by Unix and Linux, contain all the operating system core functions and the device drivers.

A microkernel usually provides only minimal services, such as defining memory address spaces, interprocess communication (IPC) and process management. All other functions, such as hardware management, are implemented as processes running independently of the kernel. Hybrid kernels are similar to microkernels, except that they include additional code in kernel space so that such code can run more swiftly than it would were it in user space. These kernels represent a compromise.

The Monolithic Versus Micro Controversy •With a monolithic kernel an error in the kernel can cause the entire system to crash. •With a microkernel, if a kernel process crashes, it is still possible to prevent a crash of the system as a whole by merely restarting the service that caused the error. •However, operating systems with monolithic kernels such as Linux have become extremely stable and can run for years without crashing. •Another disadvantage cited for monolithic kernels is that they are not portable; that is, they must be rewritten for each new architecture that the operating system is to be ported to. However, in practice, this has not appeared to be a major disadvantage, and it has not stopped Linux from being ported to numerous processors. •Monolithic kernels also appear to have the disadvantage that their source code can become extremely large.

However, the advocates of monolithic kernels claim that in spite of their size such kernels are easier to design correctly •The size of the compiled kernel is only a tiny fraction of that of the source code. •Contributing to the small size of the Linux kernel is its ability to dynamically load modules at runtime. Linux kernel can be made extremely small not only because of its ability to dynamically load modules but also because of its ease of customisation–e.g. embedded linux. •Although microkernels are very small by themselves, in combination with all their required auxiliary code they are, in fact, often larger than monolithic kernels. •There are extremely few widely used operating systems today that utilise microkernels--mainly just AIX and QNX

Shells •The shell is the outermost part of the operating system. It is the part that interacts with the user. •In modern operating systems most users interact with the operating system through a Graphical User Interface(GUI) •The basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread, depending on the operating system. •A process is a program which is running i.e. the operating system has assigned the process memory it can use, a stack, priority, status etc. •There are also numerous processes that run without giving you direct evidence that they ever exist. For example, Windows XP and UNIX can have dozens of background processes running to handle the network, memory management, disk management, etc. •The operating system allows the application to begin running, suspending the execution only long enough to deal with interrupts and user input. •Interrupts are special signals sent by hardware or software to the CPU. •Some interrupts are masked--that is, the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible.

•Some interrupts are so important that they can't be ignored •Some interrupts are so important that they can't be ignored. These non-maskable interrupts(NMIs) must be dealt with immediately, regardless of the other tasks at hand. •Multi-tasking allows several processes to be active at one time by switching between them, using timer interrupts. •All of the information needed to keep track of a process when switching is kept in a data package called a process control block. The process control block(PCB) typically contains: ..An ID number that identifies the process ..Pointers to the locations in the program and its data where processing last occurred ..Register contents ..States of various flags and switches ..Pointers to the upper and lower bounds of the memory required for the process ..A list of files opened by the process ..The priority of the process ..The status of all I/O devices needed bythe process

•Processes that are running often require an input from the user and whilst waiting is stopped –this state is known as blocked or suspended. •Problems can occur if the user tries to have too many processes functioning at the same time. The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers, queues and stacks of the application processes. •When too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes –thrashing. •One way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks. •Some operating systems allow for a "process-lite," called a thread, that can deal with all the CPU-intensive work of a normal process, but generally does not deal with the various types of I/O and does not establish structures requiring the extensive process control block of a regular process.