Answer below

Answer below.Study guide provided for reference

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Course Development Team
Head of Programme
: Dr Yeo Chee Shin
Course Developer(s)
: Tan Kheng Teck
Technical Writer
: Ang Liping, ETP
© 2019 Singapore University of Social Sciences. All rights reserved.
No part of this material may be reproduced in any form or by any means without
permission in writing from the Educational Technology & Production, Singapore
University of Social Sciences.
ISBN 9789814787390
Educational Technology & Production
Singapore University of Social Sciences
463 Clementi Road
Singapore 599494
How to cite this Study Guide (APA):
Tan, K. T. (2019). ICT246 Operating system (study guide). Singapore: Singapore University
of Social Sciences.
Release V1.1
Build S1.0.5, T1.5.21
Table of Contents
Table of Contents
Course Guide
1. Welcome…………………………………………………………………………………………………… CG-2
2. Course Description and Aims…………………………………………………………………. CG-3
3. Learning Outcomes…………………………………………………………………………………. CG-5
4. Learning Material……………………………………………………………………………………. CG-6
5. Assessment Overview……………………………………………………………………………… CG-7
6. Course Schedule………………………………………………………………………………………. CG-9
7. Learning Mode………………………………………………………………………………………. CG-10
Study Unit 1: Introduction to Operating Systems and Virtualisation
Learning Outcomes……………………………………………………………………………………. SU1-2
Overview……………………………………………………………………………………………………. SU1-3
Chapter 1: Overview of Operating Systems……………………………………………….. SU1-4
Chapter 2: Virtualisation…………………………………………………………………………… SU1-14
Summary………………………………………………………………………………………………….. SU1-26
Formative Assessment……………………………………………………………………………… SU1-27
References………………………………………………………………………………………………… SU1-41
Study Unit 2: Linux Operating System and File System Management
Learning Outcomes……………………………………………………………………………………. SU2-2
Overview……………………………………………………………………………………………………. SU2-3
i
Table of Contents
Chapter 1: Overview of Linux Operating System………………………………………. SU2-4
Chapter 2: File System Management………………………………………………………… SU2-10
Summary………………………………………………………………………………………………….. SU2-23
Formative Assessment……………………………………………………………………………… SU2-24
References………………………………………………………………………………………………… SU2-36
Study Unit 3: Access Control and System Security
Learning Outcomes……………………………………………………………………………………. SU3-2
Overview……………………………………………………………………………………………………. SU3-3
Chapter 1: Access Control………………………………………………………………………….. SU3-4
Chapter 2: System Security……………………………………………………………………….. SU3-15
Summary………………………………………………………………………………………………….. SU3-21
Formative Assessment……………………………………………………………………………… SU3-22
References………………………………………………………………………………………………… SU3-35
Study Unit 4: Process and Memory Management
Learning Outcomes……………………………………………………………………………………. SU4-2
Overview……………………………………………………………………………………………………. SU4-3
Chapter 1: Process Management………………………………………………………………… SU4-4
Chapter 2: Memory Management…………………………………………………………….. SU4-15
Summary………………………………………………………………………………………………….. SU4-21
Formative Assessment……………………………………………………………………………… SU4-22
References………………………………………………………………………………………………… SU4-33
ii
Table of Contents
Study Unit 5: Device Management and Fault Tolerance
Learning Outcomes……………………………………………………………………………………. SU5-2
Overview……………………………………………………………………………………………………. SU5-3
Chapter 1: Device Management…………………………………………………………………. SU5-4
Chapter 2: Fault Tolerance………………………………………………………………………….. SU5-8
Summary………………………………………………………………………………………………….. SU5-17
Formative Assessment……………………………………………………………………………… SU5-18
References………………………………………………………………………………………………… SU5-31
Study Unit 6: System Management and Mobile Operating Systems
Learning Outcomes……………………………………………………………………………………. SU6-2
Overview……………………………………………………………………………………………………. SU6-3
Chapter 1: System Management…………………………………………………………………. SU6-4
Chapter 2: Mobile Operating Systems………………………………………………………. SU6-12
Summary………………………………………………………………………………………………….. SU6-17
Formative Assessment……………………………………………………………………………… SU6-18
References………………………………………………………………………………………………… SU6-31
iii
Table of Contents
iv
List of Tables
List of Tables
Table 3.1 An access control matrix for three files……………………………………………. SU3-9
Table 3.2 An access control matrix for three folders……………………………………… SU3-10
Table 4.1 Process Scheduling Example…………………………………………………………. SU4-12
Table 4.2 A Comparison of Scheduling Algorithms……………………………………… SU4-13
Table 4.3 Process Scheduling Example…………………………………………………………. SU4-14
v
List of Tables
vi
List of Figures
List of Figures
Figure 1.1 A computer system………………………………………………………………………… SU1-5
Figure 1.2 Uniprogramming…………………………………………………………………………. SU1-10
Figure 1.3 Multiprogramming………………………………………………………………………. SU1-10
Figure 1.4 Virtualisation……………………………………………………………………………….. SU1-15
Figure 1.5 Types of hypervisor……………………………………………………………………… SU1-17
Figure 2.1 Linux OS in AXS machine……………………………………………………………… SU2-4
Figure 2.2 Linux OS in self-check-out machine in supermarket……………………… SU2-5
Figure 2.3 File system software architecture…………………………………………………. SU2-12
Figure 2.4 File structure in Windows OS………………………………………………………. SU2-13
Figure 2.5 File structure of a user home folder in Debian (Linux OS)……………. SU2-14
Figure 2.6 Contiguous file allocation…………………………………………………………….. SU2-19
Figure 2.7 Chained allocation……………………………………………………………………….. SU2-20
Figure 2.8 Indexed allocation with variable-length portions…………………………. SU2-21
Figure 3.1 Rights for a subject SUSS (Full control)………………………………………….. SU3-6
Figure 3.2 Rights for a subject SST (Read and Write)……………………………………… SU3-7
Figure 3.3 Rights for a subject tkt (Read)……………………………………………………….. SU3-7
Figure 4.1 Two-state process model………………………………………………………………… SU4-5
Figure 4.2 Five-state process model………………………………………………………………… SU4-6
vii
List of Figures
Figure 4.3 Resource allocation graph that resulted in deadlock………………………. SU4-9
Figure 4.4 A comparison of scheduling policies……………………………………………. SU4-12
Figure 4.5 The effect of dynamic partitioning……………………………………………….. SU4-16
Figure 4.6 Memory configuration before and after allocation of 16 MB
block……………………………………………………………………………………………………………… SU4-17
Figure 4.7 Assignment of process to free frames…………………………………………… SU4-19
Figure 4.8 Page tables at time (f) of Assignment of process to free frames…….. SU4-19
Figure 5.1 RAID 0…………………………………………………………………………………………… SU5-9
Figure 5.2 RAID 1…………………………………………………………………………………………… SU5-9
Figure 5.3 RAID 4…………………………………………………………………………………………. SU5-10
Figure 5.4 RAID 5…………………………………………………………………………………………. SU5-10
Figure 5.5 RAID 6…………………………………………………………………………………………. SU5-11
Figure 6.1 Disk quota on a Windows 10 machine…………………………………………… SU6-9
Figure 6.2 Android software architecture……………………………………………………… SU6-13
Figure 6.3 iOS architecture……………………………………………………………………………. SU6-15
viii
List of Lesson Recordings
List of Lesson Recordings
Installation of Debian……………………………………………………………………………………. SU1-24
Using Debian Linux……………………………………………………………………………………….. SU2-7
Linux Files Commands…………………………………………………………………………………. SU2-15
Linux First Shell Script…………………………………………………………………………………. SU2-16
Shell Script createfolders………………………………………………………………………………. SU2-17
Shell Script createfiles…………………………………………………………………………………… SU2-17
Access Control File Permissions……………………………………………………………………. SU3-11
Access Control More File Permissions………………………………………………………….. SU3-12
Shell Script Permissions………………………………………………………………………………… SU3-14
OS Security Disable Service………………………………………………………………………….. SU3-19
Process Management………………………………………………………………………………………. SU4-6
Shell Script stopprocess………………………………………………………………………………….. SU4-8
ZFS Installation…………………………………………………………………………………………….. SU5-12
Adding HDD………………………………………………………………………………………………… SU5-14
Implementing ZFS for Fault Tolerance………………………………………………………….. SU5-15
Monitoring Processes and Memory………………………………………………………………… SU6-4
Monitoring Disk Usage…………………………………………………………………………………… SU6-6
Monitoring Log Files………………………………………………………………………………………. SU6-7
ix
List of Lesson Recordings
Implementing Disk Quota using ZFS……………………………………………………………. SU6-10
x
Course
Guide
Operating System
ICT246
Course Guide
1. Welcome
Presenter: Tan Kheng Teck
This streaming video requires Internet connection.
Access it via Wi-Fi to avoid incurring data charges on your personal mobile plan.
Click here to watch the video. i
Welcome to the course ICT246 Operating Systems, a 5 credit unit (CU) course.
This Study Guide will be your personal learning resource to take you through the course
learning journey. The guide is divided into two main sections – the Course Guide and
Study Units.
The Course Guide describes the structure for the entire course and provides you with an
overview of the Study Units. It serves as a roadmap of the different learning components
within the course. This Course Guide contains important information regarding the
course learning outcomes, learning materials and resources, assessment breakdown and
additional course information.
i


CG-2
ICT246
Course Guide
2. Course Description and Aims
This course provides the fundamental knowledge and skills for the students to
understand modern operating systems. Students will recognize how operating systems
are an essential part of any computer system by learning the core functions of an
operating system that includes memory management, process management, file system
management and device management. Through hands-on lab practice using virtual
machines on basic system management and security in Linux operating system, students
are not only able to understand the benefits of operating system virtualization, but are
also able to gain the basic background in system administration. Students can know
how the hypervisor technology create virtual machines and manage the guest operating
systems running in them. Students also learn how mobile operating systems are designed
to manage the features of mobile devices.
Course Structure
This course is a 5-credit unit course presented over 6 weeks.
There are six Study Units in this course. The following provides an overview of each Study
Unit.
Study Unit 1 – Introduction to Operating Systems and Virtualisation
This unit introduces what an operating system is and what are the core functions that an
OS should provide. As this is the first unit, it only introduces the overview of an OS. Some
of the core functions such as process management, file system management, security, etc.
will be briefly described, but the details will be covered in the subsequent study units.
This unit also describes virtualisation technology which is widely used in the industry,
and it includes hands-on activities in using virtual machine.
CG-3
ICT246
Course Guide
Study Unit 2 – Linux Operating System and File System Management
This unit introduces Linux Operating System (OS) and the core functions of an OS to
manage the file system. In completing this unit, you will be equipped with the knowledge
of Linux OS and file system management, as well as hands-on experience in working with
Linux OS and file system.
Study Unit 3 – Access Control and System Security
This unit will cover system security and access control, which is an important aspect in the
modern OS. Different access control methods will be discussed, especially in file system
access. Different threats and countermeasures in system security will also be discussed.
Study Unit 4 – Process and Memory Management
This unit covers process management, which is one of the fundamental concepts in OS.
Process states, deadlock and scheduling will be discussed. This unit also focuses on
memory management, which includes memory partitioning and paging.
Study Unit 5 – Device Management and Fault Tolerance
This unit describes device management, particularly focusing on disk. This unit also
describe fault tolerance, such as RAID system. Hands-on will be provided using Z File
System (ZFS) to implement fault tolerance.
Study Unit 6 – System Management and Mobile Operating Systems
This unit covers system management which includes system monitoring and disk quota.
This unit will also discuss two popular mobile operating systems, Android OS and iOS.
CG-4
ICT246
Course Guide
3. Learning Outcomes
Knowledge & Understanding (Theory Component)
By the end of this course, you should be able to:
• Explain the core functions of an operating system
• Contrast the layers of an operating system
• Describe how the processes, threads and memory are managed
• Compare the different types of mobile operating systems
Key Skills (Practical Component)
By the end of this course, you should be able to:
• Demonstrate the creation and usage of virtual machine
• Execute system tasks in Linux operating system
• Implement system security and access control in Linux operating system
CG-5
ICT246
Course Guide
4. Learning Material
The following is a list of the required learning materials to complete this course.
Required Textbook(s)
Stallings, W. (2018). Operating systems: Internals and design principles (9th ed.). New
York City, NY: Pearson. Retrieved from https://online.vitalsource.com/
books/9781292214306/pageid/0
Other recommended study material (Optional)
Nil
Website(s):
Nil
CG-6
ICT246
Course Guide
5. Assessment Overview
The overall assessment weighting for this course is as follows:
Assessment
Assignment 1
Description
Pre-Class Quiz (PCQ)
Weight Allocation
6%
There are 3 PCQ (each with 2% weightage)
to be completed before students attend
class
Assignment 2
Online Quiz
6%
Assignment 3
Tutor-Marked Assignment (TMA)
18%
Examination
Closed book exam
70%
TOTAL
100%
The following section provides important information regarding Assessments.
Continuous Assessment:
There will be continuous assessment in the form of 3 assignments which include 3 PreClass Quiz (PCQ), an Online Quiz and a Tutor-Marked Assignment (TMA). In total, this
continuous assessment will constitute 30 percent of overall student assessment for this
course. All 3 assignments are compulsory and are non-substitutable. These assignments
will test conceptual understanding of both the fundamental and more advanced concepts
and applications for this course. It is imperative that you read through your Assignment
questions and submission instructions before embarking on your Assignment.
CG-7
ICT246
Course Guide
Examination:
The final (2-hour) written exam will constitute the other 70 percent of overall student
assessment and will test the student’s understanding of OS-related concepts, theories and
hands-on situations. All topics covered in the course outline will be examinable.
Passing Mark:
To successfully pass the course, you must obtain a minimum passing mark of 40 percent
for each of the two components. That is, students must obtain at least a mark of 40 percent
for the combined assessments and also at least a mark of 40 percent for the final exam. For
detailed information on the Course grading policy, please refer to The Student Handbook
(‘Award of Grades’ section under Assessment and Examination Regulations). The Student
Handbook is available from the Student Portal.
Non-graded Learning Activities:
Activities for the purpose of self-learning are present in each study unit. These learning
activities are meant to enable you to assess your understanding and achievement of the
learning outcomes. The type of activities can be in the form of Quiz, Review Questions,
Application-Based Questions or similar. You are expected to complete the suggested
activities either independently and/or in groups.
CG-8
ICT246
Course Guide
6. Course Schedule
To help monitor your study progress, you should pay special attention to your
Course Schedule. It contains study unit related activities including Assignments, Selfassessments, and Examinations. Please refer to the Course Timetable in the Student Portal
for the updated Course Schedule.
Note: You should always make it a point to check the Student Portal for any
announcements and latest updates.
CG-9
ICT246
Course Guide
7. Learning Mode
The learning process for this course is structured along the following lines of learning:
a.
Self-study guided by the study guide units. Independent study will require at
least 3 hours per week.
b.
Working on assignments, either individually or in groups.
c.
Classroom Seminar sessions (3 hours each session, 6 sessions in total).
iStudyGuide
You may be viewing the iStudyGuide version, which is the mobile version of the
Study Guide. The iStudyGuide is developed to enhance your learning experience with
interactive learning activities and engaging multimedia. Depending on the reader you are
using to view the iStudyGuide, you will be able to personalise your learning with digital
bookmarks, note-taking and highlight sections of the guide.
Interaction with Instructor and Fellow Students
Although flexible learning – learning at your own pace, space and time – is a hallmark
at SUSS, you are encouraged to engage your instructor and fellow students in online
discussion forums. Sharing of ideas through meaningful debates will help broaden your
learning and crystallise your thinking.
Academic Integrity
As a student of SUSS, it is expected that you adhere to the academic standards stipulated
in The Student Handbook, which contains important information regarding academic
policies, academic integrity and course administration. It is necessary that you read and
understand the information stipulated in the Student Handbook, prior to embarking on
the course.
CG-10
Study
Unit
1
Introduction to Operating Systems
and Virtualisation
ICT246
Introduction to Operating Systems and Virtualisation
Learning Outcomes
By the end of this unit, you should be able to:
1.
Describe an operating system and why it is needed
2.
Describe the important functions of operating systems
3.
Describe what virtualisation technology is
4.
Differentiate the types of virtualisation
5.
Install a hypervisor
6.
Compare the booting up process of Windows OS and Linux OS
7.
Install a Linux machine
SU1-2
ICT246
Introduction to Operating Systems and Virtualisation
Overview
Understanding operating system (OS) is one of the fundamentals that an IT Professional
should know. Without OS, the applications will have to directly talk to the hardware,
which is a very difficult task. This unit separates into two main parts: overview of OS, and
virtualisation.
In overview of OS, it introduces what an operating system is, what are the core functions
that an OS should provide. As this is the first unit, it only introduces the overview of an
OS. Some of the core functions such as process management, file system management,
security, etc. will be briefly described, but the details will be covered in the subsequent
study units.
In virtualisation, it describes virtualisation technology which is widely used in the
industry. Students will have a chance to install a hypervisor, and practise installing a Linux
operating system. In our case, we will use Oracle VM VirtualBox as the hypervisor, and
Debian as the Linux operating system.
This unit will equip students with the knowledge of what an OS is, and hands-on
experience in using virtual machine.
SU1-3
ICT246
Introduction to Operating Systems and Virtualisation
Chapter 1: Overview of Operating Systems
This chapter introduces operating systems, why operating systems are needed, and
describes the core functions of operating systems.
1.1 Introduction to Operating Systems
1.1.1 Why should you study operating systems?
The simple answer is operating systems (OS) are everywhere, and in modern life, many
of us are using OS every day which we may not be aware. Many people are familiar with
using Microsoft Windows OS, and that is the impression of what an operating system is.
You are possibly using Windows 10 now, and may have used Windows 7 and windows
XP before. However, some of you may not be aware that many devices also consist of
operating systems, such as mobile phone, smart TV, ATM machines, wireless routers, and
even self-service check-out machines that we have used in the supermarket. Thus, to be a
proficient Info communication and technology (ICT) professional, you need to know more
than what a layman know about OS.
Activity 1
Find out what devices you are using are having an OS, and find out what is its OS
(e.g. Android, Windows, etc.).
Discuss which of the following devices need to have an OS:
• Digital alarm clock
• AXS machine
SU1-4
ICT246
Introduction to Operating Systems and Virtualisation
1.1.2 Why are operating systems needed in computer or other devices?
A computer system can be divided into four components as shown in Figure A computer
system. The hardware which consists of Central Processing Unit (CPU), memory and
Input/Output (I/O) devices provides the basic computing resources for the systems. In a
modern computer, long-term storage such as hard disk is one of the important components
to allow the users to store their files. The application programs such as web browsers, and
word processing software define how the computing resources are used to solve the user
problems. The operating system controls the hardware and coordinates its use among the
various application programs for the users.
We can also view operating system as a software which handles the interface (I/O) to
computer hardware, schedules tasks, allocates storage, and presents a common interface
to the user. In short, operating system is a middle man that talks to both hardware
and application program. Without operating system, the application program will need
to manage the hardware directly, which is a difficult task. The user generally uses the
application program to perform a specific task (e.g. the creation of this study unit is done
using Microsoft Word, which is an application program).
User
Application
Operating System
Hardw are
Figure 1.1 A computer system
Let us imagine a world without OS. It means the application software will have to interact
directly with the computer hardware. Let us discuss a scenario that you need to create
a text editing application without having an operating system. That means your text
SU1-5
ICT246
Introduction to Operating Systems and Virtualisation
editing application will have to communicate directly with the hardware. So, the text
editing application will need to get input from the input devices (such as keyboard and
mouse), and the text editing application will need to output characters to the screen.
These are not trivial tasks, and don’t forget that you also need to cater for other devices
such as thumbdrive and printer. These tasks are getting very challenging without OS.
Therefore, OS shields the application developers from all these non-trivial tasks and focus
on developing the main application functions.
Activity 2
Describe the following components using your own words:
• Hardware
• Operating System
• Application Program
List the hardware, operating system, and application programs in your personal
notebook.
List 5 examples for each of the following components:
• Hardware
• Operating System
• Application Program
1.1.3 Operating systems in the real world
Now we know that operating systems are needed in many devices. How about the
different operating systems in the market? You know that this study unit is created using
an application program, which is Microsoft Word. The Microsoft Word is running on an
operating system; in this case, it is Windows 10. For Windows OS alone, there are many
SU1-6
ICT246
Introduction to Operating Systems and Virtualisation
different client versions, such as Windows 10, Windows 8, Windows 7 and so on. For the
server versions, there are Windows 2016, Windows 2012, Windows 2008, etc.
For Linux, there are many distributions such as Debian, Ubuntu, Redhat, etc. We’ll discuss
more in Linux in Study Unit 2. Linux is an OS that is popular in the server space, and
many of the data centres in the world are using Linux as their servers’ OS. Windows is a
popular operating system in Desktop and Laptop, although many servers are also running
Windows Server OS. Mac OS is gaining popularity although it is still considered in a niche
area in the Desktop and Laptop area. For mobile devices, most of the phones are powered
by Android and iOS.
Activity 3
Using the search engine, find out the market share of the various operating systems
in different areas (such as mobile, desktop, etc.). Some websites that give you market
statistics are:
https://netmarketshare.com/
http://gs.statcounter.com/
1.2 Core Functions of Operating Systems
1.2.1 Operating System objectives and functions
There are three objectives that an OS must fulfil. Convenience (it makes a computer easier
to use), efficiency (it makes efficient use of the system resources), and ability to evolve
(it permits effective new systems to be introduced).
Let us now look at each of these three aspects:
Convenience – The Operating System as a user/computer interface
SU1-7
ICT246
Introduction to Operating Systems and Virtualisation
Usually, the end users are not concerned with the details of the hardware. Thus, an OS
needs to handle the hardware for the users. OS also needs to make the job of an application
programmer easier by providing services that the programmer can use. Typically, OS
provides services in the following areas:
Program execution – OS handles the execution of program and process, and scheduling
of resources
Access to I/O devices – OS handles the hardware and provides simple read/write for the
different hardware devices
Controlled access to files – OS provides file management services as well as providing
mechanism of access control to files and folders
System access – OS resolves conflict for resource contention as well as control access to
the system
Error detection and response – OS handles varies errors conditions such as issues in
executing program
Accounting – OS monitors performance and provides statistics for the users to view
Efficiency – The Operating System as a Resource Manager
OS needs to control the use of a computer’s resources, such as input devices and output
devices, both main and secondary memory, and processor execution time. It is a software,
and it needs to be executed by the processor. Thus, it needs to hand over control when
necessary to other application programs, and it depends on the processor to let it regain
control. Thus, we can treat OS as a special software as compared to application programs.
Ability to evolve – Ease of Evolution of an Operating System
A major OS will evolve for the following reasons:
Hardware upgrades / new types of hardware – e.g. touchscreen
New services – e.g. new management tools
Fixes – e.g. new patches (such as the Windows patches)
SU1-8
ICT246
Introduction to Operating Systems and Virtualisation
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 69-73.
Activity 4
Think of an analogy that can explain what an operating system is. Be prepared to
discuss your analogy with your fellow classmates during the face-to-face meet up.
Take a look at the following video to give you some ideas:
https://www.lynda.com/Windows-tutorials/Essential-analogies-operatingsystem/659670/669265-4.html
1.2.2 The evolution of operating systems
To understand OS, it is best to start with how OS evolves throughout the years.
In the earlier days, computers do not have a real OS; thus, the programmer needs
to interact directly with the hardware, which is very tedious and not convenient. We
called this serial processing as the users accessed the computer in series. Over the years,
something called simple batch system is developed, which is an early version of the
modern OS. As the simple batch system has an OS, the users do not need to directly deal
with the hardware, and thus it is more convenient to use.
Although the simple batch system improves the usage of the computer, it is not efficient
as the processor is often idle and not used. This is because the Input/Output (I/O) devices
SU1-9
ICT246
Introduction to Operating Systems and Virtualisation
are much slower as compared to the processor. Thus, multiprogrammed batch system is
developed which improves the efficiency of the computer.
In Figure Uniprogramming, we have a uniprogramming situation, such that there is only
one program, which is program A, and the processor will execute until it hits an I/O
operation, and it has to wait. Notice that the wait period is much longer as the I/O speed
is usually much slower as compared to the processor.
Figure 1.2 Uniprogramming
(Source: Figure 2.5(a) of textbook)
In Figure Multiprogramming, we have a multiprogramming situation, such that there are
two programs A and B. If program A hits an I/O operation, program B can execute, and
vice versa, and thus it improves the overall efficiency of the system.
Figure 1.3 Multiprogramming
(Source: Figure 2.5(b) of textbook)
Although the multiprogramming batch system improves the efficiency of the processor,
it does not handle interactive jobs. Thus, time-sharing system is developed, and it is
SU1-10
ICT246
Introduction to Operating Systems and Virtualisation
used to handle multiple interactive jobs. In time-sharing system, multiple users share the
processor time, and the OS interleave the execution of each user program in a short burst
of time.
Multiprogramming is used in both batch processing and time sharing. In batch processing,
the processor usage is maximised, and Job Control Language (JCL) commands are
provided with the job. Note that JCL is an old language and it is still being used in
mainframe system, which is used in some large organisations in the world. In time sharing
system, the response time is minimised, and commands are entered at the terminal.
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 73-83.
Activity 5
Draw a diagram to illustrate a multiprogramming batch system that is running four
programs.
1.2.3 Major achievements in Operating Systems
Operating system is a complex software that provides many services. Four important core
functions have advanced throughout the years, and thus we have the modern operating
systems.
The four advances are:
• Processes
SU1-11
ICT246
Introduction to Operating Systems and Virtualisation
• Memory management
• Information protection and security
• Scheduling and resource management
Processes
We can think of a process as a running program (or executable program). Technically,
a process consists of three components, an executable program, the associated data
needed by the program, and the execution state. Understanding process is important to
understand how OS works. We’ll discuss process in detail in Study Unit 4.
Activity 6
How do you look at what processes are running in your Windows system? Test it
using your own Windows system.
Memory Management
Memory management is an important aspect in OS. Modern OS uses virtual memory,
which allows programs to address memory from a logical point of view, without needing
to know the physical amount of main memory. We’ll discuss concepts such as paging in
Study Unit 4, which is important in understanding memory management.
Activity 7
How do you look at the memory usage of your Windows system? Test it using your
Windows system.
SU1-12
ICT246
Introduction to Operating Systems and Virtualisation
Information Protection and Security
Security is another aspect which is gaining concern in recent years. Authentication and
Access control on modern OS are important aspects to defence the system. We’ll discuss
security in Study Unit 3.
Scheduling and Resource Management
OS is responsible to manage the various resources and schedule the usage of the resources
to the various processes. We’ll discuss some issues in Study Unit 4.
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 83-91.
SU1-13
ICT246
Introduction to Operating Systems and Virtualisation
Chapter 2: Virtualisation
This chapter introduce virtualisation, the different types of virtualisation, and briefing on
the booting process as well as installation of a Linux operating system.
2.1 Introduction to Virtualisation
2.1.1 What is virtualisation?
Many people have heard of the word virtualise, such as memory virtualisation,
virtual machines, etc. However, do you know what exactly virtualisation is? The word
virtualisation generally means that we are creating a virtual version of a device or
resource, and that device or resource can be an operating system, server, or even network.
Thus, virtualisation can mean different things to different professionals.
2.1.1.1 What is a virtual machine?
Some of you may have used virtual machines before. So, what exactly is a virtual machine?
A machine installed with virtualisation software can run several similar or different OS,
and thus the host OS can support a number of virtual machines (VM). So, what exactly
makes virtualisation work? What we need is a software called hypervisor, which sits
between the hardware and the VM, and manages the resources. Figure Virtualisation
illustrates virtualisation in general. The virtualising software sits on top of the hardware,
and it provides abstraction of the hardware resources such as processor, storage, and
network. Thus, multiple virtual machines can sit on top of a single host machine.
SU1-14
ICT246
Introduction to Operating Systems and Virtualisation
Figure 1.4 Virtualisation
(Source: Figure 14.1 of textbook)
Each machine will run an OS, and we called it guest OS. If you have installed VirtualBox
in your Windows 10 machine, and you used VirtualBox to install another guest OS such as
Debian, your Debian is your guest OS, and your Windows 10 is your host OS. VirtualBox
in this case will be your hypervisor.
Companies used hypervisor for various reasons. Some of the reasons are stated below:
Consolidation — A server can run multiple VM and thus improves its efficiency by
sharing its resources (such as processor, RAM, etc.).
Rapid development – A new VM can be deployed in a very short time span as VM consists
of files, which are easy to copy.
SU1-15
ICT246
Introduction to Operating Systems and Virtualisation
Ease of management – VM facilitates deployment, and software could be tested easily. You
should have heard of the term cloud computing. Virtualisation is one of the technologies
that support cloud computing, and many of the data centres in the world are now using
virtual machines.
A virtual machine is a software that has the characteristics of a physical machine. It is
configured with the necessary hardware, such as processor, RAM, storage space, and
network interfaces. We can switch on a VM, just like switching on a physical machine.
However, this VM that is turned on will only see the resources that are allocated to it (such
as 1 single-core processor, 2 GB RAM, 10 GB harddisk space, and a network interface), and
it will not see the full resources that the physical machine is having (such as 8 quad-core
processors, 32 GB RAM, 4 TB harddisk space, and 2 network interfaces). Thus, it allows the
physical machine to host many virtual machines, each of which will be allocated limited
hardware resources, as well as run an OS. This also contributes to building a green data
centre as it is using less electricity (for example, 1 large physical server that is hosting 8
VM is using less energy than 8 smaller physical servers).
A VM typically consists of several files, and usually there is a configuration file that
describes the attributes (such as the RAM size, network interfaces, etc.) of the VM. In
VirtualBox, the configuration file is with the extension of .vbox, and the actual OS file is
with the extension of .vdi. For vmware workstation, which is another popular hypervisor,
the configuration file is using the extension of .vmx, and the actual OS file is using the
extension of .vmdk. As virtual machines are only files, backing up and restoring of virtual
machine are thus simpler and faster than physical machines.
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 628-632.
SU1-16
ICT246
Introduction to Operating Systems and Virtualisation
Activity 8
Describe the advantages in using virtual machines for an organisation.
2.2 Different types of virtualisation
We can classify virtual machines by looking at the concepts of hypervisor. Remember
that OS acts like a middle man between hardware and application program? In a similar
manner, hypervisor is a middle man between the guest OS and the physical host machine.
Figure Types of hypervisor shows that two types of hypervisor exist, and they are
differentiated by whether there is an additional OS between the hardware and the
hypervisor.
Figure 1.5 Types of hypervisor
(Source: Figure 14.2 of textbook)
Type 1 Hypervisor
Type 1 Hypervisor is very similar to how an OS is added to the hardware. The type 1
hypervisor can directly control the hardware such as processor and RAM. It also allows
SU1-17
ICT246
Introduction to Operating Systems and Virtualisation
VM to be installed on it directly. Type 1 hypervisor usually has good performance as it
eliminates one additional layer. Some of the popular products that are considered type
1 hypervisor, or sometimes we called it bare metal hypervisor, are VMware ESXi, and
Microsoft Hyper-V.
Type 2 Hypervisor
Type 2 Hypervisor is installed as a software and sits above the Host operating system.
The type 2 hypervisor needs to go through the host OS to talk to the hardware. Type 2
hypervisor usually has lesser performance as compared to type 1 hypervisor. Some of the
popular products that are considered type 2 hypervisor are Oracle VM VirtualBox (which
you will install it in a short while), and VMware Workstation.
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 631-634.
Activity 9
Note that there is no definite classification of virtual machines, and different vendors
may have their own classifications.
Describe the key differences between type 1 and type 2 hypervisors.
Look at the following website, and describe the different classifications made by
Redhat and Vmware
https://www.redhat.com/en/topics/virtualization/what-is-virtualization
https://www.vmware.com/solutions/virtualization.html
SU1-18
ICT246
Introduction to Operating Systems and Virtualisation
Activity 10
Now, we are ready to install Oracle VirtualBox. If you have not used it before, Oracle
VirtualBox is a type 2 hypervisor that you can install on your host machine, and you
can use VirtualBox to create guest machine. In our case, we’ll install Linux Debian
as your guest OS, which we’ll perform in section 2.4. Now, let us first install Oracle
VirtualBox in the host machine.
Download Oracle VirtualBox from the following link:
https://www.virtualbox.org/wiki/Downloads
Click on ‘Windows hosts’ (assuming that you are running a Windows OS such as
Windows 10). Download the file and start the installation of VirtualBox. Watch the
video on installation of Oracle VirtualBox below:
Watch

(How to Install VirtualBox on Windows 10)
Let us start to create a new guest machine, but without installation of the OS yet.
Follow the steps below:
1.
Start Oracle VirtualBox, click on New
2.
In Name, type in your initial (My initial is tkt), select ‘Linux’ in Type, and
select ‘Debian (64 –bit)’ in Version
SU1-19
ICT246
Introduction to Operating Systems and Virtualisation
3.
Set base memory size as 1024MB
4.
Select ‘Create a virtual hard disk now’, click ‘Create’
5.
Select ‘VDI (VirtualBox Disk Image)’
SU1-20
ICT246
Introduction to Operating Systems and Virtualisation
6.
Select ‘Dynamically Allocated’
7.
Select ‘8GB’ for the virtual hard disk size, click ‘Create’
8.
You have successfully created your first virtual machine!
9.
Select your virtual machine (your initial), and click ‘Settings’, this is the place
that you can change the machine settings
SU1-21
ICT246
Introduction to Operating Systems and Virtualisation
10.
Explore the different settings. How do you change the processor, RAM, and
hard disk settings?
11.
Start your virtual machine. Are you able to boot up this virtual machine?
Why?
2.3 Booting Process of Operating Systems
Have you wondered when you press the Power ON button on your computer, how the
machine knows where to find your Windows OS? The procedure of loading the OS is
known as booting the system. On most computers, bootstrap program, which is a small
piece of code, is responsible to find the OS, and starts it from the main memory (aka RAM).
For personal computer, the bootstrap program is usually stored in Read Only Memory
(ROM), and the OS on secondary storage (aka Hard drive). Once the computer is turned
on, the processor will execute the bootstrap program from Basic Input/Output System
(BIOS), and we can call this bootstrap program as first stage boot-loader. This boot loader
will in turn execute the code from the boot block stored in hard drive. The code from the
boot block (we can call it second stage boot-loader) will then start the OS, and thus the OS
will take over and your Windows will start, and necessary drivers will be loaded.
Windows booting process
In Windows, when you power up the computer, the bootstrap program in BIOS will
search for the OS, and it will execute the second-stage bootloader which is Windows Boot
SU1-22
ICT246
Introduction to Operating Systems and Virtualisation
Manager. Windows Boot Manager is installed on the active partition of the hard disk, and
it will then start the OS.
Linux booting process
In Linux, when you power up the computer, the bootstrap program in BIOS will search
for the OS, and it will execute the second-stage bootloader which is GNU GRand Unified
Bootloader (GRUB). GRUB is fit in the Master Boot Record (MBR) and it will then starts
the OS.
Activity 11
Describe the differences between booting process of Windows and that of Linux
system.
2.4 Installation of a Linux Machine
We’ll discuss Linux operating systems in Study Unit 2, and we are only to discuss the
installation of a typical Linux operation system here. Installation of a general Linux
operating system is straight forward, and usually you will follow the following steps:
• Download the Linux distribution (for our case, we are going to use Debian)
• Start the installation process (for our case, we are starting the installation process
in VirtualBox)
• Create a username and password (most distributions will require you to create your
username and password)
• Partitioning if necessary (since we are in the VirtualBox environment, this is going
to be straight forward, and it will not mess up your host Windows operating system.
However, if you are performing task such as dual-booting, then you will have to
make another partition, and remember not to overwrite your original Windows
operating system!)
SU1-23
ICT246
Introduction to Operating Systems and Virtualisation
• Boot up your Linux operating system
Activity 12
As you already have the VirtualBox setup, you will now install a Debian Linux
operating system.
Download Debian iso file (debian-9.4.0-amd64-netinst.iso) from the following link:
http://cdimage.debian.org/mirror/cdimage/archive/9.4.0/amd64/iso-cd/
Remember we’ve already created a virtual machine but we haven’t started the
installation of Debian. We have to point to the .iso file that you have downloaded.
Select your virtual machine (your initial), select ‘Settings’, and select ‘Storage’. Now,
select
, and select ‘Choose Disk’ and select the .iso file. Start the installation of
Debian. (follow the video on installation of Debian below)
Lesson Recording
Installation of Debian
Once the installation is done, login to your Debian system. Restart the machine by
selecting the icon
select
and click on “Restart”. When you see the GRUB start,
hit enter, and you will see a screen as follows:
SU1-24
ICT246
Introduction to Operating Systems and Virtualisation
Note the GRUB (section 2.3) allows us to boot into another operating system. In this
case, we’ll select Debian GNU/Linux, which is the default. Let the system boot up,
and once the system is booted up, shutdown the system by selecting the icon
select
and click on “Power Off”.
We will explore this Linux system in Study Unit 2.
SU1-25
ICT246
Introduction to Operating Systems and Virtualisation
Summary
In this study unit, you have learnt why an operating system (OS) is needed in the modern
computer, and what the core functions of OS are. As OS is needed in many devices, and
it is the fundamental knowledge that you should know as an ICT professional, you will
benefit from knowing OS no matter which domain in ICT that you will focus on in the
future.
Virtualisation is one of the important concepts that are widely used, and it is important
that you learn what a virtual machine is. Make sure that you have installed the Oracle
VirtualBox, and have installed Debian OS using the VirtualBox. We’ll start to use your
newly installed Debian OS in the next study unit to have some hands-on in Linux
operation, as well as having a deeper understanding in OS.
SU1-26
ICT246
Introduction to Operating Systems and Virtualisation
Formative Assessment
1.
Which is NOT an OS?
a. Suse Linux
b. Unix
c. Windows Server 2016
d. Safari
2.
Which is an OS that is popular to be used as server OS?
a. Android
b. Linux
c. iOS
d. Windows 10
3.
Which is NOT a function provided by OS?
a. Provides connection to Internet
b. Access to I/O devices
c. Controlled access to files
d. Program execution
4.
Multiprogramming is used in ___________________.
a. batch system only
b. time sharing system only
c. both batch system and time sharing system
d. none of batch system and time sharing system
5.
Which is NOT true for a process?
a. A process is a program in execution
b. A process is an instance of a program
SU1-27
ICT246
Introduction to Operating Systems and Virtualisation
c. A process is the entity that can be executed on a CPU
d. A process does not need to use memory
6.
Which is a type 1 Hypervisor?
a. VMware Workstation
b. VMware Player
c. VMware ESXi
d. Oracle VirtualBox
7.
Which is NOT a reason that virtual machine is used in organization?
a. Increase performance of machine
b. Rapid deployment
c. Legacy hardware
d. Testing of software
8.
A hypervisor sits between the ________________.
a. hardware and the application
b. application and the virtual machine
c. hardware and the virtual machine
d. guest operating system and the application
9.
What is a first-stage boot loader?
a. Bootstrap program stored in main memory
b. Bootstrap program stored in BIOS
c. Bootstrap program stored in hard drive
d. Bootstrap program stored in boot loader from hard drive
10. Which is FALSE for GRUB?
a. Grub allows boot into Debian OS
b. Grub allows boot into Windows 10 OS
SU1-28
ICT246
Introduction to Operating Systems and Virtualisation
c. Grub allows dual-boot but NOT multi-boot
d. Grub allows multi-boot
11. Which is an operating system?
a. Mozilla Firefox
b. Microsoft Word 2016
c. Suse Linux
d. Seagate barracuda 2TB
12. All of the following are core functions of operating system except __________.
a. Memory Management
b. Process Management
c. File Management
d. Browsing the Internet
13. Type 1 hypervisor is different from type 2 hypervisor because __________.
a. Type 1 hypervisor requires an additional OS between the hardware and the
hypervisor whereas type 2 hypervisor doesn’t
b. Type 1 hypervisor does NOT require an additional OS between the hardware
and the hypervisor whereas type 2 hypervisor does need an additional OS
c. Type 1 hypervisor usually has lesser performance as compared to type 2
hypervisor
d. Type 1 hypervisor usually is easier to implement as compared to type 2
hypervisor
14. Which is NOT a common step to perform when installing a Linux operating system?
a. Installation of Microsoft Office
b. Partitioning if necessary
c. Download the Linux distribution
d. Create a user name and password
SU1-29
ICT246
Introduction to Operating Systems and Virtualisation
Solutions or Suggested Answers
SU1-Chapter 1 Activity 1
Answers vary.
Possible answers from students could be desktop PC, notebook, mobile phone, etc.
Operating system could be Windows 10, Android, iOS, etc.
• Analog alarm clock – No OS needed as it only needs to have mechanical mechanism
• AXS machine – OS needed as it has relatively complex tasks, possibly running a
specific distribution of Linux
SU1-Chapter 1 Activity 2
Answers vary on how students describe hardware, operating system, and application
program.
Answers vary on what students list in their personal notebook.
Answers vary on listing the examples; possible answers are:
• Hardware: processor, RAM, hard disk, motherboard, mouse, etc.
• Operating System: Windows 10, Debian, Ubuntu, Redhat, Solarix, etc.
• Application Program: Microsoft Words, Microsoft Excel, Microsoft Powerpoint,
Google Chrome, Adobe Reader, etc.
SU1-Chapter 1 Activity 3
Depends on what students’ research is on. This is to find out what popular OS are being
used.
SU1-30
ICT246
Introduction to Operating Systems and Virtualisation
SU1-Chapter 1 Activity 4
No particular answers. The important thing is to relate the analogies to the functions of
OS.
SU1-Chapter 1 Activity 5
The diagram will be similar to Figure 1.3 with Run A, B, C, D and shorter wait time.
SU1-Chapter 1 Activity 6
In your Windows system, bring up the Task Manager (press Ctl-Alt-Del) and select the
Processes tab to look at what processes are running in your system.
SU1-Chapter 1 Activity 7
In your Windows system, bring up the Task Manager (press Ctl-Alt-Del), select the
Performance tab to look at the memory usage of your system.
SU1-Chapter 2 Activity 8
Besides consolidation, rapid development, ease of management, other advantages could
be:
SU1-31
ICT246
Introduction to Operating Systems and Virtualisation
Legacy hardware, versatility, aggregating, dynamics, increased availability (details in
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed., page
630).
SU1-Chapter 2 Activity 9
Key differences between type 1 and type 2 hypervisors:
• Type 1 hypervisor performs better than type 2 hypervisor
• Type 1 hypervisors are more secured than type 2 hypervisor
(details in William Stallings (2018). Operating Systems: Internals and Design Principles,
9th Ed., pages 632-634)
Look at the website of redhat and vmware. Note that redhat classified as desktop
virtualisation, server virtualisation, operating system virtualisation whereas vmware
classified as desktop virtualisation and server virtualisation.
SU1-Chapter 2 Activity 10
10. Explore the different settings. How do you change the processor, RAM, and hard disk
settings?
Virtual Machine > Settings > System > Motherboard
You can change the Base Memory (RAM)
Virtual Machine > Settings > System > Processor
You can change the number of Processors
Virtual Machine > Settings > System > Storage
You can add new Hard disk
SU1-32
ICT246
Introduction to Operating Systems and Virtualisation
11. Start your virtual machine. Are you able to boot up this virtual machine? Why?
You are not able to boot up this virtual machine as the OS is not installed yet.
SU1-Chapter 2 Activity 11
Basically, Windows is using Windows Boot Manager and Linux is using GRUB.
SU1-Chapter 2 Activity 12
Make sure you have successfully installed Debian as a virtual machine as we’ll start to use
this machine from Study Unit 2.
Formative Assessment
1.
Which is NOT an OS?
a.
Suse Linux
Incorrect. Suse Linux is a distribution of Linux, which is an OS. Refer to
section 1.1 of Study Unit 1.
b.
Unix
Incorrect. Unix is an OS that is commonly used for server. Refer to section
1.1 of Study Unit 1.
c.
Windows Server 2016
Incorrect. Windows Server 2016 is an OS for server. Refer to section 1.1 of
Study Unit 1.
d.
Safari
SU1-33
ICT246
Introduction to Operating Systems and Virtualisation
Correct. Safari is a browser, which is an application and not an OS. Refer
to section 1.1 of Study Unit 1.
2.
Which is an OS that is popular to be used as server OS?
a.
Android
Incorrect. Android is popular in the mobile OS. Refer to section 1.1 of Study
Unit 1.
b.
Linux
Correct. Linux is popular to be used as server OS. Refer to section 1.1 of
Study Unit 1.
c.
iOS
Incorrect. iOS is popular in the mobile OS. Refer to section 1.1 of Study Unit 1.
d.
Windows 10
Incorrect. Windows 10 is an OS for client machine. Refer to section 1.1 of
Study Unit 1.
3.
Which is NOT a function provided by OS?
a.
Provides connection to Internet
Correct. OS does not provide connection to the Internet. Refer to section
1.2 of Study Unit 1.
b.
Access to I/O devices
Incorrect. OS provides an interface to access the I/O devices. Refer to section
1.2 of Study Unit 1.
c.
Controlled access to files
Incorrect. OS provides file access management. Refer to section 1.2 of Study
Unit 1.
d.
Program execution
SU1-34
ICT246
Introduction to Operating Systems and Virtualisation
Incorrect. OS provides program and process management. Refer to section
1.2 of Study Unit 1.
4.
Multiprogramming is used in ___________________.
a.
batch system only
Incorrect. Multiprogramming is used in both batch system and time sharing
system. Refer to section 1.2 of Study Unit 1.
b.
time sharing system only
Incorrect. Multiprogramming is used in both batch system and time sharing
system. Refer to section 1.2 of Study Unit 1.
c.
both batch system and time sharing system
Correct. Multiprogramming is used in both batch system and time sharing
system. Refer to section 1.2 of Study Unit 1.
d.
none of batch system and time sharing system
Incorrect. Multiprogramming is used in both batch system and time sharing
system. Refer to section 1.2 of Study Unit 1.
5.
Which is NOT true for a process?
a.
A process is a program in execution
Incorrect. A process can be considered as a program in execution. Refer to
section 1.2 of Study Unit 1.
b.
A process is an instance of a program
Incorrect. A process is an instance of a program running on a computer. Refer
to section 1.2 of Study Unit 1.
c.
A process is the entity that can be executed on a CPU
Incorrect. A process is the entity that can be assigned and executed on a CPU.
Refer to section 1.2 of Study Unit 1.
SU1-35
ICT246
Introduction to Operating Systems and Virtualisation
d.
A process does not need to use memory
Correct. A process has an associated set of system resources which includes
memory. Refer to section 1.2 of Study Unit 1.
6.
Which is a type 1 Hypervisor?
a.
VMware Workstation
Incorrect. VMware Workstation is a type 2 hypervisor. Refer to section 2.2 of
Study Unit 1.
b.
VMware Player
Incorrect. VMware Player is a type 2 hypervisor. Refer to section 2.2 of Study
Unit 1.
c.
VMware ESXi
Correct. VMware ESXi is a type 1 hypervisor. Refer to section 2.2 of Study
Unit 1.
d.
Oracle VirtualBox
Incorrect. Oracle VirtualBox is a type 2 hypervisor. Refer to section 2.2 of
Study Unit 1.
7.
Which is NOT a reason that virtual machine is used in organization?
a.
Increase performance of machine
Correct. Virtual machine does not give increase performance of machine.
Refer to section 2.1 of Study Unit 1.
b.
Rapid deployment
Incorrect. Virtual machine can be deployed very fast. Refer to section 2.1 of
Study Unit 1.
c.
Legacy hardware
SU1-36
ICT246
Introduction to Operating Systems and Virtualisation
Incorrect. Virtual machine can be used to emulate legacy hardware. Refer to
section 2.1 of Study Unit 1.
d.
Testing of software
Incorrect. Virtual machine can facilitate testing of software. Refer to section
2.1 of Study Unit 1.
8.
A hypervisor sits between the ________________.
a.
hardware and the application
Incorrect. A hypervisor sits between the hardware and the VM. Refer to
section 2.1 of Study Unit 1.
b.
application and the virtual machine
Incorrect. A hypervisor sits between the hardware and the VM. Refer to
section 2.1 of Study Unit 1.
c.
hardware and the virtual machine
Correct. A hypervisor sits between the hardware and the VM. Refer to
section 2.1 of Study Unit 1.
d.
guest operating system and the application
Incorrect. A hypervisor sits between the hardware and the VM. Refer to
section 2.1 of Study Unit 1.
9.
What is a first-stage boot loader?
a.
Bootstrap program stored in main memory
Incorrect. Main memory cannot store bootstrap program. Refer to section 2.3
of Study Unit 1.
b.
Bootstrap program stored in BIOS
Correct. First-stage boot loader is a bootstrap program stored in BIOS.
Refer to section 2.3 of Study Unit 1.
SU1-37
ICT246
Introduction to Operating Systems and Virtualisation
c.
Bootstrap program stored in hard drive
Incorrect. This is refer to as second stage boot loader. Refer to section 2.3 of
Study Unit 1.
d.
Bootstrap program stored in boot loader from hard drive
Incorrect. This is refer to as second stage boot loader. Refer to section 2.3 of
Study Unit 1.
10. Which is FALSE for GRUB?
a.
Grub allows boot into Debian OS
Incorrect. Grub is able to boot into Debian OS. Refer to section 2.3 of Study
Unit 1.
b.
Grub allows boot into Windows 10 OS
Incorrect. Grub is able to boot into Windows 10 OS. Refer to section 2.3 of
Study Unit 1.
c.
Grub allows dual-boot but NOT multi-boot
Correct. Grub allows multi-boot, which includes dual-boot. Refer to
section 2.3 of Study Unit 1.
d.
Grub allows multi-boot
Incorrect. Grub allows multi-boot. Refer to section 2.3 of Study Unit 1.
11. Which is an operating system?
a.
Mozilla Firefox
Incorrect. Mozilla firefox is an application program. Refer to section 1.1.
b.
Microsoft Word 2016
Incorrect. Microsoft Word 2016 is an application program. Refer to section 1.1.
c.
Suse Linux
SU1-38
ICT246
Introduction to Operating Systems and Virtualisation
Correct. Suse Linux is a distribution of Linux, which is an OS. Refer to
section 1.1.
d.
Seagate barracuda 2TB
Incorrect. Seagate barracuda 2TB is a hard drive, which is a hardware. Refer
to section 1.1.
12. All of the following are core functions of operating system except __________.
a.
Memory Management
Incorrect. Memory management is a core function of OS. Refer to section 1.2.
b.
Process Management
Incorrect. Process management and program execution are core functions of
OS. Refer to section 1.2.
c.
File Management
Incorrect. File management is a core function of OS. Refer to section 1.2.
d.
Browsing the Internet
Correct. Browsing of Internet is the function of browser, which is an
application program, and is NOT a core function of OS. Refer to section 1.2.
13. Type 1 hypervisor is different from type 2 hypervisor because __________.
a.
Type 1 hypervisor requires an additional OS between the hardware and the
hypervisor whereas type 2 hypervisor doesn’t
Incorrect. Type 1 hypervisor does NOT require an additional OS but type 2
hypervisor does need. Refer to section 2.2.
b.
Type 1 hypervisor does NOT require an additional OS between the hardware
and the hypervisor whereas type 2 hypervisor does need an additional OS
Correct. Type 1 hypervisor does NOT require an additional OS but type 2
hypervisor does need. Refer to section 2.2.
SU1-39
ICT246
Introduction to Operating Systems and Virtualisation
c.
Type 1 hypervisor usually has lesser performance as compared to type 2
hypervisor
Incorrect. Type 1 hypervisor usually performs better. Refer to section 2.2.
d.
Type 1 hypervisor usually is easier to implement as compared to type 2
hypervisor
Incorrect. Type 1 hypervisor is usually more complex, and is more difficult
to implement. Refer to section 2.2.
14. Which is NOT a common step to perform when installing a Linux operating system?
a.
Installation of Microsoft Office
Correct. Installation of Microsoft Office (an application program) usually
is done only after installation of OS. It is NOT a common step. Refer to
section 2.4.
b.
Partitioning if necessary
Incorrect. Partitioning is a common step and it is necessary if we need to
make a specific partition for the Linux OS. Refer to section 2.4.
c.
Download the Linux distribution
Incorrect. Download the Linux distribution is a common step. Refer to section
2.4.
d.
Create a user name and password
Incorrect. Create a user name and password is a common step. Refer to
section 2.4.
SU1-40
ICT246
Introduction to Operating Systems and Virtualisation
References
Stallings, W. (2018). Operating systems internal and design principles (9th ed.). New York
City, NY: Pearson.
SU1-41
ICT246
Introduction to Operating Systems and Virtualisation
SU1-42
Study
Unit
2
Linux Operating System and File
System Management
ICT246
Linux Operating System and File System Management
Learning Outcomes
By the end of this unit, you should be able to:
1.
Illustrate what Linux operating system is
2.
Describe characteristics of Linux operating system
3.
Experiment with a distribution of Linux operating system (Debian)
4.
Describe file system structure
5.
Describe file directories
6.
Compare different methods of file allocation
SU2-2
ICT246
Linux Operating System and File System Management
Overview
Linux operating system (OS) is one of the commonly used OS in the world. Dealing with
files and folders is one of the important tasks that an OS provides. Thus, this unit proceeds
to discuss the Linux OS, as well as File system management.
In Linux OS, it introduces what Linux operating system is, and then you proceed to use the
Linux operating system. Note that we are using Debian that you have installed in Study
Unit 1. Thus, make sure that you have gone through Study Unit 1 before you proceed with
this study unit. Through the hands-on, you will understand some of the tasks that an OS
provides, and will grasp the concepts of an OS.
In file system management, which is one of the core functions of an operating system, file
structure, directories, and allocation methods will be discussed. Hands-on activities will
be provided for you to explore on Linux file system.
In completing this study unit, you will be equipped with the knowledge of Linux OS and
File system management, as well as hands-on experience in working on Linux OS and file
system.
SU2-3
ICT246
Linux Operating System and File System Management
Chapter 1: Overview of Linux Operating System
This chapter introduces Linux OS, its usage in the industry, as well as using a Linux OS.
1.1 Introduction to Linux Operating Systems
1.1.1 Why should you learn how to use Linux operating systems?
Besides Windows, Linux is another operating system which is widely used in many
areas. Linux is widely used in servers, and many data centres in the world are using
Linux servers. Besides widely used as servers, Linux is also popular among the different
embedded devices, such as in routers, and in different types of machines (see Figure Linux
OS in AXS machine and Figure Linux OS in self-check-out machine in supermarket).
Figure 2.1 Linux OS in AXS machine
SU2-4
ICT246
Linux Operating System and File System Management
Figure 2.2 Linux OS in self-check-out
machine in supermarket
1.1.2 Different distributions of Linux
A Linux distribution is an OS that is based on the Linux Kernel, and it usually comes
with a software collection. Different distributions of Linux usually are different in the way
on how they handle the different software collections (such as package management and
selection of packages). The Linux commands in the different distributions of Linux are
slightly different although the basic commands are very similar. For example, to install
software in Debian, you can use the command “apt-get install” but in Redhat, you need
to use “yum install” instead. However, as the basic commands (e.g. ls, cd, mkdir, cat, and
many more) are similar, if you have worked on Debian, you can switch to work on Redhat
with little learning curve. This means that if you use or manage a particular distribution
before, that makes it easy for you to switch to use or manage another distribution.
There are many different distributions of Linux, such as Redhat, Ubuntu, Debian, etc. As
what you have done in Study Unit 1, you have already installed a Debian distribution,
and we will start to use it in section 1.2.
SU2-5
ICT246
Linux Operating System and File System Management
1.1.3 Linux characteristics
Some people have the perception that Linux is for Geek and Windows is for general public.
This perception is arguable. Modern Linux system is very easy to use, and the Graphical
User Interface (GUI) for some Linux distributions is as user friendly as Windows systems.
However, most ICT professional managing Linux systems are well versed in using the
Linux commands, as the Linux commands are powerful and flexible.
In general, Linux has a modular architecture, and it has a collection of modules. A
module usually implements some specific functions (e.g. a device driver, or a file system).
Dynamic Linking and stackable modules are two important characteristics of Linux
modules.
Some of the important components in the kernel of Linux are processes and scheduler, file
systems, and virtual memory. Processes and scheduler manages the creating, terminating,
and scheduling of various processes. File systems provide a hierarchical methods for
folders, files as well as providing file system functions. Virtual memory manages the
virtual memory for the various processes.
Many Linux OS are open-sourced, thus it keeps evolving as many people around the
world are improving it.
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 113-118.
SU2-6
ICT246
Linux Operating System and File System Management
1.2 Using Linux Operating System
In Study Unit 1, we’ve discussed some of the core functions of an operating system. We’ll
look at how we can view some of these functions using Linux in this section. We can either
use GUI or use commands to manage a Linux OS, and we’ll look at both of these methods.
We’ve installed Debian with a GUI, which will aid in using some of the functions. In the
following activities, we’ll have a quick look at how you view the processes, file systems,
memory, etc. in Debian using GUI.
Lesson Recording
Using Debian Linux
Activity 1
Let’s start with using some of the GUI functions in Linux.
1.
Boot up your Debian VM machine.
2.
Click on Activities, in the Search Bar, and type “System Monitor” to bring
up the system monitor tool.
3.
On the Processes tab, you can look at the processes in your Linux system.
4.
On the Resources tab, you can look at the CPU and Memory utilisation.
5.
On the File System tab, you can look at the File systems in your Linux system.
You should be able to view an ext4, which is a type of Linux File systems. Comparing
this with your Windows System, what file system are you using for your C: drive?
SU2-7
ICT246
Linux Operating System and File System Management
One of the differences between Linux administrator and Windows administrator is the
ability for the Linux administrator to use the different commands in a Shell. Although
in Windows, you can also use commands in PowerShell, most Windows administrators
prefer to use the GUI. We will explore some of the basic Linux commands in Activity 2.
Activity 2
Let’s issue some commands in a terminal in your Debian VM machine.
1.
Click on Activities, in the Search Bar, type “Terminal” to bring up the
terminal tool. Note that ‘$’ is your shell prompt, and you can start to type
command after the shell prompt.
2.
Type ‘whoami’ to view which user you are login as.
3.
Type ‘man whoami’ to view the help for the command ‘whoami’ (‘man’
stands for manual, which is a help manual to understand the usage on the
different commands).
4.
Press ‘q’ to go back to the shell prompt.
5.
Type ‘pwd’ to check what is the folder you are in.
6.
Type ‘nano myfirstfile’ to create a file, type ‘Linux is a powerful OS’ and press
‘CTL-X’, followed by ‘Y’ and enter to save the file.
7.
Type ‘ls’ to list the content of your current folder.
8.
Type ‘cat myfirstfile’. What do you see?
9.
Explain what ‘nano’ is.
With some knowledge in working with the Shell, we’ll now view processes, file systems,
memory, etc. in Debian (just like what you have done in Activity 1), but now we’ll use the
Linux commands instead.
SU2-8
ICT246
Linux Operating System and File System Management
Activity 3
We’ll continue to issue commands in the terminal.
1.
Type ‘ps –e’. This command shows us the processes in the system (Linux
commands come with various options; in this case, -e means select all
processes).
2.
Type ‘free’. This command shows us the memory usage in the system.
3.
Type ‘top’. This command shows us the CPU utilisation for each process. To
quit the ‘top’ view, type ‘q’.
4.
Type ‘df –Th’. This command shows us the file system disk usage, which
includes the file system types.
5.
Open the Firefox web browser.
6.
Type ‘ps –e | grep firefox. Record what you have seen and explain what this
command does.
SU2-9
ICT246
Linux Operating System and File System Management
Chapter 2: File System Management
This chapter introduces file system structure, directories, and file allocation methods.
Activities are included to let you get familiar with file system.
2.1 Overview of Files and File Systems
2.1.1 File and file systems
File system management is an important function in operating system. Most applications
take in input as files, and save the output as files. Users are also familiar with using files. A
file has desirable characteristics such as long-term existence, sharable between processes,
and files can be organised into a hierarchical structure.
File systems typically provide a collection of functions and operations that can be
performed on files, such as create, delete, close, read and write.
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 551-552.
2.1.2 File structure
We need to understand four terms when discussing files:
Field, Record, File, Database
An individual field contains just one value, and it is the basic element of data. One
example of a field is a student’s date of birth.
SU2-10
ICT246
Linux Operating System and File System Management
A record is a collection of fields. An example is a student record, which contains fields
such as name, date of birth, telephone number, etc.
A file is a collection of similar records. File can be created or deleted. An example is a
collection of student’s records, which we can refer to it by a filename, such as students.
A database usually contains different types of files.
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 552-553.
2.1.3 File management systems
A file management system is a system software that provides file usage services to
applications and users. It is important as it relieves the developers to develop file access
functions for each application. It also meets requirements of the users, which include
storage of data as files, and perform relevant operations such as create, delete, close, read
and write.
Figure File system software architecture shows a general file system software architecture.
At the bottom are the disk device driver and tape device driver. The device drivers are
responsible to communicate with the disk and tape, which are used to store files. Basic
file system on the next level deals with blocks of data that are exchanged with disk/tape,
and it does not understand the file content. Basic I/O supervisor deals with device I/O,
scheduling and file status. It selects the device based on the particular file selected. Logical
I/O is responsible for file records, and it maintains basic data about files. The highest level
is the access methods, which consist of sequential, indexed, etc.
SU2-11
ICT246
Linux Operating System and File System Management
Figure 2.3 File system software architecture
(Source: Figure 12.1 of textbook)
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 554-555.
2.2 File Directories
Have you wondered what will happen if there are no directories for files. You will possibly
be swamped by the huge number of files when you try to select a file to open it in an
application.
There are different operations that can be performed in a directory, such as searching,
creating file, deleting file, listing directory, as well as updating directory. For example,
SU2-12
ICT246
Linux Operating System and File System Management
when a user references a file in a directory, the entry corresponding to that particular file
must be searched.
In general, the tree-structured directory is used. This is used in many systems, such as
Windows, and Linux. Usually, there is a master directory, and it in turns can have a number
of sub-directories, each of which can have further more sub-directories and files. At any
level, a directory may contain entries for sub-directories and files. Figure File structure in
Windows OS is a file structure in a Windows System.
Figure 2.4 File structure in Windows OS
Files can be referenced to by a symbolic name. In the tree-structured directory, any file can
be located by following a path from the root or master directory. There are two methods,
which are absolute path and relative path. The system only needs to ensure that unique
names are maintained in a particular directory. As in Figure File structure in Windows
OS, you can use the same x_subfolder name in two places (C:\1Folder\a_subfolder
\x_subfolder as well as C:\1Folder\b_subfolder\x_subfolder).
To refer a file fileA.txt, if we are in the folder C:\1Folder\a_subfolder\x_subfolder, we
can refer to the file as fileA.txt. If we are in the folder C:\1Folder\a_subfolder, we can refer
to the file as .\x_subfolder\fileA.txt. If we are in the folder C:\b_subfolder, we can refer
SU2-13
ICT246
Linux Operating System and File System Management
to the file as ..\a_subfolder\x_subfolder\fileA.txt. These different methods are all using
relative path. A “.” refers to the current directory, and a “..” refers to the parent directory.
However, we can also refer to the file as C:\1Folder\a_subfolder\x_subfolder\fileA.txt,
and we can use this method no matter which directory we are in. Thus, this is referred to
as absolute path.
Windows system has the concept of drive letter (e.g. C:\ drive). However, Linux system
does not use the concept of drive letter. In Linux, the file structure starts with the root
folder, which is referred to as “/”. In Figure File structure of a user home folder in Debian
(Linux OS), it is showing the file structure of a user home folder. The user folder ‘tkt’
is stored under “home”, and “home” is stored under the root folder “/”. Inside this
user folder, there are 8 folders (Desktop, Documents, Downloads, Music, Pictures, Public,
Templates, Videos), and 1 file (myfirstfile).
Figure 2.5 File structure of a user home
folder in Debian (Linux OS)
SU2-14
ICT246
Linux Operating System and File System Management
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 564-568.
Lesson Recording
Linux Files Commands
Activity 4
We’ll now issue some commands related to files and folders.
1.
Type ‘pwd’. This command prints the full name of the current directory.
2.
Type ‘cd ~’. This command changes your directory to your home directory.
3.
Type ‘ls’. This command lists what is inside the directory.
4.
Type ‘touch file1’. This command creates a file ‘file1’.
5.
Type ‘ls -l’. This command lists what is inside the directory with more details.
6.
Type ‘cp file1 file2’. This command copies file1 to file2.
7.
Type ‘rm file1’. This command removes file1.
8.
Type ‘ls’. Which files (file1, file2) are in the folder?
9.
Type ‘mkdir folder1’. This command creates a folder ‘folder1’.
10.
Type ‘cd folder1’. This command changes the directory to ~/folder1.
11.
Type ‘cp ../file2 .’. What does this command do?
12.
Type ‘ls’. You should see file2 in the directory.
SU2-15
ICT246
Linux Operating System and File System Management
13.
What command should you type if you want to go back to your home
directory?
(try using absolute path, then cd to ~/folder1 and try again using relative
path)
We can write a shell script to automate some of the tasks that we want to perform in Linux
OS, for example, in creating a folder and file structure. First, let us create our first shell
script.
Lesson Recording
Linux First Shell Script
Activity 5
Let’s create our first shell script in terminal.
1.
Type ‘nano myscript.sh’, type the following and save the file:
2.
Type ‘chmod +x myscript.sh’. This command will make the file executable.
3.
Type ‘./myscript.sh’. This command executes our first shell script.
4.
What do you see on the screen? Explain what the echo command does.
SU2-16
ICT246
Linux Operating System and File System Management
Now you understand how to create a shell script. Let’s create another shell script to create
some folders.
Lesson Recording
Shell Script createfolders
Activity 6
Let’s create another shell script to create some folders.
1.
Type ‘nano createfolders.sh’, type the following and save the file:
2.
Type ‘chmod +x createfolders.sh’ and follow by ‘./createfolders.sh’.
3.
What do you see on the screen? Explain what this shell script does.
Now, you will perform the following activity yourself.
Lesson Recording
Shell Script createfiles
SU2-17
ICT246
Linux Operating System and File System Management
Activity 7
In this activity, you need to create a shell script to perform the following tasks. Before
you create your shell script, create a folder Myscript in your home directory and create
your script inside the Myscript folder.
1.
Name your shell script as createfiles.sh
2.
Create 5 folders (suss1, suss2, suss3, suss4, suss5) in your home directory.
3.
In each of the folders (e.g. suss1), create a new file (use your initial as filename
with the folder number, e.g. my initial is tkt, thus in folder suss1, I’ll create
file tkt1, in folder suss2, I’ll create tkt2, and so on).
4.
In each of the files, append the content “I Love SUSS” inside the file.
2.3 File Allocation Methods
A file consists of collection of blocks on the secondary storage (e.g. Hard Drive). One
of the main functions of OS is to allocate blocks to file, and this is done by the file
system management. There are different methods which can be used, and we will discuss
three commonly used methods: contiguous allocation, chained allocation, and indexed
allocation.
Contiguous allocation
Contiguous allocation is a simple method to use. When a file is created, a contiguous set
of blocks is allocated as shown in Figure Contiguous file allocation. In the file allocation
table, each file is represented by a single line that shows the start block and the length of
the file. Contiguous allocation method is easy to implement, and it is easy to retrieve a
single block. For example, if File B block 3 is needed, the file system can easily retrieve
the file by the start block of File B, which is 9, then add the block 3 and minus 1. So it will
SU2-18
ICT246
Linux Operating System and File System Management
be block 11 (9 + 3 -1). In general, if the start block of a file is block a, and the ith block is
needed, then the file system can simply retrieve a + I -1 on the secondary storage.
Figure 2.6 Contiguous file allocation
(Source: Figure 12.9 of textbook)
However, when using contiguous allocation, there is an issue of external fragmentation,
and the file system will have difficulty in getting contiguous blocks to fit longer files. Thus,
compaction algorithm needs to be performed to free up additional space on the secondary
storage. Also, since the file length needs to be known when the file is first created, it may
have problems when the files grow later.
Chained allocation
In chained allocation, the allocation is done on an individual block, which is different
from contiguous allocation. Now, each block is responsible to point to the next block, and
a pointer is used to achieve this task. In the file allocation table, each file is represented
by a single line that shows the start block and the length of the file. In Figure Chained
allocation, File B only needs to know its start block, which is block 1, and block 1 will
have a pointer to point to block 8, and block 8 points to block 3, and so on. Therefore, with
SU2-19
ICT246
Linux Operating System and File System Management
chained allocation, there will be no external fragmentation issue. It also does not have to
worry on issues such as allocating a file with a longer length. To retrieve a particular block
of a file needs to trace through the chain of blocks.
One issue of chain allocation is it does not accommodate the concept of principle of locality.
Principle of locality means that related storage locations are frequently accessed. Thus,
if the file system needs to bring in several blocks of a file, then different parts of the
secondary storage need to be accessed, which will impact the performance. This issue can
be solved by consolidating files periodically.
Figure 2.7 Chained allocation
(Source: Figure 12.11 of textbook)
Indexed allocation
In indexed allocation, the file indexes are kept in a separate block, different from the file
allocation table. The allocation can be either fixed-size blocks, or variable-size portions.
In the file allocation table, each file is represented by a single line that shows the index
block. The index block shows the actual location of the files as shown in Figure Indexed
SU2-20
ICT246
Linux Operating System and File System Management
allocation with variable-length portions which are variable-size portions. File B is stored
in the file allocation table, and it shows that File B has an index block of block 24. In block
24, the table shows that file B has three contiguous blocks, with different start block and
length.
In indexed allocation, the fixed-size blocks allocation will solve the problem of external
fragmentation, and the variable-size portions will improve the locality. Indexed allocation
is a popular method as it supports both sequential and direct access to the file.
Figure 2.8 Indexed allocation with variable-length portions
(Source: Figure 12.14 of textbook)
Read
William Stallings (2018). Operating Systems: Internals and Design Principles, 9th Ed.,
pages 572-578.
SU2-21
ICT246
Linux Operating System and File System Management
Activity 8
Draw a diagram to show how chained allocation method allocates a file that has a
length of 10 blocks: block 1 is the start block, and block 28 is the end block.
SU2-22
ICT246
Linux Operating System and File System Management
Summary
In this study unit, you have learnt what a Linux OS is, and have started to use the Debian
Linux OS that you have installed in Study Unit 1. You have viewed the core functions of
OS using Linux, and have started to use the Linux commands to perform tasks.
You have also learnt files, directories, and file allocation methods in this study unit. As you
started to understand more in file systems, you will appreciate it on why OS is needed.
You have also started to write simple shell scripts to manipulate files and folders.
SU2-23
ICT246
Linux Operating System and File System Management
Formative Assessment
1.
Which is TRUE for a Linux Distribution?
a. Linux distribution is based on the Unix Kernel
b. The Linux commands in the different distributions of Linux are the same
c. The Basic Linux commands in the different distributions of Linux are similar
d. Different distribution of Linux handle package management in the same way
2.
Which is a characteristic of Linux OS?
a. Dynamic Linking
b. Static Linking
c. Integrated architecture
d. Monolithic architecture
3.
Which command can you use to view the file system disk usage in a Linux OS?
a. free
b. df
c. pwd
d. top
4.
What does the command “ps -e” shows in a Debian Linux OS?
a. Shows all programs in the system
b. Shows the processes that have a word “e” in the process name
c. Shows the programs that have a word “e” in the program name
d. Shows all processes in the system
5.
In a general file system software architecture, the device driver ____________.
a. deals with blocks of data
b. understand the file content
SU2-24
ICT246
Linux Operating System and File System Management
c. is responsible for file records
d. is responsible to communicate with the disk
6.
A student ________ contains fields such as name, date of birth, and email address.
a. byte
b. file
c. record
d. database
7.
Your current folder is in C:\gparent\child\, and you want to refer to a file apple.txt
which is in a folder C:\gparent\fruits\. How do you refer to the file apple.txt using
relative path?
a. C:\gparent\fruits\apple.txt
b. C:\gparent\apple.txt
c. ..\fruits\apple.txt
d. .\fruits\apple.txt
8.
Which type of directory structure is used in Linux OS?
a. Simple list
b. Two-level scheme
c. Three-level scheme
d. hierarchical
9.
Each block is responsible to point to the next block is a characteristics of
______________.
a. chained allocation
b. fixed allocation
c. contiguous allocation
d. indexed allocation
SU2-25
ICT246
Linux Operating System and File System Management
10. Which is NOT a characteristics of contiguous allocation in file allocation method?
a. External fragmentation will occur
b. No accommodation of principle of locality
c. Compaction algorithm is necessary
d. Size of file needs to be declared at time of creation
SU2-26
ICT246
Linux Operating System and File System Management
Solutions or Suggested Answers
SU2-Chapter 1 Activity 1
Your Windows system should be running NTFS.
SU2-Chapter 1 Activity 2
After you have issued the command ‘cat myfirstfile’, you should see ‘Linux is a powerful
file’.
Nano is a text editor, and you can use it to create file, view text file, just like notepad in
Windows.
SU2-Chapter 1 Activity 3
You will see something similar to the following although the number 1895 (the process
ID) may be different. (We’ll discuss process in detail in Study Unit 4).
tkt@Debian9:~$ ps -e | grep firefox
1895 tty2
00:00:08 firefox-esr
SU2-27
ICT246
Linux Operating System and File System Management
tkt@Debian9:~$
The ps –e will show all processes, and from there, the grep firefox only selects this process
which is Firefox.
SU2-Chapter 2 Activity 4
8.
Type ‘ls’. Which files (file1, file2) are in the folder?
file2
11.
Type ‘cp ../file2 .’. What does this command do?
This command copies ~/file2 into ~/folder1/ folder.
13.
What command should you type if you want to go back to your home directory?
(try using absolute path, then cd to ~/folder1 and try again using relative path)
Since you are in the folder /home/tkt/folder1/, you can type the following
commands to go back to the home directory /home/tkt/
Relative path
cd ..
Absolute path
cd /home/tkt/folder1
tkt@tkt:~$ ls
Desktop
Downloads Music
Pictures
Documents
file2
myfirstfile Public
tkt@tkt:~$ mkdir folder1
tkt@tkt:~$ cd folder1
tkt@tkt:~/folder1$ ls
tkt@tkt:~/folder1$ cp ../file2 .
tkt@tkt:~/folder1$ ls
file2
tkt@tkt:~/folder1$ cd ..
tkt@tkt:~$ cd ~/folder1
tkt@tkt: ~/folder1$ cd ..
tkt@tkt:~$ cd ~/folder1
tkt@tkt:~/folder1$ cd /home/tkt/folder1
tkt@tkt:~/folder1$ pwd
/home/tkt/folder1
SU2-28
Templates
Videos
ICT246
Linux Operating System and File System Management
tkt@tkt:~/folder1$
SU2-Chapter 2 Activity 5
You will see I Love SUSS. The echo command will display the text on screen.
tkt@tkt:~/folder1$ chmod +x ./myscript.sh
tkt@tkt:~/folder1$ ./myscript.sh
I love SUSS
tkt@tkt:~/folder1$
SU2-Chapter 2 Activity 6
You will see 3 new folders created: os1, os2 and os3.
The shell script uses for loop to create the 3 new folders.
SU2-Chapter 2 Activity 7
Following is a sample script that will perform the tasks:
SU2-29
ICT246
Linux Operating System and File System Management
SU2-Chapter 2 Activity 8
The diagram will be similar to Figure 2.7 Chained Allocation, although instead of 5 blocks,
you should draw 10 blocks.
Formative Assessment
1.
Which is TRUE for a Linux Distribution?
a.
Linux distribution is based on the Unix Kernel
Incorrect. It is based on Linux Kernel. Refer to section 1.1 of Study Unit 2.
b.
The Linux commands in the different distributions of Linux are the same
Incorrect. The Linux commands in the different distributions of Linux are
slightly different. Refer to section 1.1 of Study Unit 2.
c.
The Basic Linux commands in the different distributions of Linux are similar
Correct. The Linux commands in the different distributions of Linux are
slightly different although the basic commands are very similar. Refer to
section 1.1 of Study Unit 2.
d.
Different distribution of Linux handle package management in the same way
Incorrect. Different distribution of Linux usually different in the way on how
it handle the different software collection. Refer to section 1.1 of Study Unit 2.
2.
Which is a characteristic of Linux OS?
a.
Dynamic Linking
Correct. Linux is using dynamic linking. Refer to section 1.1 of Study Unit
2.
b.
Static Linking
SU2-30
ICT246
Linux Operating System and File System Management
Incorrect. Linux is using dynamic linking, not static linking. Refer to section
1.1 of Study Unit 2.
c.
Integrated architecture
Incorrect. Linux is using a modular architecture, not integrated architecture.
Refer to section 1.1 of Study Unit 2.
d.
Monolithic architecture
Incorrect. Linux is using a modular architecture, not monolithic architecture.
Refer to section 1.1 of Study Unit 2.
3.
Which command can you use to view the file system disk usage in a Linux OS?
a.
free
Incorrect. free can be used to view the memory usage but not the file system
disk usage. Refer to section 1.2 of Study Unit 2.
b.
df
Correct. df can be used to view the file system disk usage. Refer to section
1.2 of Study Unit 2.
c.
pwd
Incorrect. pwd can be used to view the current directory but not the file
system disk usage. Refer to section 1.2 of Study Unit 2.
d.
top
Incorrect. top can be used to view the CPU utilization for each processes but
not the file system disk usage. Refer to section 1.2 of Study Unit 2.
4.
What does the command “ps -e” shows in a Debian Linux OS?
a.
Shows all programs in the system
Incorrect. ps -e shows all processes in the system, not all programs in the
system. Refer to section 1.2 of Study Unit 2.
SU2-31
ICT246
Linux Operating System and File System Management
b.
Shows the processes that have a word “e” in the process name
Incorrect. ps -e shows all processes in the system. Refer to section 1.2 of Study
Unit 2.
c.
Shows the programs that have a word “e” in the program name
Incorrect. ps -e shows all processes in the system. Refer to section 1.2 of Study
Unit 2.
d.
Shows all processes in the system
Correct. ps -e shows all processes in the system. Refer to section 1.2 of
Study Unit 2.
5.
In a general file system software architecture, the device driver ____________.
a.
deals with blocks of data
Incorrect. Basic file system deals with blocks of data that are exchanged with
disk/tape, not device driver. Refer to section 2.1 of Study Unit 2.
b.
understand the file content
Incorrect. Device driver does not understand the file content. Refer to section
2.1 of Study Unit 2.
c.
is responsible for file records
Incorrect. Logical I/O is responsible for file records, not device driver. Refer
to section 2.1 of Study Unit 2.
d.
is responsible to communicate with the disk
Correct. Device drivers are responsible to communicate with the disk and
tape. Refer to section 2.1 of Study Unit 2.
6.
A student ________ contains fields such as name, date of birth, and email address.
a.
byte
Incorrect. A byte only contains 8 bits. Refer to section 2.1 of Study Unit 2.
SU2-32
ICT246
Linux Operating System and File System Management
b.
file
Incorrect. A file is a collection of similar records. Refer to section 2.1 of Study
Unit 2.
c.
record
Correct. A record is a collection of fields. Refer to section 2.1 of Study Unit
2.
d.
database
Incorrect. A database usually contains different types of files. Refer to section
2.1 of Study Unit 2.
7.
Your current folder is in C:\gparent\child\, and you want to refer to a file apple.txt
which is in a folder C:\gparent\fruits\. How do you refer to the file apple.txt using
relative path?
a.
C:\gparent\fruits\apple.txt
Incorrect. This is absolute path. Refer to section 2.2 of Study Unit 2.
b.
C:\gparent\apple.txt
Incorrect. Wrong path. Refer to section 2.2 of Study Unit 2.
c.
..\fruits\apple.txt
Correct. This is the correct relative path. Refer to section 2.2 of Study Unit 2.
d.
.\fruits\apple.txt
Incorrect. Wrong path. Refer to section 2.2 of Study Unit 2.
8.
Which type of directory structure is used in Linux OS?
a.
Simple list
Incorrect. Linux OS is using hierarchical or tree structure. Refer to section 2.2
of Study Unit 2.
b.
Two-level scheme
SU2-33
ICT246
Linux Operating System and File System Management
Incorrect. Linux OS is using hierarchical or tree structure. Refer to section 2.2
of Stud…

Order a unique copy of this paper

600 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
Top Academic Writers Ready to Help
with Your Research Proposal

Order your essay today and save 25% with the discount code GREEN