Show
By
A command interpreter is the part of a computer operating system that understands and executes commands that are entered interactively by a human being or from a program. In some operating systems, the command interpreter is called the shell. This was last updated in April 2005 Related TermsFile Allocation Table (FAT)File Allocation Table (FAT) is a file system that Microsoft developed to support small disks and simple folder structures. See complete definition firmwareFirmware is programming that's written to a hardware device's non-volatile memory. See complete definition purple screen of death (PSOD)A purple screen of death (PSOD) is a diagnostic screen with white type on a purple background that's displayed when the VMkernel ... See complete definitionDig Deeper on IT operations and infrastructure management
#Chapter 2# Q 2.1: What is the purpose of system calls? Answer: A system call is a program that request a service from kernel of operating system. This may include services like accessing hard disk, executing and creating new processes and defines communication with kernel services like scheduling. These calls provide an interface between operating systems and a process. Purpose of system calls are given as follows: Basic Purpose: Calls provide basic functionality to users to operate the operating system. Process Control: Systems call loads, execute and create processes and terminate when the user's task is finished with the process. File Management: It provides file management such as creating a file, deleting it, open, close, and save it. It also provides read, write and reposition functionalities Device
Management: All hard disk are managed by system calls such as requesting for a device, releasing the device, reading and writing the device Information Maintenance: System calls help in making information maintenance such as get/set time or date, get/set data of system, processes, files or attributes of device. Communication between processes: Systems calls are use for Communication purpose as they help in creating and deleting communications, sending or receiving messages. They help in attaching or detaching remote devices and in transfer or status information. Q 2.2: What are the five major activities of an operating system with regard to process management? Answer: Five activities of operating system with regard to the process management are given as follows:
It helps in protecting the processes from deadlocks. It helps in providing mechanisms for communication between processes. It provides synchronization for multiple processes. It provides resumption and suspension of processes. It creates and deletes processes of both user processes and system processes. Q 2.3: What are the three major activities of an operating system with regard to memory management?
The three major activities of an operating system in connection with regard to memory management are:
Q 2.4: What are the three major activities of an operating system with regard to secondary-storage management?
Q 2.5: What is the purpose of the command interpreter? Why is it usually separate from the kernel?
Q 2.6: What system calls have to be executed by a command interpreter or shell in order to start a new process?
Q 2.7: What is the purpose of system programs?
**Q 2.8: ** What is the main advantage of the layered approach to system design? What are the disadvantages of the layered approach?
Q 2.9: List five services provided by an operating system, and explain how each creates convenience for users. In which cases would it be impossible for user-level programs to provide these services? Explain your answer. Answer: Five services provided by the operated system are given as follows: 1. `Program execution` 2. `I/O operations` 3. `File-system manipulation` 4. `Communications` 5. `Error detection` Program Exection: * `It allows the user to execute programs by providing convenient environment for development and execution of programs.` * `A user level program cannot properly allocate CPU time.` I/O Operations: * `Every program may require some input/output such as a file or an I/O device.` * `The operating system provides an environment to handle I/O operations.` * `A user level program cannot control the I/O devices directly. For some I/O devices, special functions are necessary.` File-system manipulation: * `All task related to files such as creating a file, deleting a file, reading a file, writing to a file, etc. are handle by the operating system.` * `A user need not to know the details of secondary storage system. All a user can see is that his task is accomplished.` * `User made programs cannot be made to allocate free blocks when available and deallocate the blocks after deletion.` Communications: * `There are times when a process needs to communicate with other process. All this is taken care by operating system.` * `Communication takes place in the form of data packets and they need access to the network device but user level programs cannot provide that.` Q 2.15: What are the five major activities of an operating system with regard to file management? Answer:
Q 2.18: What are the two models of interprocess communication? What are the strengths and weaknesses of the two approaches? **Answer:** * Message - passing model: * `In this, the communicating processes exchange messages with one another to transfer information. Messages can be exchanged between the processes either directly or indirectly through a common mail box. Message passing is useful for exchanging smaller amounts of data, because no conflicts need to be avoided. It is also easier to implement than is shared memory for inter computer communication. But the main advantage is it can handle only small amounts of data.` * Shared - Memory mode: * `In this, processes use shared memory creates and shared memory attaches system calls to create and gain access to regions of memory owned by other processes. Two or more processes can exchange information by reading and writing data in the shared areas. Shared memory allows maximum speed and convenience of communication, since it can be done at memory speeds when it takes place within a computer. Problem exist, however, in the areas of protection and synchronization between the processes sharing memory.` Q 2.19: Why is the separation of mechanism and policy desirable?
Q 2.21: 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?
Q 2.22: What are the advantages of using loadable kernel modules? Answer:
What is the purpose of a command interpreter?A command interpreter is the part of a computer operating system that understands and executes commands that are entered interactively by a human being or from a program. In some operating systems, the command interpreter is called the shell.
What system calls have to be executed by a command interpreter or shell in order to start a new process on UNIX system?Q 5) What system calls have to be executed by a command interpreter or shell in order to start a new process? Ans: In UNIX systems, a fork system call followed by an exec system call need to be performed to start a new process.
Would it be possible for the user to develop a new command interpreter using the system call interface provided by the operating system explain your answer?Yes, it is possible to develop a new command interpreter using the system-call interface on those OS's where the interpreter is not tightly integrated into the system (i.e., most operating systems other than Windows.) The Unix family of operating systems provides multiple command-line interpreters (sh, bash, csh, etc.)
What is the purpose of kernel layer?It is the core that provides basic services for all other parts of the OS. It is the main layer between the OS and underlying computer hardware, and it helps with tasks such as process and memory management, file systems, device control and networking.
|