You are on page 1of 5

Ans11. An operation system is an interface between user and hardware. 2.

Its a software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals 3. This is a system software always running in our computer. 4. Operating system should include web browsers and mail programs but it Should have let the user to choose whether the user want it or not. Those that include web browsers and email programs as default, without the possibility of removing them should not be included in operating system. 5.Web browsers and mail programs will be a security threat to the computer system, information, files and database coming from the internet or the outer source of the computer is an unauthorized to the operating system. 6.The OS has no clue about that, and it will result for the intrusion of the unwanted programs in the system which can damage file on the computer, it can be a reason why OS don't have applications already installed to the system up until now. It's up to the user whether he will install web browsers and mail programs in the system manually without the OS commanding on it.

Ans2Single-user systems should maximize use of the system for the user. A GUI might waste CPU cycles, but it optimizes the users interaction with the system.This depends on the context of efficiency /waste on your computer hardware. We waste energy by using "sleep" or "instant on" modes, for the convenience of users who presumably are paid for the time they speed on the machine. We waste energy by passing a NOP (no-operation) through the processor, but we don't really have a way to power the processor on/off only when all resources and data needed are available. By placing power on the 'rails' and on the USB bus, we are wasting some resources, but this makes the technology of "plug and play" or "hot-swap" possible. If we did not have these technologies, it would take time and effort to install or change devices. We store massive amounts of data on the hard drive, even storing foreign language translators and other fonts that we might never use. However, if the occasion came when a user needed those added language

capabilities - it would take some effort to modify the system in order to accommodate this

Ans 3It will favour i/o bound programs because of relatively short CPU burst request by them,however,the CPU-bound programs will not starve because the i/o bound programs will relinquish the CPU relatively often to do their i/o.

Ans 41. Program execution.


The operating system loads the contents of a file into memory and begins its execution. A user-level program could not be trusted to properly allocate CPU time. The purpose of a computer systems is to allow the user to execute programs. So the operating systems provides an environment where the user can conveniently run programs. The user does not have to worry about the memory allocation or multitasking or anything. These things are taken care of by the operating systems.Running a program involves the allocating and deallocating memory, CPU scheduling in case of multiprocess. These functions cannot be given to the user-level programs. So user-level programs cannot help the user to run programs independently without the help from operating systems.

2. I/O 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. User-level programs cannot be trusted to only access devices they should have access to and to only access them when they are otherwise unused.

3. File-system manipulation.

There are many details in file creation, deletion, allocation, and naming that users should not have to perform. Blocks of disk space are used by files and must be tracked. Deleting a file requires removing the name file information and freeing the allocated blocks. Protections must also be checked to assure proper file access. User programs could neither ensure adherence to protection methods nor be trusted to allocate only free blocks and deallocate blocks on file deletion.

4. Communications.
Message passing between systems requires messages be turned into packets of information, sent to the network controller, transmitted across a communications medium, and reassembled by the destination system. Packet ordering and data correction must take place. Again, user programs might not coordinate access to the network device, or they might receive packets destined for other processes.

5. Error detection.
Error detection occurs at both the hardware and software levels. At the hardware level, all data transfers must be inspected to ensure that data have not been corrupted in transit. All data on media must be checked to be sure they have not changed since they were written to the media. At the software level, media must be checked for data consistency; for instance, do the number of allocated and unallocated blocks of storage match the total number on the device.

CASES WHEN IT IS IMPOSSIBLE FOR USER-

1.Program execution - This service could not be handled by the user


because you need access to the hardware. 2. I/O operations - If there were not interface provided the user could not do this on their own. 3. File-system manipulation - This means the user does not need to worry about accessing and updating the file system table. Such access is best handled by the operating system because of this complexity. 4. Communications - In the case of memory mapping this is extremely beneficial for the OS to handle access and control to memory regions. The user could not in this case access such a system to share the map. 5. Error detection - If there is some error on one of the lower levels the user is notified so that they can take action. if there is no memory left on the heap for instance. The user could not do this because it is simply too much work for the user.

Ans 5A program in Kernel mode can access hardware, but a program in user mode can not because of kernel. Without kernel if user program fails in someway the hardware may traps in OS.Certain instructions could be executed only when the CPU is in kernel mode. Similarly, hardware devices could be accessed only when the program is executing in kernel mode. Control over when interrupts could be enabled or disabled is also possible only when the CPU is in kernel mode. Consequently, the CPU has very limited capability when executing in user mode, thereby enforcing protection of critical resources.

Ans6These operating systems provide different locking mechanisms depending on the application developers needs. Spinlocks are useful for multiprocessor systems where a thread can run in a busy-loop (for a short period of time) rather than incurring the overhead of being put in a sleep queue. Mutexes are useful for locking resources. Solaris 2 uses adaptive mutexes, meaning that the mutex is implemented with a spin lock on multiprocessor machines. Semaphores and condition variables are more appropriate tools for synchronization when a

resource must be held for a long period of time, since spinning is inefcient for a long duration.

You might also like