Das – Chapter 1
A computer needs an operating system (OS) to allocate memory,
schedule programs, and control devices. The UNIX system also provides
a host of applications for the use of programmers and users.
Multiprogramming systems like UNIX allow multiple programs to
reside in memory. Even though a program may run for the duration of
the time slice allocated for it, it may prematurely leave the CPU
during a blocking operation (like reading a file) that keeps the CPU
idle.
You enter a UNIX system by entering a user-id and a password. You
can terminate a session by using the exit or logout command or
pressing [Ctrl-d].
UNIX commands are generally in lowercase. date displays the system
date and time. who displays the list of users logged on to the system.
ps lists all processes running at a terminal. It always shows the
shell process running.
You can display a tile with cat, copy it with cp, rename it with
mv, and remove it with rm.
mkdir creates a directory, pwd displays the pathname of the
current directory, and cd changes the current directory.
rmdir removes an empty directory.
UNIX was developed at AT&T Bell Laboratories by Ken Thompson and Dennis Ritchie. It was finally written in C. Notable work was also done at Berkeley. AT&T introduced System V Release 4 (SVR4) to merge their own version, Berkeley, and other
variants.
Linux is a UNIX implementation that is constantly growing with contributions
from the Free Software Foundation (formerly, GNU).
Modifications to the system made by vendors led to both enhancement and
fragmentation of UNIX. Two merged standards, POSIX and the
Single UNIX Specification, are today used as guidance for development work on UNIX,
All work is shared by the kernel and shell. The
kernel manages the hardware, and the shell interacts with the user.
The shell and applications communicate with the kernel using system
calls, which are special routines built into the kernel.
The file and process are the two basic entities that support the UNIX system.
UNIX considers everything as a file. A process represents a program
(a file) in execution.
UNIX is a multiuser and multitasking system. Several
users can use the system together, and a single user can also run
multiple jobs concurrently.
UNIX uses a building-block approach in the design of some of its tools and lets
you develop complex command routines by connecting these tools.
The UNIX man command is the primary online help facility available.
- The ________ interacts with the hardware, and the _____________ interacts with the user.
- A program is synonymous with a process. True or false?
- Every character has a number associated with it. What is it called?
- If you see a prompt like mailhost login:, what do you think mailhost represents?
- If the system echoes Login incorrect, does it mean that your user-id is incorrect?
- Name the commands you used in this chapter to display (i) filenames,
(ii) processes, (iii) users.
- Run ps and note the PID of your shell. Log out and log in again, and run ps
again. What do you observe?
- Create two files, foo1 and foo2, with the echo command, and then use cat foo1 foo2.
What do you observe?
- Now run the command cat foo [12], and note your observations.
- Enter the command echo SHELL. What mistake did you make?
- Create a file foo containing the words hello dolly. Now create a directory bar,
and then run mv foo bar. What do you observe when you run both 1s and 1s bar?
- Who are the principal architects ofthe UNIX operating system?
- Why did AT&T virtually give away UNIX to the world?
- Where did BSD UNIX originate? Name some features of UNIX that were first
found in BSD UNIX.
- Which flavor of UNIX is available for free and runs on the PC?
- Identify the companies associated with the following brands: (i) Solaris, (ii) AIX,
(iii) Tru64 UNIX.
- What does X/OPEN represent? Who owns the UNIX trademark today?
- Who are the two brains behind Linux?
- What is the distinctive characteristic about the GNU General Public License?
- Why is UNIX more portable than other operating systems?
- Can you divide UNIX into two major schools? To which school does Sun's
UNIX belong?
- Why do UNIX tools perform simple jobs rather than complex ones?
- What is the windowing system of UNIX known as?
- Name some interpretive languages available on UNIX systems.
- Name three notable Linux flavors.
- Operating systems like UNIX provide services both for programs
and users. Explain.
- What does a program do when it needs to read a file?
- Does a program always complete its time quantum before it makes way for
another program?
- Explain the significance of the terms multiprogramming,
multiuser, and multitasking.
- Why are UNIX commands noninteractive, and why is their output not usually
preceded by header information?
- What are system calls, and what role do they play in the system? How is C
programming so different and powerful in the UNIX environment compared to
Windows?
- Two UNIX systems may use the same system calls. True or false?
- Name the three commands that you would try in sequence to log yourself out of
the system. Which one of them will always work?
- Run the following commands, and then invoke ls. What do you conclude?
echo > README[enter]
echo > readme[enter]
- Enter the following commands, and note your observations:
(i) who and tty, (ii) tput clear, (iii)
id, (iv) ps and echo $$.
- When you log in, a program starts executing at your terminal. What is this program
known as? Name four types of this program that are available on a
system.
- What is the significance of your user-id? Where in the system
is the name used?
- What are the two schools of UNIX that initially guided its
development? Mention the outcome of the standardization efforts that
are currently in force today.
- Create a directory, and change to that directory. Next, create
another directory in the new directory, and then change to that
directory too. Now, run cd without any arguments followed by
pwd. What do you conclude?
- Why is the shell called a command interpreter?
- What is the one thing that is common to directories, devices, terminals, and
printers?
Maintained by John Loomis,
last updated 17 January 2010