Ch4 OS Basics
Ch4 OS Basics
Chapter 4
Operating System Basics
ITP3901 OPERATING SYSTEMS FUNDAMENTALS
(AY 2019/20)
2
What is an Operating System?
Device Management
Memory Management
Process Management
File Management
Providing User Interface
Security
5
Common Operating Systems
Microsoft Windows
first released in 1985, running on top of MS-DOS
Windows 95, 98, ME, XP, 7, 8, 10
Windows NT Server, Windows 2000, 2003, 2008, 2012, 2016, 2019 Server
Apple Macintosh OS (Mac OS)
MacOS 8, OS 9, OS X (OS 10), macOS Big Sur 11
6
Common Operating Systems
The user interface (UI) is the component of the OS for the user to interact
with the computer.
In the old days, the command line interface (CLI) is used for user
interactions.
Modern operating systems usually provide a graphical user interface (GUI)
in which users perform actions through direct manipulation of the graphical
elements.
A graphical user interface (GUI) allows the user to use graphics, along
with a keyboard and a mouse to manipulate software using visual objects
such as windows, pull-down menus, pointers, and icons.
Advantages for using GUI:
Appealing
More user-friendly
Easier to learn
Kernel is the most common term for the core of the operating system.
It is a small piece of code that is loaded into memory when the
computer boots.
This computer code contains instructions that allow the kernel to
manage hardware devices, memory allocation, system processes, and
other programs.
Basic
Administration
In Linux
Fedora
Red Hat Enterprise
CentOS
Mandriva
Debian
Ubuntu
openSuSE
CentOS
Chinese Version
Red Flag
File system defines how the hard disk store and organize data
physically
Some popular filesystems in linux are
ext2, stable and high performance but no journaling. File system
start up checking (like Scan disk in MS Windows) can be slow,
especially un-clean shutdown (i.e. Shutdown improperly)
ext3, a journaled version, the most popular
ext4, latest Linux file system which supports file size up to 16
TB (1024GB) and used in ″ / ″ of Fedora11
ResiserFS, B-tree based, good performance when dealing with
small files (<4K), 10-15 times faster then ext3
NTFS
FAT32, exFAT
ext2 / ext3 /ext4
HPFS
Support means you may use Linux tool to create partition for that particular
type of filesystem (of course, you can read the data from it).
File Types
Normal (e.g. text file, image file …)
Directory (container of other directories/files)
Linux treats everything as file, even your network card, sound card ….
(device files)
All running application must have at least one process (you may simply
consider it as a running program)
Every process have an Process ID (PID)
Required when you want to kill or check the specified process
″init″
Traditional System V init process
the first process run on Linux has PID, 1 and all other process are child
process of init
“Systemd”
Aimed to replace the traditional Linux init system
Systemd is the first daemon to start (during booting) and the last daemon to terminate
(during shutdown).
You must have an account (username and password) in order to login to the
system
After you successfully log in to the Linux system (CLI mode), a shell
prompt such as the $ character for normal user, will appear on the screen (#
character for superuser). The shell prompt is simply a message from the
computer telling you that it is ready to accept typed input on the command
line.
Reminder – Linux is case sensitive
pwd touch
ls cat, less, more
cd grep, find
mkdir shutdown, reboot
rmdir |
cp man
mv clear
Use to open the supporting manual for a command. You can find the
following information of a command
Syntax
Function
Argument
etc. …
Remark:
~ means the home directory of the login user
su
change user ID or become superuser
su -l user01
su user01
su -l
Chapter 4 - OS Basics ITP3901 Operating Systems Fundamentals
37
Executing Command with root
privilege
sudo
execute a command as another user
$sudo shutdown –h now
grep
print lines matching a pattern
grep texttosearch file01
39
find command
40
pipe |
$clear