Operating Systems

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What are the two main categories that divide the services and functions provided by OS?

1. Enforcing protection between different processes running concurrently in the system by allowing them to only access memory in their address space, and not allowing them to corrupt files of other users. 2. Provide new functionality that is not supported directly by the underlying hardware, such as virtual memory and file systems.

What are the three major activities of an OS with regard to secondary storage management?

1. Free-space management 2. Storage allocation 3. Disk scheduling

What are the three major activities of an OS with regard to memory management?

1. Keep track of which parts of memory are currently being used and by whom 2. Decide which processes are to be loaded into memory when memory space becomes available 3. Allocate and deallocate memory space as needed

What are the two models of interprocess communication?

1. Message-passing: useful for smaller data, easier to implement. 2. Shared-memory: maximum speed and convenience, compromises on protection and synchronization

3 general methods for passing parameters to the operating system

1. Pass parameters in registers 2. Registers pass starting addresses of blocks of parameters 3. Parameters are pushed onto the stack by the program and popped off by the OS

List five services provided by an OS and explain how each creates convenience for users.

1. Program execution: the operation loads the contents of a file into memory and begins its execution. 2. I/0 Operations: The user need only specify the device and the operation to perform on it, while the system converts that request into device or controller specific commands. 3. File-system manipulation: The OS takes care of all of the details in file creation, addressing, and protection. 4. Communications: The OS takes care of message passing, packet ordering, and data correction. 5. Error detection: Occurs at both the hardware and software levels

What are the five major activities of an OS with regard to process management?

1. The creation and deletion of both user and system processes 2. The suspension and resumption of processes 3. The provision of mechanisms for process synchronization 4. The provision of mechanisms for process communication 5. The provision of mechanisms for deadlock handling

What are the five major activities of an operating system in regard to file management?

1. The creation and deletion of files 2. The creation and deletion of directories 3. The support of primitives for manipulating files and directories 4. The mapping of files onto secondary storage 5. The backup of files on nonvolatile storage media

What are the three main purposes of an operating system?

1. To provide an environment for the user to execute programs on hardware 2. To allocate the separate resources as needed to solve the problem 3. As a control program to supervise execution of user programs and manage I/O devices

How are network computers different from traditional personal computers?

A network computer relies on a centralized computer for most of its services, so it requires a minimal OS. A personal computer needs to provide all of the required functionality for itself.

What is the main advantage of the microkernel approach to system design?

Adding a new service does not require modifying the kernel, operations are done in user than kernel mode making it more secure, a simpler design and functionality making it more reliable. User programs and system services interact using messaging.

What are the advantages and disadvantages of using the same system-call interface for manipulating both files and devices?

Advantages: each device can be accessed as though it was a file in the file system, it is easy to add a new device driver benefitting the development of user program and device driver code through well defined ease of access. Disadvantages: loss of functionality or performance

Advantages and disadvantages of multiprocessor systems

Advantages: save money, execute programs quicker, increased reliability Disadvantages: more complex

What are the differences between a trap and an interrupt?

An interrupt is a hardware-generated change of flow within the system. A handler is summoned to deal with the cause of the interrupt and the control is returned to the program. A trap is a software-generated interrupt.

Why are caches useful? What problems do they solve? What problems do they cause?

Caches are useful when 2+ components need to exchange data and they perform transfers at differing speeds. They solve the transfer problem by providing a buffer of intermediate speed between components. They cause problems when they need to be altered to accommodate a data value change of a component, as the entire cache needs to be updated and other things are accessing the datum within the cache.

How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system?

Certain permissions to making changes, accessing devices, and executing instructions can only be accessed in kernel mode

Client-server vs. peer-to-peer models of distributed systems

Client-server: client requests services that are provided by the server. Peer-to-peer: services are requested and provided by peers.

How do clustered systems differ from multiprocessor systems?

Clustered systems combine multiple computers into a single system to perform a computational task distributed across the cluster; communication through messages. Multiprocessor systems could be a single physical entity comprising of multiple CPUs; communication through shared memory.

Disadvantages of open-source OS

Features are difficult to compete with, no paid support programs for accountability, lack of discipline

What are the advantages of using loadable kernel modules?

Functionality can be added to and removed from the kernel while it is running.

What are the disadvantages of using the layered approach?

Information is kept only where it is needed and accessible only within a defined area, so bugs must be limited to a certain area as well or debugging becomes difficult.

What is the purpose of the command interpreter? Why is it usually separate from the kernel?

It reads commands and executes them by turning them into one or more system calls. It is not part of the kernel since it is subject to changes and the kernel processes should be kept mostly constant.

What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?

Keeping the OS within the fixed time constraints of a real time system. If a task is not completed on time, it may cause the entire system to break down.

What are some of the challenges of designing OS for mobile devices compared with designing OS for traditional PCS?

Less storage capacity, power, and processing power.

Advantages of open-source OS

Many people working, many people debugging, ease of access and distribution, and rapid update cycles.

Why is the separation of mechanism and policy desirable?

Mechanism and policy must be separate to ensure that systems are easy to modify. Enabling one to be changed without altering the other.

What are possible uses of multiple CPU modes?

Multiple modes increase security and allow for more allocation of access. Certain groups of users can access and modify certain data. It can also be a bridge so that certain actions do not need to be executed only in kernel mode.

Ordinary pipes vs named pipes

Ordinary: simple communication Named: when several processes need to make communications

Describe the actions taken by a kernel to context-switch between processes

Saves current context. Preserves the address space. Suspends the current process. Restores context of new process.

Which of the following instructions should be privileged? a. Set value of timer b. Read the clock c. Clear memory d. Issue a trap instruction e. Turn off interrupts f. Modify entries in device-status table g. Switch from user to kernel mode h. Access I/O device

Set value of timer, clear memory, turn off interrupts, modify entries in device-status table, access I/O device

Describe the differences among short-term, medium-term, and long-term scheduling

Short-term (CPU scheduler): selects ready to execute jobs from memory and allocates CPU to them. Medium-term: swaps between partially run programs. Long-term (job scheduler): determines which jobs are brought into memory for processing Primary difference is the frequency of their execution

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

Similarities: based on existing kernels, have architecture that uses software stacks, provide frameworks for developers. Differences: iOS is closed-source, Android is open-source; iOS is Objective-C, Android is Java; iOS is natively coded, Android uses a virtual machine

When is it appropriate for the OS to "waste" resources? Why is such a system not really wasteful?

Single-user systems should maximize use of the system for the user. This optimizes the user's interaction with the system.

What are problems in a multiprogramming and time-sharing environment?

Stealing/copying programs or data; hogging of system resources

Symmetric vs asymmetric multiprocessing

Symmetric: all processes are equal Asymmetric: One master CPU and the remainder CPUs are slave which have tasks distributed amongst them

What is the purpose of system calls?

System calls allow user-level processes to request services of the operating system.

What difficulties could arise with placing the OS in a memory partition that cannot be modified by either the user job or the OS itself?

The data required by the OS would have to be stored or passed through unprotected memory and accessible to unauthorized users.

Explain the role of the init process on UNIX and Linux systems in regards to the process termination.

The init process calls wait() which releases the pid and entry in the process table of the zombie process

How can timers be used to compute the current time?

The program can set a timer for a time in the future and when it is interrupted it can update its local state to the time that was set for the interrupt. This process is repeated to keep track of time.

When a process creates a new process using the fork() operation, which state is shared between the parent process and the child process?

The shared memory segment.

What is the main advantage of the layered approach to system design?

The system is easier to debug and modify because changes affect only limited sections of the system rather than touching all sections of the OS

What is the purpose of system programs?

They provide basic functionality to users so that they do no need to write their own programs to solve common problems

Under what circumstances would a user be better off using a time-sharing system rather than a PC or a single-user workstation?

When there are few other users, the task is large, and the hardware is fast.

Should the OS include applications such as Web browsers and mail programs?

Yes: Having the application embedded within the OS will increase its performance due to access of features in the kernel. No: It is an application, not an OS process; security vulnerability; bloated OS

What system calls have to be executed by a command interpreter or shell in order to start a new process?

fork(): clones the currently executing process exec(): overlays a new process


संबंधित स्टडी सेट्स

Anthropology Short Answer Questions

View Set

Simulation Lab 11.1: Module 11 Harden PC with Group Policy Editor

View Set

ECO-102; Ch:14 Oligopoly Study Guide

View Set