This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Q.1.a Discuss the Role and main functions of a kernel in real time operating system. Answer: Kernel: it is the most mportant component of the operating system whci serves as an abstraction between the Hardware and the software components of a system. So when ever a new hardware needs to be installes on a system an entry to the kernal should be made. It makes the facilities available to application processes through inter-process communication mechanisms and system calls. There are two different types of Kernals: Monolithic: will try to achieve these goals by executing all the operating system code in the same address space to increase the performance of the system. Microkernel: run most of the operating system services in user space as servers, aiming to improve maintainability and modularity of the operating system. Basic Facilities of Kernel: The basic facilities provided by a kernel are: Process Management: The main task of a kernel is to allow the execution of applications and support them with features such as hardware abstractions. A process defines which memory portions the application can access. Memory Management: The kernel has full access to the system's memory and must allow processes to safely access this memory as they require it. Often the first step in doing this is virtual addressing, usually achieved by paging and/or segmentation. Device Management: To perform useful functions, processes need access to the peripherals connected to the computer, which are controlled by the kernel through device drivers. System Calls: To actually perform useful work, a process must be able to access the services provided by the kernel. This is implemented differently by each kernel, but most provide a C library or an API, which in turn invokes the related kernel functions. Q.1.b Explain thread level programming and critically evaluate its use in achieving high concurrent operation. Answer: Thread: it is an execution context that is independently scheduled but shares a single address space with other threads. Threads play a very important role in achving concurrent operation via Multi Threading. Multi Threading: Multithreading as a widespread programming and execution model allows multiple threads to exist within the context of a single process. This advantage of a multithreaded program allows it to operate faster on computer systems that have multiple CPUs, CPUs with multiple cores or across a cluster of machines because the threads of the program naturally lend themselves to truly concurrent execution. Another advantage of multithreading, even for single-CPU systems, is the ability for an application to remain responsive to input. In a single threaded program, if the main execution threads blocks on a long running task, the entire application can appear to freeze. Operating systems schedule threads in one of two ways: 1. Preemptive multithreading is generally considered the superior approach, as it allows the operating system to determine when a context switch should occur. allows the operating system to determine when a context switch should occur....
View Full Document
This note was uploaded on 02/22/2011 for the course CS 541 taught by Professor Dr.marcosrodrigues during the Spring '09 term at SUNY Buffalo.
- Spring '09