Unformatted text preview:

Page 1 of 23Page 1 of 23 - 1 - - 1 -- 1 -111Survey Paper # 1UnixBy Sajida BegumSamin F Choudhry1. IntroductionUnix 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 UnixUnix operating system found its beginnings in MULTICS (Multiplexed Operatingand Computing System). The MULTICS project began in the mid 1960s as a joint effortby General Electric, Massachusetts Institute for Technology and Bell Laboratories. In1969 Bell Laboratories pulled out of the project.Ken Thompson was one of Bell Laboratories people who get involved in theproject. He liked the potential MULTICS had, but felt it was too complex and that thesame 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. Althoughthe operating system has changed, the name stuck and was finally shortened to Unix. KenThompson teamed up with Dennis Ritchie, who wrote the first C compiler. In 1973 theyrewrote the Unix kernel in C. The following year a version of Unix known, as the FifthEdition was first licensed to universities. The Seventh Edition, released in 1978, served asa dividing point for two divergent lines of Unix development. These two branches areknown as SVR4 (System V) and BSD. Ken Thompson spent a year's sabbatical with theUniversity of California at Berkeley. While there he and two graduate students, Bill Joyand Chuck Haley, wrote the first Berkeley version of Unix, which was distributed tostudents. This resulted in the source code being worked on and developed by manydifferent people. The Berkeley version of Unix is known as BSD, Berkeley SoftwareDistribution. From BSD came the VI editor, C shell, virtual memory, Send mail, andsupport for TCP/IP. For several years SVR4 was the more conservative, commercial, andwell supported. Today SVR4 and BSD look very much alike. Probably the biggestcosmetic 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 23Page 2 of 23Page 2 of 23 - 2 - - 2 -- 2 -212Page 2 of 23Page 3 of 23Page 3 of 23 - 3 - - 3 -- 3 -3131.2. Features of UNIX: UnUNIX 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 UNIX2.1 Basic Concepts about ProcessesProcesses: Processes carry out tasks within the operating system. A program is a set ofmachine code instructions and data stored in an executable image on disk and is a passiveentity; 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 processesaccess 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 isready 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 differentiatesbetween two types of waiting process; interruptible and uninterruptible. Interruptiblewaiting processes can be interrupted by signals whereas uninterruptible waiting processesare waiting directly on hardware conditions and cannot be interrupted under anycircumstances. Page 3 of 23Page 4 of 23Page 4 of 23 - 4 - - 4 -- 4 -414Stopped: The process has been stopped, usually by receiving a signal. A process that isbeing debugged can be in a stopped state. Zombie: This is a halted process, which, for some reason, still has a data structurerepresenting it. It is what it sounds like, a dead process. 2.2.Process Hierarchy in UnixThe second process created by the kernel after it loads itself (the first beingswapper) is called init. All subsequent processes are created by init. For example, one ofthe processes started by init is inetd, the Internet super daemon. (inetd, in turn, createsmany other processes, such as telnet, on demand.) In the Unix process hierarchy, init iscalled the parent process and inetd the child of init. Any process can have any number ofchildren (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 asthe kernel is concerned, a process is just a number). In addition, each process ischaracterized by its parent's PID or PPID. Finally, each process runs at a default systempriority, PRI. The numerical range of priority values for different Unix is as follows. AIX: 0 to 39IRIX: 1 to 20HP-UX 10.x: 0 to 39Linux: -20 to 19Solaris: -20 to 20Tru64Unix (formerly Digital UNIX): 1 to 19The 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


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 2 2 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?