1 / 9

Operating Systems

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.

abra-daniel
Download Presentation

Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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.

  2. •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.

  3. 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.

  4. 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.

  5. 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.

  6. 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

  7. 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.

  8. •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

  9. •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.

More Related