Transcript Chapter 4

Basic Computer Application
Chapter 4
Operating Systems
and File Management
4 Chapter Contents
Section A: Operating System Basics
Section B: Today’s Operating Systems
Section C: File Basics
Section D: File Management
Section E: Backup Security
Chapter 4: Operating Systems and File Management
2
4
SECTION
A
Operating System Basics
Operating System Activities
User Interfaces
The Boot Process
Chapter 4: Operating Systems and File Management
3
4
SECTION
A
Operating System Basics
At the most basic level, what is an operating
system?
1. An integrated circuit within the CPU
2. A start-up program stored in ROM
3. A special purpose piece of hardware that
controls the operation of your computer
4. A large and complex computer program that
manages and controls the operation of your
computer’s resources.
Chapter 4: Operating Systems and File Management
4
4 Operating System Activities
An operating system is the system software
that acts as the master controller for all
activities that take place within a computer
system
Chapter 4: Operating Systems and File Management
5
4
Air Traffic Controller
Operating System
Clear aircraft for takeoff
Launches programs
Monitors planes in the air
Monitors
running
Keeps track of airspace
runways (resources)
programs
that
are
and Keeps track of RAM and disk space
(resources)
Keeps track of planes on the Keeps track of programs stored on
ground
disk
Takes care of emergency landings
Chapter 4: Operating Systems and File Management
Detects equipment failure
6
4 Operating System Activities
Chapter 4: Operating Systems and File Management
7
4
Operating System Activities can be done by
user
•Launch Programs
•Manage Files
•Get Help
•Customize the user Interface
•Configure equipment
Chapter 4: Operating Systems and File Management
8
4
Chapter 4: Operating Systems and File Management
9
4 Operating System Activities
Modern operating systems control many
things at once:
 Multitasking provides process and memory management
services that allow two or more tasks, jobs, or programs to
run simultaneously
 Within a single program, multithreading allows multiple parts,
or threads, to run simultaneously
 An operating system’s multiprocessing capability supports a
division of labor among all the processing units
– Dual Core Processers or Multiple Processers
Chapter 4: Operating Systems and File Management
10
4 Page 151 BookCD 187
How does OS manage memory?
How does OS keep track of storage
resources?
Why does OS get involved with peripheral
devices?
Chapter 4: Operating Systems and File Management
11
4 Commemorate
Steve Jobs
2011-10-5
Dennis Ritchie
2011-10-12
Ritchie created the C programming language and, with long-time colleague,
Ken Thompson, the UNIX operating system.
Ritchie and Thompson received the Turing Award from the ACM in 1983, the
Hamming Medal from the IEEE in 1990 and the National Medal of
Technology from President Clinton in 1999.
Ritchie was the head of Lucent Technologies System Software Research
Department
Chapter 4: Operating Systems and File Management
12
4 Operating System Activities
Operating System Categories?
– Single-user operating system
– Multiuser operating system
– Network operating system
– Desktop operating system
Chapter 4: Operating Systems and File Management
13
4 User Interfaces
The combination of hardware and software
that helps people and computers
communicate with each other
Programming/Using OS utilities by
API(Application Programming
Interface,eg.,Win32API)
Chapter 4: Operating Systems and File Management
14
4 User Interfaces
Menus, submenus, and dialog boxes
In the early 1980s, Jobs was
among the first to see the
commercial potential of Xerox
PARC's mouse-driven graphical
user interface, which led to the
creation of the Apple Lisa and, one
year later, the Macintosh.
Chapter 4: Operating Systems and File Management
15
4 Xerox PARC
 Xerox PARC has been the inventor and incubator of
many elements of modern computing in the
contemporary office work place:
 Laser printers,
 Computer-generated bitmap graphics
 The Graphical user interface, featuring windows and icons, operated
with a mouse
 The WYSIWYG text editor
 InterPress, a resolution-independent graphical page-description
language and the precursor to PostScript
 Ethernet as a local-area computer network
 Fully formed object-oriented programming in the Smalltalk programming
language and integrated development environment.
Chapter 4: Operating Systems and File Management
16
4 The Boot Process
During the boot process, the operating system
kernel is loaded into RAM
– The kernel provides essential operating system services
Where is it?
– Your computer’s small bootstrap program is built into
special ROM circuitry housed in the computer’s system
unit
Chapter 4: Operating Systems and File Management
17
4 The Boot Process
From here
Chapter 4: Operating Systems and File Management
to here
18
4
How many steps during Boot process?
Six steps in Boot process
–
–
–
–
–
–
1. Power up
2. Start Boot program
3. Post (power on self test)
4. Identify attached peripheral devices
5. Load OS
6. Check/implement config and customizations
 How about to install many OSs in your PC?
Chapter 4: Operating Systems and File Management
19
4 QuickCheck
Page 157
BookCD 193
Chapter 4: Operating Systems and File Management
20
4
SECTION
Today’s Operating Systems
B
Microsoft Windows
Mac OS
UNIX and Linux
DOS
Handheld Operating Systems
– What is the smart Phone?
– Smart Phone OS
Chapter 4: Operating Systems and File Management
21
4 Microsoft Windows
Windows
XP
Windows
Vista
Chapter 4: Operating Systems and File Management
22
4
Chapter 4: Operating Systems and File Management
23
4
What are pros and cons of Windows OS?
Chapter 4: Operating Systems and File Management
24
4 Mac OS
You can tell when you’re using
Mac OS by the Apple logo that
appears on the menu bar. The
Mac OS X interface includes all
the standard elements of a GUI,
including icons, menus,
windows, and taskbars.
Chapter 4: Operating Systems and File Management
25
4 Mac OS
Dual Boot:
On a Macintosh
computer with Boot
Camp, you can boot
into Mac OS X or
into Windows XP.
Chapter 4: Operating Systems and File Management
26
4 Mac OS
Mac OS X on an Intel Mac offers the ability to
run Windows and Windows application
software in addition to software designed for
the Macintosh
– Dual boot
Virtual Machine
Chapter 4: Operating Systems and File Management
27
4
From Wikipedia, the free encyclopedia
 Virtualization software allows a single host computer to
create and run one or more virtual environments.
 Virtualization software is most often used to emulate a
complete computer system in order to allow a guest
operating system to be run, for example allowing Linux to
run as a guest on top of a PC that is natively running a
Microsoft Windows operating system.
– Virtual PC
– Virtual Box
– VMWare
 Storage virtualization refers to the process of abstracting
logical storage from physical storage.
Chapter 4: Operating Systems and File Management
28
4
Chapter 4: Operating Systems and File Management
29
4
 The 1970s and 1980s saw more and more computer-related
inventions at the Bell Laboratories as part of the personal
computing revolution.
 In 1970 Dennis Ritchie developed the compiled C
programming language as a replacement for the interpretive
B which was then used in writing the UNIX operating system
(also developed at Bell Laboratories by Ritchie and Ken
Thompson).
 Additionally, the AWK programming language was designed
and implemented by Alfred Aho, Peter Weinberger, and
Brian Kernighan of Bell Laboratories.
 Alcatel-Lucent, holding the Bell Labs now
Chapter 4: Operating Systems and File Management
30
4 antitrust case
 Under a 1958 consent decree in settlement of an antitrust case, AT&T (the
parent organization of Bell Labs) had been forbidden from entering the computer
business.
 Unix could not, therefore, be turned into a product; indeed, under the terms of the
consent decree, Bell Labs was required to license its non-telephone technology
to anyone who asked.
 Ken Thompson quietly began answering requests by shipping out tapes and disk
packs – each, according to legend, with a note signed "love, ken”.[9]
 AT&T made Unix available to universities and commercial firms, as well as the
United States government, under licenses.
 The licenses included all source code including the machine-dependent parts of
the kernel, which were written in PDP-11 assembly code.
 Copies of the annotated Unix kernel sources circulated widely in the late 1970s in
the form of a much-copied book by John Lions of the University of New South
Wales, the Lions' Commentary on UNIX 6th Edition, with Source Code, which led
to considerable use of Unix as an educational example.
Chapter 4: Operating Systems and File Management
31
4 MINIX & Andrew S. Tanenbaum
 In 1987, Tanenbaum wrote a clone of UNIX, called MINIX (MIni-uNIX),
for the IBM PC.
 It was targeted at students and others who wanted to learn how an
operating system worked.
 Consequently, he wrote a book[8] that listed the source code in an
appendix and described it in detail in the text.
 The source code itself was available on a set of floppy disks. Within three
months, a USENET newsgroup, comp.os.minix,[9] had sprung up with
over 40,000 subscribers discussing and improving the system.
 One of these subscribers was a Finnish student named Linus Torvalds
who began adding new features to MINIX and tailoring it to his own
needs.
 On October 5, 1991, Torvalds announced his own (POSIX like) kernel,
called Linux, which originally used the MINIX file system but is not based
on MINIX code.[10]
Chapter 4: Operating Systems and File Management
32
4 UNIX and Linux
Trivia: The name Linux
is derived from “Linus”
(after it’s creator, Linus
Torvald) and “Minix” (a
compact version of the
Unix operating system).
Chapter 4: Operating Systems and File Management
33
Several Web sites offer a Linux distribution,
which is a package that contains the Linux
kernel, system utilities, applications, and an
installation routine
4 Why is Linux so popular?
It is based on the proven Unix operating system
– Multi-tasking, multi-threading, multi-processor
technology first developed in the late 1970’s
– Created as a platform for networking and software
development
– File system protection, security
The source code is “Open,” so systems
programmers can download it, modify it and
create their own OS versions/features
Free! Or, at least, cheap (relatively)
Chapter 4: Operating Systems and File Management
34
4 UNIX and Linux
Linux users can choose from
several graphical interfaces.
Pictured here is the popular
KDE graphical desktop.
Chapter 4: Operating Systems and File Management
35
4 DOS
Disk Operating System
First operating system that many used
Command line interface (i.e., not a GUI)
Chapter 4: Operating Systems and File Management
36
4 Handheld Operating Systems
Chapter 4: Operating Systems and File Management
37
4 Quick Quiz
1.
2.
3.
The kernel
_____ provides essential operating system services,
such as memory management and file access.
True/False: A GUI provides a way to point and click a
mouse to select menu options and manipulate graphical
objects that are displayed on the screen.
Multitasking provides process and memory
____________
management services that allow two or more tasks, jobs,
or programs to run simultaneously.
a.
b.
c.
d.
Multitasking
Multithreading
Networking
Multiprocessing
Chapter 4: Operating Systems and File Management
38
4
SECTION
C
File Basics
File Names and Extensions
File Directories and Folders
File Formats
What is a “file?”
Chapter 4: Operating Systems and File Management
39
4 Computer Files
A named collection of data that exists in
computer storage.
– Documents
– Database records
– Pictures, Music, etc.
File Attributes
–
–
–
–
Name
Format
Location
Size, Date, etc.
Chapter 4: Operating Systems and File Management
40
4 File Names and Extensions
You must adhere to file-naming conventions
when saving files
–
–
–
–
Maximum length (255 in Win)
Prohibited characters
No reserved words
Case sensitivity
Chapter 4: Operating Systems and File Management
41
4
The rules for naming a file names under Linux
(and UNIX like oses) are as follows:
 The file names can be up to 255 characters (or bytes) long
 You cannot use all special characters, try to use:
=> Uppercase or lowercase letters
=> Digits
=> Special characters, such as: +, -, _, .
 File names are case-sensitive. Thus, the following file names
all are different:
– vivek Vivek VIVEK VIVek
 Try to avoid non printable and following characters in
filenames:
/, >, <, ?, ", ', blank space
Chapter 4: Operating Systems and File Management
42
4 File Directories and Folders
An operating system maintains a directory for
each disk, tape, CD, DVD, or USB flash drive
– Root directory
– Subdirectory
• Depicted as folders
A computer’s file location is defined by a file
specification, or path
C:\My Music\Reggae\Marley One Love.mp3
Chapter 4: Operating Systems and File Management
43
4 File Formats
Windows uses a file association list to link a file
extension to its corresponding application software
File extensions are usually related to the file format
– Native file format for applications
Although a file extension is a good indicator of a
file’s format, it does not really define the format
– A file header is a section of data at the beginning of a file
that contains information about a file
Page 172/BookCD-208
Chapter 4: Operating Systems and File Management
44
4 Graphics file formats
Raster formats
ANI · ANIM · APNG · ART · BEF · BMF · BMP · BSAVE · CAL ·
CGM · CIN · CPC · DPX · ECW · EXR · FITS · FLIC · FPX · GI
F · HDRi · ICER · ICNS · ICO · ICS · IGES · ILBM · JBIG · JBIG
2 · JNG · JPEG · JPEG 2000 · JPEG-LS · JPEG-HDR · JPEG
XR · MNG · MIFF · PBM · PCX · PGF · PGM · PICT · PICtor · P
ixel · PNG · PPM · PSP · RAD · RGBE · SGI · TGA · TIFF
(Logluv TIFF) · WBMP · WebP · XAR · XBM · XCF · XPM
Raw formats
CIFF · DNG
Vector formats
AI · CDR · DXF · EVA · EMF · PGML · SVG · VML · WMF
Compound formats
DjVu · EPS · PDF · PostScript · PSD · SWF · XAML
Related
Exchangeable image file format (EXIF) · Extensible Metadata
Platform (XMP)
Chapter 4: Operating Systems and File Management
45
4
Chapter 4: Operating Systems and File Management
46
4 Which image format is best?









BMP format
best image quality, large file
To get best image quality, you should choose BMP file format(Windows Bitmap). It's used internally in the Microsoft
Windows operating system to handle graphics images. These files are typically not compressed, resulting in large file.
JPG/JPEG format
Lossy format, small file
JPEG(Joint Photographic Experts Group) files are a lossy format (in most cases). The DOS filename extension is
JPG, although other operating systems may use JPEG. Nearly all digital cameras have the option to save images in JPEG
format. The JPEG format supports 8 bits per color - red, green, and blue, for 24-bit total - and produces relatively small
file sizes. The compression when not too severe does not detract noticeably from the image. But JPEG files can suffer
generational degradation when repeatedly edited and saved. Photographic images may be better stored in a lossless nonJPEG format if they will be re-edited in future, or if the presence of small "artifacts" (blemishes), due to the nature of the
JPEG compression algorithm, is unacceptable. JPEG is also used as the image compression algorithm in many Adobe
PDF file.
GIF format
Limited color, Lossy format, small file
GIF(Graphics Interchange Format) is limited to an 8-bit palette, or 256 colors. This makes the GIF format suitable for
storing graphics with relatively few colors such as simple diagrams, shapes, logos and cartoon style images. The GIF
format supports animation and is still widely used to provide image animation effects. It also uses a lossless
compression that is more effective when large areas have a single color, and ineffective for detailed images or dithered
images.
Chapter 4: Operating Systems and File Management
47
4 Which image format is best?



PNG format
True color, small file
PNG(Portable Network Graphics) file format is regarded, and was made, as the free and open-source successor to the
GIF file format. The PNG file format supports true color(16 million colors) whereas the GIF file format only allows 256
colors. PNG excels when the image has large areas of uniform color. The lossless PNG format is best suited for editing
pictures, and the lossy formats like JPG are best for final distribution of photographic-type images because of smaller file
size. Many older browsers do not yet support the PNG file format, however with the release of Internet Explorer 7 all
popular modern browsers fully support PNG.
 TIF format
 Widely accepted in printing industry
 TIFF(Tagged Image File Format) is a flexible image format that normally saves 8 or 16 bits per color - red, green and
blue - for a total of 24 or 48 bits, and uses a filename extension of TIFF or TIF. TIFF's flexibility is both a feature and a
curse, with no single reader capable of handling all the different varieties of TIFF files. TIFF can be lossy or lossless.
Some types of TIFF files offer relatively good lossless compression for bi-level (black and white, no grey) images. Some
high-end digital cameras have the option to save images in the TIFF format, using the LZW compression algorithm for
lossless storage. The TIFF image format is not widely supported by web browsers. TIFF is still widely accepted as a
photograph file standard in the printing industry. TIFF is capable of handling device-specific color spaces, such as the
CMYK defined by a particular set of printing press inks.
 WMF format
 Raster image
 Windows Metafile(WMF) is a graphics file format on Microsoft Windows systems, originally designed in the early 1990s.
Windows Metafiles are intended to be portable between applications and may contain both vector and bitmap
components. In contrast to raster formats such as JPEG and GIF which are used to store bitmap graphics such as
photographs, scans and graphics, Windows Metafiles generally are used to store line-art, illustrations and content created
in drawing or presentation applications.
Chapter
Operating
Systems and File Management
48
 4:
EMF
format
 Raster image
4 Question-P173
How do you know which files a program will open?
Why can’t you open some files?
What if all your software fails to open a particular
file format?
How do you know what kinds of file formats you can
send to your friends?
Is it possible to convert a file from one format to
another?
Will a converted document be identical to the
original?
Chapter 4: Operating Systems and File Management
49
4 File Formats
A software application can open files that exist in its
native file format, plus several additional file formats
Chapter 4: Operating Systems and File Management
50
4 File Formats
An easy way to convert a file
from one format to another is
to open it with an application
that supports both file formats,
and then use the Save As dialog
box to select an alternative
file format.
Chapter 4: Operating Systems and File Management
51
4 QuickCheck p175 Bookcd 211
Chapter 4: Operating Systems and File Management
52
4
SECTION
D
File Management
Application-based File Management
File Management Utilities
File Management Metaphors
Windows Explorer
File Management Tips
Physical File Storage
Chapter 4: Operating Systems and File Management
53
4 Application-based File
Management
 Applications typically provide
a way to open files and save
them in a specific folder on a
storage device
Chapter 4: Operating Systems and File Management
Should I use the Save or Save As
command?
54
4 Application-based File
Management
The Save As dialog box
not only helps you name
a file and designate its
destination drive, but
also allows you to
rename files, delete files,
create folders, and
rename folders.
Chapter 4: Operating Systems and File Management
55
4 File Management Utilities
File management
utilities show you the
files stored on your
disks and help you
work with them
Chapter 4: Operating Systems and File Management
56
4 File Management Metaphors
Storage metaphors help you visualize and
mentally organize the files on your disks
– Logical storage models
Chapter 4: Operating Systems and File Management
57
4 Windows Explorer
Windows Explorer
makes it easy to drill
down through the
levels of the directory
hierarchy to locate a
folder or file.
Chapter 4: Operating Systems and File Management
58
4 Windows Explorer
Windows Explorer allows you to manipulate
files and folders in the following ways:
– Rename
– Copy
– Move
– Delete
Chapter 4: Operating Systems and File Management
59
4 File Management Tips
Use descriptive names
Maintain file extensions
Group similar files
Organize your folders from the top down
Consider using the My Documents default
directory
Do not mix data files and program files
Chapter 4: Operating Systems and File Management
60
4 Physical File Storage
The physical storage model describes what
happens on the disks and in the circuits when
files are stored
– Storage media must be formatted before it can
store files
• Formatting utilities divide the disk into tracks and
sectors
Chapter 4: Operating Systems and File Management
62
4 Physical File Storage
The file system
keeps track of the
names and locations
of files
– NTFS
• Master File Table
(MFT)
– FAT32
• File Allocation Table
(FAT)
Chapter 4: Operating Systems and File Management
64
4 Physical File Storage
Deleting a file changes the status of that file’s
clusters to empty and removes the file name
from the index file
– The file’s data is still there
– File shredder software overwrites “empty” sectors
with random 1s and 0s
Files in the Windows Recycle Bin and similar
utilities can be undeleted
Chapter 4: Operating Systems and File Management
65
4 Physical File Storage
Fragmented files are stored in noncontiguous
clusters and decrease performance
Defragmentation utilities rearrange files so
that they are stored in contiguous clusters
Chapter 4: Operating Systems and File Management
66
4 QuickCheck 185/221
Chapter 4: Operating Systems and File Management
67
4
SECTION
E
Backup Security
Backup Basics
Data File Backup
System Backup
Boot and Recovery Disks
Chapter 4: Operating Systems and File Management
68
4 Backup Basics
A backup stores the files needed to recover
data that’s been wiped out by operator error,
viruses, or hardware failures
Chapter 4: Operating Systems and File Management
69
4 Backup Basics
Your backup schedule depends on how
much data you can afford to lose
You should run an up-to-date virus check as
the first step in your backup routine
The backup device you select depends on
the value of your data, your current
equipment, and your budget
Chapter 4: Operating Systems and File Management
70
4 Backup Basics
Chapter 4: Operating Systems and File Management
71
4 Data File Backup
Most computers are equipped with a writable CD or
DVD drive with adequate storage capacity for a
typical computer owner’s data files
Store all files to be backed up in the same location
Back up Internet connection information, e-mail
folders, e-mail address book, favorite URLs,
downloads and validation codes, and other
configuration information
Chapter 4: Operating Systems and File Management
72
4 Data File Backup
To restore from a data file backup, you
simply copy files from your backup to your
hard disk
System Restore (Windows Me and XP) and
System Protection (Windows Vista) are
operating systems’ utilities that periodically
set a restore point that is a snapshot of your
computer settings
Chapter 4: Operating Systems and File Management
73
4 System Backup
To make a backup, you can use backup
software
Backup software is supplied with most tape
drives and other backup devices
Chapter 4: Operating Systems and File Management
74
4 System Backup
Chapter 4: Operating Systems and File Management
75
4 System Backup
A full backup makes a fresh copy of every file in the
folders you’ve specified for the backup
A differential backup makes a backup of only those
files that were added or changed since your last full
backup session
An incremental backup makes a backup of the files
that were added or changed since the last backup—
not necessarily the files that changed from the last
full backup
Most experts recommend that you keep more than
one set of backups
Chapter 4: Operating Systems and File Management
76
4 System Backup
Full, incremental, and differential
backups each take a slightly
different approach to backing
up files.
Chapter 4: Operating Systems and File Management
77
4 Boot and Recovery Disks
A boot disk is a removable storage medium
containing the operating system files needed
to boot your computer without accessing the
hard disk
– Boots DOS
Chapter 4: Operating Systems and File Management
78
4 Boot and Recovery Disks
A recovery disk loads
hardware drivers and
user settings as well as
the operating system
– Sometimes included
with new computer
systems
– The Windows XP
Backup utility creates a
set of Automated
System Recovery disks
Chapter 4: Operating Systems and File Management
79
4 Boot and Recovery Disks
You can create a custom recovery CD that contains
your computer’s current settings and device drivers
Norton Ghost is a product of Symantec, which also
provides a more specialized recovery disk called
the Symantec Recovery Disk
Certain PC manufacturers have pre-installed Norton
Ghost and the recovery environment on some of
their computers
Chapter 4: Operating Systems and File Management
80
4 Windows 7
Chapter 4: Operating Systems and File Management
81
4
Please read the HTML File and Watch the video
Windows 7 backup and restore
Windows7 video
Chapter 4: Operating Systems and File Management
82
4 QuickCheck 195/231
Chapter 4: Operating Systems and File Management
83
Basic Computer Application
Chapter 4 Complete
Operating Systems
and File Management