Assign 1 Updated

February 18, 2019 | Author: humairanaz | Category: Operating System, Cpu Cache, Central Processing Unit, Computer Data Storage, Input/Output
Share Embed Donate


Short Description

Published because of non-payment by a client on liveperson...

Description

Assignment 1 Part 1:

1. Define the concepts interrupt and trap, and explain the purpose of an interrupt vector. A trap is a type of pause in the program execution that is caused by an invalid software routine. Traps are considered as exceptions. A programmer who wishes to transfer the contr ol of the processor to another subroutine normally causes them. Interrupts are also pauses in the execution but they are caused by an external hardware event. The most common source of interrupts is an external I/O. I/O devices generate interrupts in the code to announce their presence to the system. When an interrupt is called, an interr upt handler is generated. The interrupt vector is the memory address of that interrupt handler. handler. It helps passing the control of the processor to the operating system for its next assignment. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 8,20,22)

2. How does a computer system with von Neumann architecture execute an instruction? The Von Neumann architecture offers a re latively simpler computer design. In such systems, reading and writing of data to and from the main memory is done on one data bus and fetching instructions for executions on another. Memory addresses are also different. Data and program are in the same memory. The processor consists of an ALU t hat can implement basic functions and operations and a temporary storage that can store not more than a few words of data. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 24,25)

3. What role do device controllers and device drivers play in a computer system? A device controller is the main hardware component of any device that connects to a computer

system. It provides an interface between that device and the operating system of t he computer. The device controller has in-built registers and buffers to store and execute simple instructions that it is programmed to do. A device driver is software that runs the device. The device driver further acts as an interface between the device controller and the operating system of the computer. The device driver is installed on the computer that the device is to be connected to. Through the dr iver, both the user and the system itself can communicate with the device. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 8,29,31,90)

4. Why do clustered systems provide what is considered high-availability service? In a clustered system, several computer c omputer systems are interconnected in a way that they become interoperable. They are known for their high ability service because the connection of computers gives an overall enhancement in the processing power. The computers can be seen as one and their combined power can be used to perform a single task. The power may also be distributed evenly among more users. In high availability clusters, the extra nodes provide the hardware service when a specific hardware component fails, thus eliminating the possibility of having a single point of  failure. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 16-18)

5. Describe an operating system’s two modes of operation. Modern CPUs support at least two modes of operation: protected mode and supervisor mode. The protected mode is very important, as it is the mode in which all applications generally function. The protected mode protects the hardware from direct access through applications. It requires the applications to communicate with the kernel, which in turn communicates with the hardware. In the supervisor mode, the operating system’s sys tem’s kernel is used for low-level operations that need

direct access to hardware. This form of access is necessary for the operating system to interact with different hardware components. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, page 22)

6. Define cache, and explain cache coherency. A cache is a form of memory which temporarily and automatically stores data which a user references. Data calls that are frequently or recently made are stored in the cache. This way, if a user references the same data again, it can be accessed much faster. Coherency between caches is the consistency of data that is stored in the two concerned caches. In multi-processor systems, each core may have its own cache. The data in those caches must be consistent. In coherent caches, if the data is modified in one cache, the other cache copies the same data, thus ensuring consistency. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 27-29)

7. Describe why direct memory access (DMA) is considered an efficient mechanism for performing I/O. In traditional computers; whenever the system’s memory has to be accessed, it is done through t he CPU. Modern computers introduced the concept of direct memory access. As the name suggests, with DMA, I/O devices may directly access the system’s memory, without going through the CPU. DMA is considered efficient as it allows the hardware to access memory even if the CPU is busy or already running a process. This way, the time taken for I/O devices to access the system’s system’s memory is reduced. I/O devices don’t have to wait for the CPU to get free to access system memory. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 563)

8. Describe why multicore processing is more efficient than placing each processor on its own chip. A multicore processor has two or mor e processors working on the same chip as opposed to having

one processor on one chip. The main advantage of m ulticore processors is that although the execution to be carried out o ut is simple, each core can perform its own function independently of the other processor. This way, multiple threads can be run at the same time. This would reduce the overall time taken for program exe cution. Processor usage may become more efficient. Software developers, however, must ensure the proper programming of the code to run on multiprocessor systems. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 204-205)

9. Describe the relationship between an API, the system-call interface, and the operating system. Application Programming Interface is a software interface between external software components i.e. software that is not part of t he operating systems. It is basically a library that includes functions, structures and classes that allow for easy communication between different software. External hardware cannot directly modify the OS. It interacts with the OS through system calls. The system calls in turn interact with the OS. The OS is the last layer between the hardware and applications/users. OS determines how the processor and memory are to be handled by external hardware or I/O. Applications interact with OS through APIs. The OS then modifies or uses the hardware as required. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 56-57)

10. Describe some requirements and goals to consider when designing an operating system. An OS should consider as the utmost priority how t he CPU is used and how system memory is accessed. As different devices such as hardware, software and I/O devices need to use the CPU or to access or modify the main memory, the OS must handle all these requests efficiently. There must be a proper OS algorithm that determines dete rmines how these requests are handled. The OS must efficiently manage memory. It is also a resource allocator. It must allocate computing and memory resources

to different applications and hardware efficiently. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 4-6)

11. Explain why a modular kernel may be the best of the current c urrent operating system design techniques. Normal kernels load everything when a user boots the computer. A modular kernel is divided into modules. The kernel that is needed is called when it is needed. Thus a major advantage is that the time taken to start the computer is decreased as only selective kernels are loaded at boot time. Similarly, while running applications or hardware routines, only the kernels that are required are called and run. As only smaller modules are used, the size of each kernel becomes sm all, thus making it easier to load. New modules can also be easily generated. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 74)

12. Distinguish between virtualization and simulation. Virtualization is faking an action that a real hardware o r software component would provide. In virtual environments, the concerned tools pretend to be real tools, thus fooling the operating system or other hardware involved. The system cannot differe ntiate and is thus unaware of what is happening. Simulation creates an environment where the user can practice or create something in a rather controlled software environment. Simulations are not real; neither do they pretend to be. They are used where controlled practice may be required such as in preparing astronauts for flying shuttles. th

(Operating System Concepts, 8 Edition, by Abraham Silberschatz, pages 7,76-78)

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF