Unformatted text preview:

Page 1 of 23Page 1 of 23 1 1 111 1 Survey Paper 1 Unix By Sajida Begum Samin F Choudhry 1 Introduction Unix today is a mature operating system and is used heavily in a large variety of scientific engineering and mission critical applications Interest in Unix has grown substantially in recent years because of the proliferation of the Linux a Unix look alike operating system This section briefly describes the history of Unix and the goals of UNIX 1 1 History of Unix Unix operating system found its beginnings in MULTICS Multiplexed Operating and Computing System The MULTICS project began in the mid 1960s as a joint effort by General Electric Massachusetts Institute for Technology and Bell Laboratories In 1969 Bell Laboratories pulled out of the project Ken Thompson was one of Bell Laboratories people who get involved in the project He liked the potential MULTICS had but felt it was too complex and that the same thing could be done in simpler way In 1969 he wrote the first version of Unix called UNICS UNICS stood for Uniplexed Operating and Computing System Although the operating system has changed the name stuck and was finally shortened to Unix Ken Thompson teamed up with Dennis Ritchie who wrote the first C compiler In 1973 they rewrote the Unix kernel in C The following year a version of Unix known as the Fifth Edition was first licensed to universities The Seventh Edition released in 1978 served as a dividing point for two divergent lines of Unix development These two branches are known as SVR4 System V and BSD Ken Thompson spent a year s sabbatical with the University of California at Berkeley While there he and two graduate students Bill Joy and Chuck Haley wrote the first Berkeley version of Unix which was distributed to students This resulted in the source code being worked on and developed by many different people The Berkeley version of Unix is known as BSD Berkeley Software Distribution From BSD came the VI editor C shell virtual memory Send mail and support for TCP IP For several years SVR4 was the more conservative commercial and well supported Today SVR4 and BSD look very much alike Probably the biggest cosmetic difference between them is the way the ps command functions The Linux operating system was developed as a Unix look alike and borrows from both BSD and SVR4 Page 1 of 23 Page 2 of 23Page 2 of 23 Page 2 of 23 2 2 212 2 Page 3 of 23Page 3 of 23 3 3 313 3 1 2 Features of UNIX Un UNIX is an operating system made by programmers to programmers Multitasking capability Multi user capability Portability Easy to understand The open systems philosophy Written in high Level language rather than in Assembly language Universally used for high end number crunching applications Wide use in CAD CAM arena Ideally suited for scientific visualization Preferred OS platform for running Internet services such as WWW DNS DHCP Netnews Mail etc due to networking being in the kernel for a long time now Easy access to the core of the OS the kernel via C C perl etc Stability of the operating environment The availability of a network extensible window system X11 2 Process Management in UNIX 2 1 Basic Concepts about Processes Processes Processes carry out tasks within the operating system A program is a set of machine code instructions and data stored in an executable image on disk and is a passive entity a process can be thought of as a computer program in action Process Components A process contains all of the state for a program in execution An address space The code for the executing program The data for the executing program An executing stack encapsulating the state of procedure calls The program counter PC indicating the next instruction A set of general purpose registers with current value Operating system resources like open file n w connections etc Identifiers Every process in the system has a process identifier It is simply a number Each process also has User and group identifiers these are used to control this processes access to the files and devices in the system States Running The process is either running it is the current process in the system or it is ready to run it is waiting to be assigned to one of the system s CPUs Waiting The process is waiting for an event or for a resource Linux differentiates between two types of waiting process interruptible and uninterruptible Interruptible waiting processes can be interrupted by signals whereas uninterruptible waiting processes are waiting directly on hardware conditions and cannot be interrupted under any circumstances Page 3 of 23 Page 4 of 23Page 4 of 23 4 4 414 4 Stopped The process has been stopped usually by receiving a signal A process that is being debugged can be in a stopped state Zombie This is a halted process which for some reason still has a data structure representing it It is what it sounds like a dead process 2 2 Process Hierarchy in Unix The second process created by the kernel after it loads itself the first being swapper is called init All subsequent processes are created by init For example one of the processes started by init is inetd the Internet super daemon inetd in turn creates many other processes such as telnet on demand In the Unix process hierarchy init is called the parent process and inetd the child of init Any process can have any number of children up to the kernel parameter nproc the maximum allowed number of processes If you kill the parent of a child process it automatically becomes the child of init Each running process has associated with it a process ID or PID in fact as far as the kernel is concerned a process is just a number In addition each process is characterized by its parent s PID or PPID Finally each process runs at a default system priority PRI The numerical range of priority values for different Unix is as follows AIX 0 to 39 IRIX 1 to 20 HP UX 10 x 0 to 39 Linux 20 to 19 Solaris 20 to 20 Tru64Unix formerly Digital UNIX 1 to 19 The smaller the numerical value of the PRI the higher the priority and vice versa so that a process running under Solaris at a priority of 20 has a much lower priority than one running at 20 Unix command renice allows a user to change the priority of a running process 2 3 Creating a Process A process is created by another process Parent is creator and child is created Process user id is inherited After creating a child the parent may either wait for it to finish its task or continue in parallel or both The processes are created using fork int fork Fork


View Full Document
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?