CS -UNIX INTERNALS. PART B. UNIT 1. 1. Explain briefly details about History of UNIX operating system? In , Bell Telephone Laboratories joined. CS/CS/CS/ CSE 22 Unix Internals Notes Regulation | BE Computer Science and Engineering. Department of Computer science and. Class lecture notes for third Year,sixth semester UNIX Internals (Subject Code: CS) is available here in PDF formats for you to download.

Author: Mijora Tezragore
Country: Nepal
Language: English (Spanish)
Genre: Software
Published (Last): 10 February 2004
Pages: 279
PDF File Size: 18.98 Mb
ePub File Size: 15.20 Mb
ISBN: 160-5-72625-947-2
Downloads: 88166
Price: Free* [*Free Regsitration Required]
Uploader: Goltisida

We use cookies to give you the best experience possible. Course Branch Year Semester: Computer Science and Engineering: Introduction to the kernel?

CS UNIX Internals: Notes

Architecture of the UNIX operating system? Introduction to system concepts? Kernel data structures — System administration? Structure of the buffer pool?

DMI College of Engineering

Advantages and disadvantages of the buffer cache? Internal representation of files? Structure of a regular file? Conversion of a path name to an inode?


File and record locking? Creation of special files? Dup — Mounting and unmounting file systems. Layout of system memory? The context of a process? Saving the context of a process? Invoking other programs — The shell? System boot and the INIT process.


A hybrid system with swapping and demand paging? Driver interfaces — Disk drivers? Operating System Services 5.

Assumptions about Hardware 6. Introduction to the Kernel 7. Architecture of the Unix Operating System 8. Introduction to System Concepts 9. Kernel Data Structures Summary and Preview 1. History — Bell Telephone Laboratories was involved in a project with General Electric and the Massachusetts Institute of Technology to develop a multiuser operating system called Multics.

To supply ample computation power and data storage? To all users to share data easily. To improve the programming environment, Ken Thompson and Dennis Ritchie of Bell Labs sketched a paper design of a file cs208 — early version of Unix file system.

Thompson and Ritchie with Brain Kernighan member of Internsls Service Research Center implemented their system design on PDP-7, including the early version of Unix interjals system, the process subsystem and a small set of utility programs.

While providing a text processing system for the patent department at Bell labs, the Unix system was moved to a PDP in A disk of Kbytes, and?

A limit of 64 Kbytes per file. Thompson set out to implement unic Fortran compiler for the new system, but instead came up with the language B, influenced by BCPL. So, Ritchie developed it into a language C, allowing generation of machine code, declaration of data types and definition of data structures.

Inthe OS was rewritten in C. Bythe number of Unix system sites had grown to about The Unix systems became popular in the operating telephone companies, providing a good environment for program development, network transaction operations services, and real-time services. Unix systems runs on machines with a wide range of computing power from internaps to mainframes and on machines across different manufactures internxls. Several reasons have been suggested for the popularity and success of the Unix systems: It uses convenient format for files, the byte stream, making application programs easier to write.


System Structure The hardware at the centre of the diagram provides the operating system with basic services. The OS interacts directly with the hardware, providing common services to programs. Viewing the system as a set of layers, the OS is commonly called as the system kernel, or kernel, emphasizing its isolation from user programs. Programs such as the shell and editors ed and vi shown in the outer layers interact with the kernel by invoking a well-defined set of system calls.

The system calls instructs the kernel to do various operations for the calling program and exchange data between the kernel and the program.

Several systems are in standard system configurations are known as commands. Other application programs can build on top of lower-level programs, hence the existence of the outer-most layer. There are about 64 system calls in system V but only fewer interbals 32 are used frequently. The kernel provides the services upon which all application programs in the Unix system rely and it defines those services.

Consistent treatment of file data,? The ability to create and delete files,? Dynamic growth of files,? The protection of file data,? The treatment of peripheral devices such as terminals, tape units as files. Every non-leaf node of the file system structure is a directory of files and, files at the leaf node of the tree are either directories, regular files, or special device files. The name of a file is given by a path name that describes how to locate the file in the file system hierarchy.

The path name is a sequence of component names separated by slash characters. Full path name starts with a slash character and specifies a file that can be found by starting at the file system root and traversing the file tree, following the branches that lead to successive component names of the path name. The syntax of accessing the data in a file is defined by the system and is identical for all programs but the semantic of the data are imposed by the program.

Internalls programs use the same system services to access the data in the file as a byte stream and internally, they parse the stream into a suitable format.

The system intternals the data in a directory as a byte stream but the data contains the names of the files in the directory in a predictable format so that the OS and programs such as ls can discover the files in a directory.

Directories are like regular files. Permission to access a file is controlled by access permissions associated with the file. Access permissions can be set independently to control integnals, write and execute permission for three classes of users: User may create files if directory access permission allow it.

To the user, the Unix system treats devices as files. Special device files occupy node positions in the file system directory structure. Program access devices with same syntax they use when accessing regular files.


Devices are protected by proper setting of their file access permissions. Processing Environment o A program is an executable file, and a process is an instance of the program in execution. Various system calls allow process to create new processes, ingernals processes, synchronize stages of process execution, and control reaction to various events. The shell interprets the first word of a command line as a command name, the shell forks and the child process execs the command associated with the name, treating the remaining words on the command line as parameters to the command.

First, a command can be an executable file that contains object code produced by compilation of source code C program.

Second, a command can be an executable file that contains a sequence of shell command lines. Third, a command can be internal shell command instead of exe file. Internal commands make the shell a programming language in addition to a command interpreter and includes commands for looping, commands for conditional execution, a case statement command, a command to change the current directory of a process cd.

The shell syntax allows for pattern matching and parameter processing. The shell searches for commands in a given sequence of directories, changeable by user request per invocation of the shell. The shell usually executes a command either: This asynchronous execution is done in background. While who executes, the shell waits for it to finish and then prompts the user for another command.

The system executes the command who in the background and the shell is ready to accept another command immediately. Every process executing in the Unix system has an execution environment that include a current directory.

Current directory of a process is the start directory used for all path names that do not begin with the slash character. The user may execute the shell command, cd to move around the file system tree and change the current directory. Shell is a user program and not part of the kernel, so it is easy to modify it and tailor it to a particular environment.

The system can execute various shell simultaneously. Users have the capability to execute many processes simultaneously, and processes can create other processes dynamically and synchronize their execution. The Unix system provides OS primitives — these primitives enable users to write small, modular programs that can be used as building blocks to built more complex programs. Processes conventionally have access to three files: They read from their std.

Pipe is a mechanism that allows a stream of data to be passed between reader and writer processes. The processes can redirect their std. The data that the first processes write into the pipe is the input for the second processes.