{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Harsha Os Assignment Answers

Harsha Os Assignment Answers - Q.1.a Discuss the Role and...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
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.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
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.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern