OS Ch 2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Describe how you could obtain a statistical profile of the amount of time a program spends executing different sections of its code. Discuss the importance of obtaining such a statistical profile.

A programmer could issue periodic timer interrupts and monitor what instructions or what sections of code are currently executing when the interrupts are delivered. A statistical profile of which pieces of code are active should be consistent with the time spent by the program in different sections of its code. Once such a statistical profile has been obtained, the programmer can optimize those sections of code that are consuming more of the CPU resources.

Would it be possible for the user to develop a new command interpreter using the system call interface provided by the operating system?

A user should be able to develop a new command interpreter using the system-call interface provided by the operating system. The command interpreter allows a user to create and manage processes and also determine how they communicate (such as through pipes and files). As all of this functionality could be accessed by a user-level program using the system calls, it should be possible for the user to develop a new command-line interpreter.

Contrast and compare an application programming interface (API) and an application binary interface (ABI).

An API is used by application programmers to ensure that they invoke system calls and other functions properly. An ABI exists at the architecture level, and it ensures that a binary executable file can interact with a given operating system running on a specific architecture.

What is the main advantage of the microkernel approach to system design? How do user programs and system services interact in a microkernel architecture? What are the disadvantages of using the microkernel approach?

Benefits typically include the following: (a) adding a new service does not require modifying the kernel, (b) it is more secure, as more operations are done in user mode than in kernel mode, and (c) a simpler kernel design and functionality typically results in a more reliable operating system. User programs and system services interact in a microkernel architecture by using interprocess communication mechanisms such as messaging. These messages are conveyed by the operating system. The primary disadvantages of the microkernel architecture are the overheads associated with interprocess communication and the need to frequently use the operating system's messaging functions to enable the user process and the system service to interact with each other.

What are the advantages of using loadable kernel modules?

It is difficult to predict what features an operating system will need when it is being designed. The advantage of using loadable kernel modules is that functionality can be added to and removed from the kernel while it is running. There is no need to either recompile or reboot the kernel.

Why is the separation of mechanism and policy desirable?

Mechanism and policy must be separate to ensure that systems are easy to modify. No two system installations are the same, so each installation may want to tune the operating system to suit its needs. With mechanism and policy separate, the policy can be changed at will while the mechanism stays unchanged. This arrangement provides a more flexible system.

How are iOS and Android similar? How are they different?

Similarities: • Both are based on existing kernels (Linux and macOS). • Both have architecture that uses software stacks. • Both provide frameworks for developers. Differences: • iOS is closed source, and Android is open source. • iOS applications are developed in Objective-C, and Android in Java. • Android uses a virtual machine, and iOS executes code natively.


Kaugnay na mga set ng pag-aaral

11 Countries of Southeast Asia capital Cities

View Set

Economics practice problems chapter 5

View Set

Assignment: 11. Quiz 2: Organizing Data Unit: 2. DATA ANALYSIS

View Set

Unit 6 General Provisions Assignment

View Set

Business and Society BULW 1370 Chapter 15

View Set

Macroeconomics - FTC1(ch11-18) - additional textbook questions for review

View Set

American Red Cross Basic Life Support

View Set