0% found this document useful (0 votes)
25 views

OS Lab 01

Uploaded by

Rai Bilal Sultan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

OS Lab 01

Uploaded by

Rai Bilal Sultan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

OPERATING SYSTEM

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.

Plagiarism: Plagiarism cases will be dealt with strictly. If found


plagiarized, both the involved parties will be awarded zero marks in
the assignment, all of the remaining assignments, or even an F grade
in the course. Copying from the internet is the easiest way to get
caught!

Deadline: The deadlines to submit the assignment are hard. Late


submission with marks deduction will be accepted according to the
course policy shared by the instructor. Correct and timely
submission of the assignment is the responsibility of every student;
hence no relaxation will be given to anyone.

Tip: For timely completion of the assignment, start as early as


possible. Furthermore, work smartly - as some of the problems can
be solved using smarter logic.
1. Note: Follow the given instructions to the letter, failing to do so
will result in a zero.

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.

ii) System 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

Desktop Operating Systems


Desktop operating system are general purpose software. Usage share of some of the desktop
operating system is shown below.

Fig: Usage share of Desktop Operating System

Server Operating Systems


Server-oriented operating systems tend to have certain features in common that make them more
suitable for the server environment, such as
 GUI not available or optional
 Dedicated role. Web server, Print Server, File Server
 Advanced backup facilities to permit regular and frequent online backups of critical data...
etc. (you may cover it later in the course)
Linux
Linux is an operating system, which is a flavor of Unix. Linux is a multi-user and multi-tasking
operating system. It is a leading operating system on servers and other big iron systems such as
mainframe computers and supercomputers. More than 90% of today's 500 fastest supercomputers
run some variant of Linux, Including the 10 fastest.
The Android system in wide use on mobile devices is built on the Linux kernel.
Since with the likeness with UNIX, all the programs written for UNIX can be compiled and run
under Linux. Linux operating system runes on verity of machines like 486/Pentium, Sun Sparces,
PowerPC, etc.

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

Linux System can be split into two parts.

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

(*Ask instructor for more detail about above diagram)

Two shells, which are commonly used, are Bourne shell(sh) and C shell. One other shell, which
is rather complex, is Korn shell.

Following list describes detail of each shell.

Shell Name Developed by Where Remark


BASH ( Bourne- Brian Fox and Chet Free Software Most common shell in
Again SHell ) Ramey Foundation Linux. It's Freeware shell.
CSH (C SHell) Bill Joy University of The C shell's syntax and
California (For BSD) usage are very similar to

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?

You might also like