Computer Concept & Programming In C - Unit I - 3

Q.5 (i) Differentiate between DOS, UNIX and Windows operating system.
(ii) Explain the following UNIX command.
ls, chmod, sh, su, who.                                                                             (AKTU. 2009-10)
Ans. DOS or (Disk Operating System): -
·  It is a system software that provides an interface between the computer hardware and the computer user.
·  DOS makes the computer alive. Without the DOS the computer is a dead machinn, it cannot be used for any purpose. The most commonly used DOS with the PC is the MS-DOS, developed by the microsoft corporation.
·  It is operating system prepared for carrying single user and provide character user interface.
·  DOS acts as an interpreter or we can say it acts as an interface between the hardware and the software.
·  DOS creates back-up file. It also controls operations of hardware like CPU and memory.
·  It allocates memory to programs.
·  It creates new files, deletes old files and can also rename them.
·  It formats the new disk so that they can be made usable.
Some Basic Commands in DOS :
1. VER - The ver command display the current DOS version.
2. TIME - The time command can be used to change and display the system time.
3. DATE - The date command can be used to view and change the system date.
4. CLS - This command is executed and clears the screen and places the prompt at the top left corner of the screen.
5. HELP - This command gives the description of all other DOS commands along with their syntax.
UNIX Operating System :
UNIX operating system was designed by ken Thompson and Denis. M. Ritchie at AT & T lab.
Design Goals Of UNIX :
·  Support for software development.
·  Operating system as well as all software developed for it should be portable from one machine to another.
Memory Management of UNIX :
·  Today UNIX is available for multi user environment.
·  It uses demand paging as memory management technique. In demand paging when a part of the program (page) is required only then it is loaded into the main memory else it resides on the harddisk.
·  UNIX facilitates multiprogramming.
Processor Management of UNIX :
·  UNIX operating system uses CPU scheduling algorithm.
·  UNIX operating system kernel maintain several important tables to coordinate the allocation of devices and execution of processes.
File Management of UNIX :
· UNIX has three main types of files.
1. Special Files : They are device drivers of various peripherals.
2. Ordinary Files : They store user information.
3. Directories : These files maintain the hierarchial structure of the file system.
User Interface Of UNIX :
· UNIX interface was command driven.
· The user commands of UNIX are very short. Most of the UNIX commands are of one character and other may be a small number of characters.
· UNIX commands may or may not require parameters or arguments.
Some UNIX Commands Are :
(i) ls : It is used to list the information of the files. Information like size of file, access rights and last modification date is listed.
(ii) chmod : It is used to change the access permissions of a file or directory.
(iii) sh : It is the command to invoke UNIX shell. Through shell the user can interact with kernel.
(iv) su : It is used to invoke and work upon the shell of another user without logging out. Other user should grant permission for this purpose.
(v) Who : This command tells us that which user has logged in or who has logged in. It also gives an idea about the location of user on network.
Linux Operating System :
· Linux is an operating system which includes all features of UNIX.
· It was developed in Finland by Linus Torvalds.
· It is free and is under GNU public license.
Characteristics of Linux Operating System :
Reliable : It is highly reliable. It can run for a long time without rebooting or re-installation.
GUI : Linux provides graphical user interface to facilitate easy interaction with user. Two GUI are 
1. GNOME, 2. KDE (K Desktop Environment) K has no expansion.
Programming Support: -
Linux supports general purpose programming languages like C, C++, java.
Web Programming: -
Linux provides support for the webservers like Tomcat, Apache, FTP server and others.
Data Base Programming: -
Linux provides support for the Norious Database server like My SQL, Oracle etc.
Networking Support: -
Linux supports most of the Internet protocols. The most essential communication protocol TCP/IP that is the back bone of all internet communication is built into Linux kernel itself.
File System of Linux: -
· The file structure of linux is hierarchial.
· Directories form a tree like structure.
· All hardware devices are also treated as files.
In linux the main directory is called root and all other directories are its subdirectories. The root is denoted by (‘/’).
The following are the directories inside linux root.
1. home : maintains user related files.
2. bin : contains files needed during booting, executable files and commands that are frequently given by user.
3. lib : contains files that are shared by different programs in order to execute.
4. proc : maintains special files that send information to and from the kernel.
5. user : contains utilities and libraries.
6. sbin : contains commands for the root user of a system.
7. dev : contains special files related to different peripheral devices attached to the system.
8. etc : It contains configuration files of the same machine.
9. var : contains files of variable data like log files etc.
10. mnt : contains temporary mounted files like DVD, CD-ROM, floppy. USB device etc. mnt shows the content of these file systems are mounted.
11. tmp : It maintains those temporary files that are needed only when a program is executing and are deleted ofter wards.
Types of Files in Linux :
1. Normal Files : These files store data such as text information and program.
2. Directory Files : These files store information about directory, such as access permissions, files and subdirectories under it, relationship with other directories. Moreover, these files get updated every time an alternation is made to the directory.
3. Special Files : It represents various kernel routines.
4. Symbolic Link Files : It contains the location/full pathname of actual files to which they point.
5. Pipe Files : These files are used as pipeline channels of information to be passed from one process to another process. They hold their contents only till the receiving file has not read that information.
Windows Operating System: -
Windows operating system was developed by microsoft corporation for computers.
Features of Windows Operating System: -
1. Windows OS is secure and reliable operating system but slightly less than UNIX and Linux.
2. Windows OS gives high performance not only on desktop systems but also on server system, large multithreaded and multiprocessor environments.
3. Windows OS is extensible. It means that it has capacity to keep pace with advances in computing technology.
4. Windows OS is portable. It means that it can be moved from one hardware architecture to another with relatively few changes.
Components of Windows OS: -
1. Hardware Abstraction Layer: -
It is a layer of software that hides hardware differences from higher levels of operating system thus making it portable.
2. Kernel: -
It is the heart of windows OS. Its functions are -
(i) Exception Handling : It means to deal with abnormal programming conditions called exceptions.
(ii) Process Scheduling : It means to decide the order in which different processes will execute.
(iii) Process Synchronization : It means to synchronize the processes such that there is no loss of information exchanged between processes.
(iv) Interrupt Handling : Interrupt are those situations when a process is interrupted or held in between. Like when a process require values to be given through keyboard an interrupt accurs. Then the interrupt service routine is called which services that interrupt. This interrupt handling is done by kernel.
3. Executive: -
It includes a set of services like
(i) Virual memory manager (ii) Windows 32 registry (iii) plug-and-play
(iv) process manager (v) input/output manager (vi) object manager
(vii) security reference monitor (viii) booting (ix) cache manager
(x) local procedure call facility
Memory Management in Windows OS: -
Windows OS use
1. virtual memory 2. Memory-mapping files
3. Heaps for memory management.
Process Management in Windows OS: -
Windows OS process manager provides facilities to create, executes, suspend, resume and delete processes.
File System in Windows OS: -
Windows OS uses FAT 32 and NTFS as file system.
Networking in Windows OS: -
· Both peer-to-peer as well as client-server networking are supported by windows.
· Windows OS support data transport, interprocess communication, file sharing across network as well as network management.
Windows OS supports Distributed file system (DFS) to serve files from multiple servers using a single distributed name space.