This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Chapter 1, Question 1.7: How does the distinction between kernel mode and user mode function as a rudimentary form of protection system?
Ans: The dual mode of operation provides us with the means for protecting the operating system from errant users and errant users from one another. This protection can be accomplished by designating some of the machine instructions that may cause harm as privileged instructions. The hardware allows privileged instructions to be executed only in kernel mode. If an attempt is made to execute a privileged instruction in user mode, the hardware does not execute the instruction but rather treats it as illegal and traps it to the OS. In this way distinction between the modes helps as a rudimentary form of protection system.
Chapter 1, Question 1.11: Timers could be used to compute the current time. Provide a short description of how this could be accomplished.
Ans: A timer can be set to interrupt the computer after a specified period. The period may be fixed or variable. A variable timer is generally implemented by a fixed rate clock and a counter. The operating system sets the counter. Every time the clock ticks, the counter is decremented. When the counter reached 0, an interrupt occurs.
Chapter 2, Question 2.1: What is the purpose of system calls?
Ans: System Calls provide an interface to the services available by an operating system. These calls are generally available as routines in C and C++, although certain low level tasks may need to be written using assembly level language instructions.
Chapter 2, Question 2.5: What is the purpose of the command interpreter?
Ans: There are several ways for users to interface with the operating system. One of them is providing a command-line interface, or COMMAND INTERPRETER, that allows users to directly enter commands that are to be performed by the operating system. The main function of the command interpreter is to get and execute the next user-specified command.
Chapter 2, Question 2.9: List five services provided by an operating syste, 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.
Ans: One set of OS services provides functions that are helpful to the user.
User interface: Almost all operating system have a user interface. The interface can take several forms. One is command line interface that uses text commands and a method for entering them. Another is batch interface, in which commands and directives to control those commands are entered into files are executed. Most commonly GUI is used.
Program execution: The system must be able to load the program into memory and to run that program. The program must be able to end its execution, either normally or abnormally.
I/O operations: A running program may require I/O which may involve a file or an I/O device. For specific devices special functions may be desired.
Communications: There are many instances in which one process needs to exchange information with other process. Such communication may be between process executing on same computer or may be on different computer systems tied together by a network. Communiation may ba implemented via shared memory or through message passing.
Error Detection: The operating system needs to be constantly aware of possible errors. Errors may occur in CPU hardware, in I/O devices and in user program. Debugging facilities can greatly enhance the user's and programmer's abilities to use the system efficiently.
Another set of operating system functions exits which are not meant to help the user but to ensure efficient operation of the system. Systems with multiple users can gain efficiency by sharing computer resources among the users. Some examples are:
Resource allocation: when there are multiple users or multiple jobs running at the same time resources must be allocated to each of them. Many different resources are managed by OS.
Accounting: We want to keep track of which users use how much and what kind of computer resources.
Protection and Security: Protection involves ensuring that all access to system resource is controlled. Security of system from outsiders is also important. Such security starts with requiring each user to authenticate their system usually by means of password, to gain access to system resources.
What happens if step #2 is skipped? What does the sudo su command do?
Ans: sudo command has extra security built in for administration task so if we skip that command we can't get the administrative rights. Sudo su command allows a permitted user to execute a command as a super user.
What is -u switch do for fdisk?
Ans: While listing the partition tables it gives the sizes in sectors instead of cylinders.
What is difference between the mkfs.vfat ad mkfs.ext2 commands? what do -n and -L switches do respectively?
Ans: mkfs.vfat: to create an MS-DOS file system under Linux device.
mkfs.ext2: to create ext2 file system.
-n (volume-name): Sets the volume name of the file system. The volume name can be upto 11 characters long. The default is no label.
-L (new volume-label): Set the volume label for the file system to new-volume-label. Maximum length of volume label is 16 bytes.
What does apt-get command do?
Ans: The apt-get command downloads and installs a designated package from on online repository.
Command for following command line tasks?
Define root directory- The top most directory is called root directory and is denoted by /.
Change directory to root folder- 'cd .../mydir' goes to the parent and then into directory mydir.
Changes a directory to a folder in your current directory- "cd d" enter to subdirectory d.
List files in current directory- "ls"
Delete a file in current directory- "rm"