1. What are The Three Important Parts Of Unix Operating System, Explain Them? Answer: UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops. The UNIX operating system is made up of three parts; the kernel, the shell and the utilities (programs).
The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the file store and communications in response to system calls. The kernel handles the following operations: 1. It is responsible for scheduling running of user and other processes. 2. It is responsible for allocating memory.
3. It is responsible for managing the swapping between memory and disk. 4. It is responsible for moving data to and from the peripherals. 5. it receives service requests from the processes and honors them.
The shell is a command programming language that provides an interface to the UNIX operating system. Its features include control-flow primitives, parameter passing, variables and string substitution. Constructs such as while, if then else, case and for are available. Two-way communication is possible between the shell and commands. String-valued parameters, typically file names or flags, may be passed to a command. A return code is set by commands that may be used to determine control-flow, and the standard output from a command may be used as shell input. The shell can modify the environment in which commands run. Input and output can be redirected to files, and processes that communicate through `pipes' can be invoked. Commands are found by searching directories in the file system in a sequence that can be defined by the user. Commands can be read either from the terminal or from a file, which allows command procedures to be stored for later use.
UTILITIES (THE PROGRAMS):
Utilities are commands that, generally, perform a single task. It may be as simple as printing the date and time, or a complex as finding files that match many criteria throughout a directory hierarchy. Commands can be combined through pipelines that connect the standard output of one utility to the standard input of another. Utilities are responsible for: 1. File Management (rm, cat, ls, rmdir, mkdir)
2. User Management (passwd, chmod, chgrp)
3. Process Management (kill, ps)
4. Printing (lp, troff, pr)
5. Program development tools
2. Explain How Files And Processes Are Treated In Unix OS?
Answer: A file is a collection of information in the form of data, an application, or documents. When a file is created, unix assigns the file a unique internal number called inode. Files are treated as byte streams so that they can contain any characters. Security rights are associated with files and directories enabling read, write, execute privileges for owner, group and others. Files may be shared enabling concurrent access. Hardware devices are treated just like files.
The file system is the cornerstone of the UNIX Operating System. It provides a logical method of organizing, retrieving and managing information. The structure of the file system is hierarchical , it might look like an inverted tree. The file system is the basic of the UNIX system, and it can be any one of the three types:
1. An ordinary file is a collection of characters that is treated as a unit by the system. Ordinary files are used to store any information you want to save. They may contain text for letters or reports, code for the programs you write, or commands to run your programs. Once you have created a file, you can add material to it, delete material from it, or remove it entirely when it is no longer needed. 2. A directory is a super file that contains a group of related files. For example, a directory called sales may hold files containing monthly sales figures called Jan , feb, mar and so on. You can create...
Please join StudyMode to read the full document