OS Lab 01
OS Lab 01
LAB-Manual 01
BS-Computer Science
Faculty of Computing
Riphah International University Islamabad Campus I-14
1
Instructions
Submission: Use proper naming convention for your submission
file. Name the submission file as
LabNO_SAPID_Section (e.g. Lab01_23456_SE4-2)
Submit the file on Moellim within the deadline. Failure to submit
according to the above format would result in deduction of 10%
marks.
Submissions on the email will not be accepted.
2
Welcome to Operating System (LAB) Course:
1.1. Objective
1.2. Software
• Ubuntu 16.04
1.3. Theory
1.1 Objective
The first lab is theoretical in nature. There’s no practical work to do in this Lab. This document
contains terminologies relating to Operating System and Linux. So reading exercise would be
helpful both in Labs and in course.
Read the Lab carefully.
1.2 Software:
Software is a term that refers to the written instructions or programs that control the operations of
computer. Informally, software refers to the programs, application packages (Word processor,
Spread Sheets, DBMS, etc.) written for computer.
OR
A software or computer software essentially a type of programs which enable the users to perform
some particular specific task or actually used to operate their computer. It essentially directs all of
the peripheral devices on the entire computer system- what exactly to do and how exactly to
perform a task. A software plays a key role of a mediator between the user and the computer
hardware. In the absence of software, a user essentially can’t perform any task on a computer.
3
Software may be classified into two major categories.
i) Application Software
ii) System Software
i) Application Software
Application software is a generic term used for such types of software, which are used to solve a
problem. The problem to solve is user specific. Word processors, computer games, database
managers etc. are specific types of application of software.
System Software are programs which are designed to operate, control, and extend the processing
capabilities of the computer itself, e.g. operating systems, compilers, linkers etc.
These software sanction an environment or platform for the other software to easily work in.
Hence, it is the reason why the system software is quite important in the management of the entire
computer system. Whenever you turn on the computer first, it is this system software which gets
initialized and then gets loaded in the system’s memory. A system software essentially runs in the
background, and it isn’t actually utilized by the end-users.
a. Operating System
Being a prominent example for system software, it is essentially a collection of software which
handles resources as well as offers general services for various other application which actually
run over them. There are different types of operating systems like embedded, real-time, distributed,
single-user, multi-user, mobile, internet and much more. Full stack web development
services develop apps to operate on a mobile operating system like Android and iOS. Some of the
key examples of operating systems are as follows:
1. MS Windows
2. macOS
3. Linux
4. iOS
5. Android
6. CentOS
7. Ubuntu
8. Unix
b. Device Drivers
This type of software controls particular hardware which is essentially attached to the system.
Different hardware devices which require a driver to connect to a system easily consist of displays,
printers, sound cards, hard disks, keyboard, and mice. Few of the examples of such drivers are:
1. BIOS Driver
2. Motherboard Drivers
4
3. Display Drivers
4. ROM Drivers
5. Printer Drivers
6. USB Drivers
7. Sound Card Driver
8. VGA Drivers
c. Firmware
It is actually a permanent software which is embedded in the system’s read-only memory. It is
essentially a set of instructions which are permanently stored onto to the hardware device. It offers
vital information regarding how a particular device interacts with different other hardware. Some
of the examples of firmware are:
1. Computer Peripherals
2. Embedded Systems
3. UEFI
4. BIOS
d. Utility
These software are designed to assist in analysing, as well as optimizing, along with configuring
and maintaining a given computer system. It provides support to the computer infrastructure.
Software like disk cleanup and management tools, anti-viruses, defragmenters, compression tools
etc. are all utility software. Some of its examples are:
1. WinRAR
2. WinZip
3. Windows File Explorer
1.3 Theory
Computer Resources
Computer resources are physical devices, which an operating system accesses, and manages.
Printers, memories, input/output devices, files, etc., are examples of computer resources. So why
an operating is called a resource manager.
Some of important tasks, which a typical modern operating system has to perform, are given
below:
Processes Scheduling
Inter-process Communication
Synchronization
Memory Management (physical memory allocation, virtual memory etc.)
Resource Management
Directory and File Management
Communication
5
Operating system can be categorized in two categories.
1. Desktop Operating System
2. Server Operating System
Linus Torvalds, principal author, at the University of Helsinki, Finland, wrote Linux Kernel.
UNIX programmers around the world in the development of Linux assisted him.
Popular Linux distributions include:RedHat, Debian, Ubuntu , Fedora, openSUSE, CentOS etc.
6
Linux System
i) Shell
ii) Kernel
The shell is the outermost layer of the operating system. Shells incorporate a programming
language to control processes and files, as well as to start and control other programs. The shell
manages the interaction between you and the operating system by prompting you for input,
interpreting that input for the operating system, and then handling any resulting output from the
operating system.
Formally, a Shell is interface between a user and a Linux operating system, i.e. user interacts with
the Linux operating system through the shell. There may be two tasks to be performed by a shell.
First, accepts commands from a user and second, interprets those commands.
Shells provide a way for you to communicate with the operating system. This communication is
carried out either interactively (input from the keyboard is acted upon immediately) or as a shell
script. A shell script is a sequence of shell and operating system commands that is stored in a file.
Shell
Kernel
Two shells, which are commonly used, are Bourne shell(sh) and C shell. One other shell, which
is rather complex, is Korn shell.
7
the C programming
language.
KSH (Korn SHell) David Korn AT & T Bell Labs --
TCSH See the man page. -- TCSH is an enhanced but
Type $ man tcsh completely compatible
version of the Berkeley
UNIX C shell (CSH).
Kernel is the core of Linux Operating System, while the system is operational, it keeps on
running. The kernel is the part of the Linux Operating system which consist of routines, which
interact with underlying hardware, and routines which include system call handling, process
management, scheduling, pipes, signals, paging, swapping, the file system, and high-level part of
the I/O system.
So shell accepts commands from user interpret them and deliver these interpreted commands to
kernel for execution. After execution, the shell displays result of executed commands.
Files
File is a mechanism through which we store information. Normally, there are two modes of
storing information.
i) File
ii) Directories
i) File
A simple file stores some type of information. The information it has may be in text format, or in
binary format.
ii) Directories
Directories are special types of files owned the operating system, which contains information
about files, and may contain other directories (called Subdirectories). So directories are also files,
which contains some vital information about the files, and other directories.
There’s a file (management) system in operating system, which manipulates file and directories.
The major operations, which can be performed on files and directories, are given below:
Create
Delete
8
Open
Close
Read
Write
Append
Seek
Rename
Get Attributes
Set Attributes
File Attributes
Since file contains some information about something, there’s needed some information about
the file itself. This information about the file is called file attributes.
All operating system associate some extra information with each file, for example date and time
of the file created, file size etc. These items are called file attributes. Some of file attributes are
given below:
File Name
File type For example text, binary, etc.
Creator
Owner Current owner
Date created
Date last read access
Date last modified
Current size Number of bytes in the file
Maximum size Maximum size file may grow to.
Assignment 01
Task 01: Explain basic differences between the different versions of Android Operating System.
Task 02: What do you expect from new Operating System?