Section A
Operating system is collection of system and application software which create a link between user and computer machine. So that user can easily perform basic function on computer machine such that I/O functions. In simple word we say that Operating system is a program that acts as an interface between user and computer machine and also between software and hardware.
Modern operating systems use a graphical user interface also called GUI. A GUI lets you use your mouse to click icons, buttons, and menus, and everything is clearly displayed on the screen using a combination of graphics and text. For example Microsoft operating likes Windows 7, windows 10. Some other operating system are Linux, macOS etc.
The objectives of the operating system are −
(1) Memory Management: - operating System Keeps track of the primary memory, i.e. what part of it is in use by whom, what part is not in use, etc. and allocates the memory when a process or program requests it.
(2) Managing Resources: -Operating System coordinates the entire computer’s resources including keyboard, mouse, printer, monitor, storage devices and memory.
(3) File system: - When a file is saved, the operating system saves it, attaches a name to it, and remembers where it put the file for future use. The way an operating system organizes information into files is called the file system.
(4) Providing a user interface: – The user interface (UI) is the point of human-computer interaction. Almost all operating systems today provide a windows-like Graphical User Interface (GUI) in which graphic objects called icons are used to represent commonly used features.
(5) Managing Resources: - Operating system manages all of the software and hardware on the computer. Most of the time, there are several different computer programs running at the same time, and they all need to access your computer's central processing unit (CPU), memory, and storage. The operating system coordinates all of this to make sure each program gets what it needs.
(6) Running applications: - Controls and monitors the execution of all other programs that reside in the computer, including application programs and other system software.
(7) Support for built-in utility programs: - The operating system uses utility programs for maintenance and repairs. Utility programs help identify problems, locate lost files, repair damaged files, and backup data.
(8) Security: − Prevents unauthorized access to programs and data by means of passwords and other similar techniques.
The parts of an operating system all exist so as to make the various parts of a computer system work together. These components are interrelated and connected in a way to achieve the major function of operating system. Following are the major components of Operating System
Classification of Operating System
Basically Operating system divided in to two categories.
1) Real-Time Operating System:
Real-time operating systems are systems that respond to input immediately. They are used for such tasks as navigation, in which the computer must react to a steady flow of new information without interruption. Most general-purpose operating systems are not real-time because they can take a few seconds, or even minutes, to react. Real time can also refer to events simulated by a computer at the same speed that they would occur in real life. In graphics animation, for example, a real-time program would display objects moving across the screen at the same speed that they would actually move. For example CC TV system, navigation system, weather forecasts
2) Multi-user Operating Systems:
A multi-user operating system is the Systems that allow multiple users that are on different computers to access a single system's operating system resources simultaneously. Users on the system are connected through a network.
3) Single-user Operating Systems:
A single-user operating system is a type of system that has been developed and designed to use on a single computer. It is used by only one user at a time. It is the most common system used for home computers.
4) Single Task Operating Systems:
This type of OS is just better version of Real time OS, where one User can use the computer to do one thing at a time, which means that doing thing more than one thing at a time is difficult in this type of OS. The handhelds or the palmtop computers are good examples of this type of systems. For example Windows mobile and MS DOS etc.
3) Multi-tasking Operating Systems:
Multitasking is the ability of a computer to run more than one program, or task , at the same time. The operating system is able to keep track of where you are in these tasks and go from one to the other without losing information. Multitasking also allows the computer to make good use of the time.
4) Multi Processing System:
A multiprocessing operating system is one that can run on computer systems that contain more than one processor. This type of Operating system has great speed. These types of systems are used when very high speed is required to process a large volume of data. The whole task of multiprocessing is managed by the operating system, which allocates different tasks to be performed by the various processors in the system.
5) Multithreading Operating System: -
Multithreading is the ability of an operating system to execute the different parts of the program, called threads, simultaneously. This type of operating system needs a special type of micro processor called Hyper-Threading processor. Hyper-Threading is a technology that allows a single microprocessor to act like two separate processors to the operating system and the application program s that use it.
6) Distributed Operating System:
An operating system that manages a group of independent computers and makes them appear to be a single computer is known as a distributed operating system. The development of networked computers that could be linked and communicate with each other, gave rise to distributed computing. Distributed computations are carried out on more than one machine. Windows 2003 + application server (IIS&PWS) and Linux (apache server) is example of Distributed System.
Desktop Operating System:
A desktop operating system is one that is intended for a desktop computer Also called a “client operating system”. These OS usually come with things that one would probably use at a desk. For example, Windows sometimes comes with Microsoft Office pre-installed. These types of operating system provide its resources to only one single person at a time. For example windows 7.
Server Operating System
A server operating system is an operating system specifically designed to run on servers, which are special computers that operate within client/server architecture to serve the requests of client computers on the network. Server OS provide a platform for multi-user applications, and most come bundled with a batch of common server applications, such as Web servers, e-mail agents and terminal services. Server Operating system provides central interface to manage users, implement security and other administrative processes. Some common examples of server operating systems include Red Hat Enterprise Linux, Windows Server, Mac OS X Server.
Task: When a program is requested for execution then it is called task e-g when a user types the name of a program it is then task for operating system to validate it,
Job: When operating system validates it then it becomes a job for operating system.
Process: When job is loaded into memory & it is ready for execution then it is called a process,
OR When a program is under execution is called process.
The allocation of C.P.U time to different jobs to be processed on the computer is called scheduling. We also say that the process, which arranges different process according to their priority, is called scheduling. If more than one process are able to execute then operating system must decide which one to run first. The part of operating system concerned with these decisions is called 'scheduler', and the algorithm it uses is called scheduling algorithm.
An operating system uses two types of scheduling processes execution.
1) Preemptive Scheduling
2) Non- Preemptive Scheduling
It is that mode of execution in which a process may be swapped from C P.U before completion If a process is running and another process of higher priority arrives to the system, then execution of current process is stopped and C.P.U is assigned to newly arrived process.
Suppose a process P1 with size 2 KB is currently running by C.P.U and at the meantime P2 with size 1 kB arrives. Now P2 have higher priority due to less memory size So P1 is swapped from memory and C.P.U is assigned to P2.
(2) Non-Pre-Emptive Scheduling:
If a process is assigned to C P U and is not swapped out before its completion then this mode of execution is called non-pre-emptive and is referred to as non-pre-emptive scheduling.
Suppose a process P1 with 10Kb memory size is currently in execution. At meantime another process P2 with 2Kb arises to the system, but the process P2 will have to wait (although P2 will have memory size less then P1) until P1 is completed.
Different Types of Pre-Emptive Scheduling Algorithm:
(I) RR (Round Robin) Time Sharing Scheduling Algorithm: -
In this kind of scheduling all the processes are given equal time of C.P.U called time slice or quantum. If a process is not completed before its C.P.U time expires then the C.P.U is taken away and given to the next waiting process & pre-empted process is then placed at the back of ready list.
(ii) SJN (shortest job next) Scheduling Algorithm: -
It is also called shortest remaining time (SRT). In this algorithm all incoming jobs are placed to their size. A job, which has less memory requirement, will be assign to CPU first. So that shortest job will be assign to CPU. During the execution another process arrive which have highest priority. So currently executed process will compare to the newly arrived process. If the remaining part of currently executed process is greater then the new process then currently executed process will stopped and CPU assign to new process. If the remaining part of currently executed process is less then the new process then CPU not terminate the Currently process.
Different Types of Non Pre-Emptive Scheduling Algorithm:
(I) FIFO (first in first out) Scheduling Algorithm:
According to this algorithm the incoming jobs are placed in a queue and processed one by one at FIFO basis. A job at front of queue is allowed to use C. P.U. Once the job is assigned to C.P.U then C.P.U cannot be taken away from it, until it is completed. So processes are executed according to their arrival time means First in First out.
(ii) LIFO (last in first out) Scheduling Algorithm:
In this algorithm incoming jobs are placed in stack & C.P.U is assigned to job that is at the top of stack. A Process with lowest real time (arrival time) will be executed first.
(iii) SJF (shortest job first) Scheduling Algorithm:
According to this algorithm first of all processes are arranged according to their memory size and shortest job is assigned the highest priority. It means that a job requires less memory will be given higher priority.
Disk some time referred to as a diskette is a storage device. Where data is recorded by various electronic, magnetic, optical, or mechanical changes to a surface layer of one or more rotating disks. The most commonly found disks with a computer are the hard disks ,floppy disk, optical disc etc.
Hard Disk:
These are also called 'fixed disks’ because the storage media is mounted within the computer and not intended to be removed. Hard drives consist of one or more metal platters stacked together on a single spindle. Multiple read/write heads float next to the surface of the drive.
Floppy Disk:
These disks are designed to allow users to store data to a disk, remove it and carry the data elsewhere. These typically come in one of two formats in the 3.5 inch store1.44Mbytes and 5.25 inch store 1.22 Mbytes.
Optical disk:
An optical disk is any computer disk that uses optical storage techniques and technology to read and write data. An optical disk is a permanent storage device. A laser beam used to read and write data on an optical disk. It can store data up to 1 GB.
There are different categories of optical disk:
CD-ROM:
CD-ROM stands for compact disk read-only memory. The data stored on CD-ROM can only be read. It cannot be deleted or changed.
DVD:
DVD stands for digital video disk. It is similar to CD-ROM. It uses a laser beam with a short wavelength. The short wavelength reads smaller holes on the disk.
WORM Disks:
WORM stands for write once read many. It can only be read and cannot be updated or changed. It can store greater volumes of information than CD-ROM. Its capacity is 200 GB.
Rewritable Optical Disks:
It uses several technologies to combine optical and magnetic disk technology to enable read and write storage. A 5 ½ inch rewritable disk can store up to 5 GB. These are normally used for applications using large volumes of storage with little update activity.
A disk partition or partition enables users to divide a physical disk into logical sections. For example, allowing multiple operating systems to run on the same device. In old File system like FAT 16 which are not sport a big partition more than 40 GB then we must create partition allows a computer hard drive to run more efficiently and save more disk space.
Types of Partition:
Primary Partition:
Primary Partition is the hard disk partition where both Windows OS and other data can be stored, and it is the only partition that can be set active. Early MBR supports up to 4 primary partitions. Now GPT disk can be divided into 128 primary partitions at least.
Extended Partition:
Because the primary only can be created four maximum, this need to use extended partition to break the limitation of 4 partitions. In an Extended Partition you can create unlimited logical drives. Extended partition is not used to store data, because the Extended Partition is used to hold logical partitions.
Logical Partition:
Also called logical partition. A volume created within an extended partition on a basic disk. A logical drive can be formatted and assigned a drive letter, but cannot host an operating system.
MBR:
MBR, Master Boot Record, is a boot sector at the very beginning of computers' hard drive. MBR hard disk can be divided into 4 primary partitions at most and it supports hard disk below 2TB.
GPT:
GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk, using globally unique identifies. It has many good features. Firstly, it allows users to create up to 128 partitions in Windows without creating extended partition and logical partition. Secondly, it can support 18EB hard disk.
A processor register (CPU register) is one of a small set of data holding places that are part of the computer processor. A register may hold an instruction, a storage address, or any kind of data. Some instructions specify registers as part of the instruction. For example, an instruction may specify that the contents of two defined registers be added together and then placed in a specified register.
We generally write a computer program using a high-level language. A high-level language is one which is understandable by us humans. It contains words and phrases from the English human language such as language. But a computer does not understand high-level language. It only understands program written in 0's and 1's in binary, called the machine code. A program written in high-level language is called a source code. We need to convert the source code into machine code and this is accomplished by interpreters. So we say that, an interpreter is a program that converts program written in high-level language into machine code understood by the computer. Interpreter directly converts and executes instructions statement by statement. Programming language like Python, Ruby uses interpreters.
Compiler is also a program that converts the source code written in high-level language into machine code understood by the computer. Compiler read the entire program and translates it as a whole into machine code. Programming language like C, C++ uses compilers.
An address bus is computer bus architecture. It is used to transfer data between devices. The devices are identified by the hardware address of the physical memory (the physical address). The address is stored in the form of binary numbers to enable the data bus to access memory storage.
Section B
In the console tree, click Disk Management. The Disk Management window appears. Your disks and volumes appear in a graphical view and list view.
To create a new partition or logical drive on a basic disk:
Remote Desktop Connection is a technology that allows you to sit at a computer (sometimes called the client computer) and connect to a remote computer (sometimes called the host computer) in a different location. For example, you can connect to your work computer from your home computer and have access to all of your programs, files, and network resources as though you were in front of your computer at work
Windows 2008 Server
A server role is a set of software programs that, when they are installed and properly configured, lets a computer perform a specific function for multiple users or other computers within a network.
Windows 2008 includes the following roles:
(1) Active Directory Domain Services:
Active Directory Domain Services (AD DS) is a server role in Active Directory that allows admins to manage and store information about resources from a network, as well as application data, in a distributed database.
(2) DHCP Server:
Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to automatically assign an IP address to a computer from a defined range of numbers (i.e., a scope) configured for a given network
(3) DNS Server:
Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses. This is necessary because, although domain names are easy for people to remember, computers or machines, access websites based on IP addresses.
(4) Application Server:
The application server is a framework, an environment where applications can run, no matter what they are or what functions they perform. An application server can be used to develop and run web-based applications.
(5) Terminal Services:
Enables users to access Windows-based programs that are installed on a terminal server or to access the Windows desktop from almost any computing device that supports the RDP protocol. Users can connect to a terminal server to run programs and to use network resources on that server.
(6) Print Services:
Enables the management of print servers and printers. A print server reduces administrative and management workload by centralizing printer management tasks.
Creating Active Directory
Group Policy is simply the easiest way to reach out and configure computer and user settings on networks based on Active Directory Domain Services (AD DS).
To create a Group Policy Object (GPO)
To delegate administrative control of a GPO
Access the Group Policy snap-in for the GPO.
Section C
Linux
There are two ways to create new user accounts:
To create a user account graphically using the User Manager:
To create a user account from a shell prompt:
Linux File System is a layer which is under the operating system that handles the positioning of your data on the storage, without it the system cannot knows which file starts from where and ends where.
Linux offers following file system:
Ext: an old one and no longer used due to limitations.
Ext2: first Linux file system that allows 2 terabytes of data allowed.
Ext3: came from Ext2, but with upgrades and backward compatibility. This file system doesn’t support file recovery or disk snapshots.
Ext4: faster and allow large files with significant speed. It is a very good option for SSD disks and this one is the default file system that Linux suggests.
JFS: old file system made by IBM. It works very well with small and big files, but it failed and files corrupted after long time use.
XFS: old file system and works slowly with small files.
Purpose: mkdir command is used for creating new directory (Folder). We also used some option with mkdir command.
Syntax: mkdir [- option] Directory Name
Where Option are:
- p Parent directory creator. If directory, not exists.
-m Assign Permission default 755 mean Read, Write and execute Access for owner and Read and Execute Access for Other user and Group.
For example : mkdir [-m] Toqeer 755
Purpose: Change current directory to directory which are specify in the command. We also use chdir command for this purpose.
Syntax: cd Directory name
For example : Cd Toqeer
This Command is used to delete the directory. Directory must be empty.
Syntax: rmdir [-option] Directory name
Where Option are: –s Give the message for confirmation
For Example: rmdir -s Toqeer
After typing this command delete the folder name toqeer and before deleting give the confirmation message.
Purpose: This command used to delete the folder and files and also sub folder if existing.
Syntax rm [-r –f –I ] Directory
Where
–r means delete all the sub folder, -I means give message before deleting, -f mean delete also write protected file
For Example : rm -m Toqeer
After typing this command and pressing Enter Key the folder Toqeer And All its files and subfolder deleted.
Purpose: This command displays the list of files and folder of the working directory.
Syntax : ls [-option]
Where option are:
-a display all the files including those files start with dot ( . ) means hidden files.
-A all the files including start with double dot.
-l display the long list means that all the information about files and folders.
-R in reverse order.
For Example : ls – l
Purpose: This command read the data form standard input and then out put in the different forms. In simple word we say that CAT command is used for three different purposes.
cat > file name
cat source file name > destination file name
Where source file is file from which we create a new file. And destination file is new file name.
cat source file name >> destination file name
With this command Contents of source file merge with contents of Destination file.
For Example : cat > test.txt
After this type the contents of file and then press CTRL + D Key for save the file.
Cat Test.txt
This command Display the contents of file test.txt.
Cat test.txt > New.txt
This command Create a new file name new.txt and copy the contents of test.txt in to new.txt
Cat test.txt >> new.txt
This command add the contents of test.txt in to new.txt
Purpose :This command copy the file form one location to other location or Copy the contents of one file to an other file
Syntax : cp [option] (source file name) (destination / or Directory name)
Where option are:
-I Give the message if overwriting occur
-p Preserve that permission is granted.
For Example : cp test.txt toqeer
Where test.txt is file name and Toqeer is folder name where we want copy test.txt.
We also use cp command in this way
cp test.txt new.txt
In this way contents of first file copy in second file.
Purpose :This command is used for two purposes.
Syntax: mv source file/folder Destination
For Example : mv test.txt New
This command change the name file text.txt to shah.txt
Purpose: Create a link to the specified TARGET with optional LINK_NAME. If LINK_NAME is omitted, a link with the same base name as the TARGET is created in the current directory.
Syntax : ln file name Link File name
For Example : Ln test.txt welcome.lnk
Purpose: This command describes the nature of file.
Syntax: file test.txt
For Example : file Test.txt
Return ASCII Text File
Purpose: This command Count the Contents of file. For example total number of Character, Word and lines.
Syntax: wc [ -Option] File Name
Where Option are:
-c Count the Total Character, -l Count The Total line, - W Count The total Word
FOR EXAMPLE: wc [-c] Test.txt
Display the Total Character of the File Test.txt
Displays appointments and reminders for the date.
Before you can do the calendar program you must have a file named calendar at the root of your profile. Within that file you may have something similar to:
7/7/2000 You have a meeting today.
Then add at the end of your .login or .profile calendar and then when you log on 7/7 it will display the message: 7/7/2000You have a meeting today.
Display appointments if any.
Purpose: This command display the calendar of the year
Syntax: cal [Month] [Year]
Where month and year are optional if we type only CAL command then display the current calendar.
FOR EXAMPLE : cal march 2006
After typing this command and pressing Enter Key Calendar of March 2006 is display on the screen.
PURPOSE: This Command changes the user Password.
SYNTAX: passwd User Name [-d][-f]
Where –d for deleting the password
-f means that you user must be change the password.
Purpose
Change the Owner of file, you can also specify the Privileges of the file same time when you change the Owner.
SYNTAX
chown User ID File Name
PURPOSE: This Command Display The list of those users who are Currently Login.
SYNTAX: Who [-s][-q][-h][-i]
Where -s means that Display the User ID, -H Column Header, -q Display quick Information consist on only user ID, -I Also send the message
PURPOSE: -This tells that who ere you, Means That Log in Name of the user.
SYNTAX:- who am I
PURPOSE: Read from an input and write to a standard output or file.
SYNTAX: Tee [a] File name / List
Where –a means that if file already exist then insert the data in previous file.
For Example:: ls *.txt | wc -l | tee count.txt
In the above example the ls command would list all .txt files in the current directory, take a word count (wc) by the amount of lines (-l) and the output will be sent to the count.txt.
Purpose: This command used to send the message to the other user right at the same time when you type the message it will be send at real time message to the online user whose name is specified in the command. In the end press CTRL+D or Z key for stop this process.
Syntax: Write User Name List
Message
Press CTRL+D or Z
For Example : Write user01
Hello how are You my Friend
When You press Enter key this message Transmit to User01. For end of session Press CTRL+D or CTRL+Z key.
Lets you control if people can use the write command, to send text to you over the screen.
n Prevents the messages from others popping up on your screen.
y Allows messages to appear on your screen.
Typing this command by itself will display whether or not the mesg service is enabled. For example, it may display: "is y", indicating that it is enabled. Typing n or why after the command would enable or disable this command.
Purpose
This command is used to display the message to all those users who are currently logged on to the system. wall command is differ form write command because write command send the message to specify users but wall command send the message to all user.
Syntax: Wall message (Press CTRL+Z key)
The length of the message is limited to 20 lines.
For Example : Wall message
Please Shut Down You PC
CTRL+Z
This command is used to read/send E-Mail the mail to any user in Network. If User currently not login then mail store in the mail box of that user. User can check this mail at any time when he/she login by typing mail and press enter key.
SYNTAX: Mail User ID
Write text-------
-------
------
------
Press CTRL +D Key to save
Also you can send the file with mail command
For this purpose write command in this way
Mail User name < File Name
PURPOSE: This command clears the contents of the screen.
SYNTAX: Clear
Vi Command:
This command is used to edit the file are create new file. Using Screen-oriented (visual) display editor based.
SYNTAX: Vi file name
For Example: vi test.txt
PURPOSE: This command is used for creating a new file are edit the previous store file.
SYNTAX: Pico < File name>
For Example:: Pico Test.txt
PURPOSE: This command Write The Contents of file on the screen. You can not edit the file with this command. Jus like Type command in DOS.
SYNTAX: Less < File Name>
For Example: Less test.txt
PURPOSE: Create archives file or extract archives file.
SYNTAX:: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Creating a tar file: tar -czvf archive.tar.gz stuff
Where archive.tar.gz is tar file.
Extracting the files from a tar file:
tar -cvvf home.tar home/
PURPOSE: This command deletes the user from Linux Server. Or Remove the Login Name.
SYNTAX: deluser User Name
For Example: deluser user01
Purpose: The more command is used to display the contents of file page by page. The more command pauses at the end of each page and by pressing Space Bar key Next page is display.
Syntax: More [+ Line Number] File name
Where Line number is optional which specify the Starting Line Number.
- lines
For Example More Test.txt
OR More +20 test.txt
Purpose: Display the contents of file from one specific point to an other specific point. (Top to Tail).
We say that
Delivers the last part of the file.
Syntax: Tail +Start Line number test.txt [+ End Line Number] File Name
Last Line Number is optional
For Example: Tail myfile.txt
The above example would list the last 10 (default) lines of the file myfile.txt.
tail myfile.txt -n 100
The above example would list the last 100 lines in the file myfile.txt.
Purpose: This command display the contents of file form top to Specific Number Of line.
Normally this command Displays the first ten lines of a file, unless otherwise stated.
Syntax: Head [- Number] file Name
For Example: head -15 myfile.txt
Purpose: Display the detail of Information of the user. If we specify the user name then information about that user is display other wise information of all currently login is display.
Syntax: Finger [user name]
Where user name is optional.
For Example: finger -b -p ch
Purpose: Schedules a command to be ran at a particular time, such as a print job late at night.
Syntax: at Time
Command
For Example: At 04:00
write
This is Class Time
(Press CTRL + D)
Purpose:
Turn off the computer immediately or at a specified time.
Syntax: Shutdown –g –y
Where –g give the 60 second to user save work and log out and –y means that disconnect the user with out confirmation
For Example: shutdown 8:00
Shutdown the computer at 8-oclock
Purpose: The ps command is used to provide information about the currently running processes, including their process identification numbers (PIDs)
Syntax: Ps
For Example: ps
This will return the following Report
PID TTY TIME CMD
12330 pts/0 00:00:00 bash
21621 pts/0 00:00:00 ps
This command stopped the running process in background or we say Cancels a job.
SYNTAX: Kill [-Signal] [ Process ID]
FOR EXAMPLE: kill -s kill 1230
Allows you to exit from a program, shell or log you out of a Unix network.
Syntax: exit
Examples: exit - If supported would exit you from the program, shell or log you out of network.
gzip Command
Purpose: Compress or expand files.
Syntax: gzip [ -a c d] [-S suffix] [ name ... ]
-d decompress the file.
Compresses the file myfile, making it myfile.gz. Note. When doing this the original file will no longer exist on the drive.
Purpose: Signs into a new system.
Syntax: login [ -p ] [ -d device ]
Examples: login computerhope.com
The man command which is short for manual provides in depth information about the requested command or allows users to search for commands related to a particular keyword.
Syntax : man [-] [-k keywords] topic
Examples: man mkdir
Lists help information on the mkdir command.
Notes of Computer Network
Notes of MS Access
Notes of Adobe Photoshop For DIT
Notes of Inpage
Notes of Database
Notes of E-Commerce
Notes of Web Technology / HTML
Notes of Microsoft Word 2007
Notes of MS Excel 2007
Notes of C Language
Notes of Operating System For DIT
Notes of information technology Part -1
Notes of information technology Part -2
Notes of CorelDraw
Notes of Power Point