Download Solution to Lab Project 2.1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Plan 9 from Bell Labs wikipedia , lookup

OS/2 wikipedia , lookup

Library (computing) wikipedia , lookup

DNIX wikipedia , lookup

Acorn MOS wikipedia , lookup

MTS system architecture wikipedia , lookup

System 7 wikipedia , lookup

OS 2200 wikipedia , lookup

Windows NT startup process wikipedia , lookup

RSTS/E wikipedia , lookup

Spring (operating system) wikipedia , lookup

Burroughs MCP wikipedia , lookup

MS-DOS wikipedia , lookup

DR-DOS wikipedia , lookup

Unix security wikipedia , lookup

Design of the FAT file system wikipedia , lookup

Commodore DOS wikipedia , lookup

File Allocation Table wikipedia , lookup

DOS wikipedia , lookup

VS/9 wikipedia , lookup

CP/M wikipedia , lookup

Transcript
Survey of Operating Systems, 3e
Chapter 4
Solutions
Chapter 4 Textbook Solutions
Answers to Key Terms Quiz
1.
live CD
2.
syntax
3.
warm boot
4.
root directory
5.
bootstrap loader
6.
conventional memory
7.
file attribute
8.
internal command
9.
primary partition
10.
application
Answers to Multiple-Choice Quiz
1. Correct answer: B. PC DOS was the product name of OEM MS-DOS sold by IBM.
A, C, D, and E are incorrect because System X, IBM MS-DOS, Linux, and Compaq MSDOS were not the name of the IBM product.
2. Correct answer: D. DOS does not need much memory or storage space and is still used today
in situations in which these features are important, such as embedded into special devices.
A is incorrect because DOS cannot use the NTFS file system.
B is incorrect because DOS is not the OS of choice of gamers.
C is incorrect because DOS cannot take advantage of Intel protected mode.
E is incorrect because DOS does not have a great GUI.
3. Correct answer: E. DR-DOS was once owned by Novell.
A, B, C, and D are all incorrect because FreeDOS, PC DOS, Compaq MS-DOS, and Mac OS
X were not owned by Novell.
4-1
Survey of Operating Systems, 3e
Chapter 4
Solutions
4. Correct answer: C. Real mode is the only processor mode used by MS-DOS.
A is incorrect because there is no Intel processor mode officially named "advanced."
B is incorrect because MS-DOS cannot use the Intel processors' protected mode.
D is incorrect because MS-DOS cannot use the Intel processors' standard mode.
E is incorrect because read-only is not an Intel processor mode.
5. Correct answer: D. 6 MB, is the required free space for installing MS-DOS onto a hard disk.
A is incorrect because 512 KB is below the minimum required free disk space.
B is incorrect because 2 GB is above the minimum required free disk space.
C is incorrect because 49 MB is above the minimum required free disk space.
E is incorrect because 6 MB is the minimum required free disk space, not none.
6. Correct answer: C. DELTREE is the MS-DOS command that will allow you to delete a
directory and its contents in one pass.
A is incorrect because the DEL command can only delete files, not directories.
B is incorrect because XCOPY is a copy command; it cannot delete files or directories.
D is incorrect because CHKDSK is a command for diagnosing logical and physical disk
problems; it cannot delete files or directories.
E is incorrect because you use the ATTRIB command to view or modify file attributes; it
cannot delete files or directories.
7. Correct answer: A. The FAT32 file system is the default file system created by the
installation program for FreeDOS 1.0 Final when it formats a hard drive.
B is incorrect because FreeDOS does not support NTFS.
C is incorrect because, while FreeDOS supports FAT16, it is not the default file system.
D is incorrect because FAT12 is only appropriate for floppy disks, not for large hard drives.
E is incorrect because CDFS is the CD file system, not a file system used when formatting a
hard drive.
4-2
Survey of Operating Systems, 3e
Chapter 4
Solutions
8. Correct answer: A. You can use the DOS install setup program.
B is incorrect because you do not need administrator rights to the computer to install DOS,
because DOS has no notion of security.
C is incorrect because you cannot create a logical drive larger than 2 GB in MS-DOS.
D is incorrect because you are not required to install from CD. MS-DOS was distributed on
floppy disks, although you will find newer versions of DOS (from other sources) available on
CD.
E is incorrect because you are not required to activate MS-DOS with Microsoft. In Chapter 5
you will learn more about this anti-piracy scheme used by Microsoft and other software
companies.
9. Correct answer: B. The FAT file system and the DOS OS are limited to the 8.3 file naming
convention.
A is incorrect because DOS does not support the NTFS file system.
C is incorrect because the POST (Power-on self-test) has nothing to do with the 8.3 file
naming convention.
D is incorrect because ROM BIOS has nothing to do with the 8.3 file naming convention.
E is incorrect because the IBM PC was a computer, with nothing to do with the 8.3 file
naming convention.
10. Correct answer: C. the backslash (\) symbol is an illegal character for a DOS file name.
A, B, D, and E are all incorrect because $, (, -, and _ are all legal characters for a DOS file
name.
11. Correct answer: B. The syntax of a command gives you the rules for entering that command
at the command line.
A is incorrect because the syntax of a command does not provide the command's attributes.
C is incorrect because the syntax of a command does not provide a list of possible errors
created by the command.
D is incorrect because the syntax of a command does not provide the version information for
the command.
E is incorrect because the syntax of a command does not tell you how much memory a
command uses.
4-3
Survey of Operating Systems, 3e
Chapter 4
Solutions
12. Correct answer: E. POST is the BIOS-based program (or group of programs) that performs
diagnostics as a computer powers up.
A, B, C, and D are all incorrect because IO.SYS, COMMAND.COM, MSDOS.SYS, and
KERNEL.EXE are all DOS system files, and they are not in the BIOS.
13. Correct answer: B. FDCONFIG.SYS is a FreeDOS configuration file.
A is incorrect because FDAUTOEXEC.BAT is not the name of a FreeDOS configuration
file.
C is incorrect because CONFIG.SYS is not the name of a FreeDOS configuration file, but it
is the name of a MS-DOS configuration file.
D is incorrect because IO.SYS is the name of a MS-DOS system file, not the name of a
FreeDOS configuration file.
E is incorrect because KERNEL is not the name of a FreeDOS configuration file, but it is a
FreeDOS system file.
14. Correct answer: D. 2 GB is the maximum size of a primary partition you can create in MSDOS 6.22.
A is incorrect because 4 GB is more than the maximum size of primary partition you can
create.
B is incorrect because 2 TB is far more than the maximum size of primary partition you can
create.
C is incorrect because 512 MB is far less than the maximum size of primary partition you can
create.
E is incorrect because 650 KB is far less than the maximum size of primary partition you can
create.
4-4
Survey of Operating Systems, 3e
Chapter 4
Solutions
15. Correct answer: E. Typos on the command line, is the most likely cause of the following
error message: “Bad Command or File name” because DOS requires very careful command
entry.
A is incorrect because an incorrect switch is not the most likely cause this error message.
B is incorrect because an incorrect version of DOS is not the most likely cause of a “Bad
Command or File name” error message.
C is incorrect because DOS does not have any notion of permissions.
D is incorrect because DOS has no notion of rights.
Answers to Essay Quiz
1. The operating system functions DOS supports are: user interface, memory management, file
management, and device management. The job management, task management, and security
functions are completely unsupported in DOS. User interface, file management, memory
management, and device management are only minimally supported in DOS.
2. Since FreeDOS is reputed to be compatible with MS-DOS, one solution is to download and
install FreeDOS on the computer and test the application under FreeDOS. If this works, you
do not have to deal with MS-DOS. If somehow this does not work, see the following:
There are at least two possible solutions for using MS-DOS if Free DOS does not work with
the application. You have two legally licensed versions of MS-DOS 6.22, which covers the
two computers on which you need DOS. How you manage to install it on the second
computer is a separate issue. If there is a 5.25-inch bay available in the new computer, you
can remove the 5.25-inch drive from the failed computer, and install it in the new computer.
This is a hardware issue, not covered in this book, but if you install it, configure it as drive
A:, and ensure that the computer will boot from A:. You can then run setup from the 5.25inch floppy disks. The second option does not involve moving the 5.25-inch floppy disk
drive. Create a 3.5-inch startup floppy disk on the remaining DOS computer. Then, you can
copy FDISK.EXE, SYS.EXE, FORMAT.EXE, and other useful programs to the floppy disk.
Take the new startup disk to the new computer, boot up, and use FDISK to create a new
partition on the hard disk. Then use FORMAT /S to format the new partition, and make it
bootable. Then create a DOS directory and copy the DOS files into the DOS directory on the
new computer. Finally, install the application software onto the new computer.
4-5
Survey of Operating Systems, 3e
Chapter 4
Solutions
3. Answers will vary, depending on the experience of the student. The answers we provide here
include DOS programs not directly discussed in this chapter. However, if students spend time
exploring DOS Help, they will discover many useful programs. Here is a list of DOS
commands we have found very useful in our three decades of working with DOS. Brief
descriptions are included, but you can learn more about them by using the DOS Help
program.

ATTRIB.EXE For viewing and manipulating file attributes.

CHKDSK.EXE For finding and repairing certain disk problems.

EDIT.COM Nice MS-DOS editor.

FDISK.EXE Disk partitioning program.

FORMAT Disk formatting program.

MEM.EXE Shows memory usage.

SYS.COM Transfers the DOS system files to a formatted disk to make it bootable.

XCOPY.EXE Enhanced DOS copy program that you can use to copy entire directories
and their contents. It also is faster than the COPY command, because it uses memory
better.

EMM386.EXE A memory management driver used in CONFIG.SYS by PC support
professionals with advanced knowledge of DOS. Depends on HIMEM.SYS being loaded.

MSCDEX.EXE Microsoft CD Extensions, used to add the ability to interact with CDs.
You must call this up from an AUTOEXEC.BAT file after calling up a CD driver file
from CONFIG.SYS. This is an advanced topic.

DELTREE.EXE Enhanced delete program that will delete an entire directory and its
contents, while the internal RD command can only delete an empty directory.

MORE When you run a command and the screen output is too big to fit on it, using the
MORE filter command will display one screen at a time.

UNDELETE.EXE Allows deleted files to be “undeleted.” It depends partly on luck,
because other files can easily overwrite the space a “deleted” program occupies.
4-6
Survey of Operating Systems, 3e
Chapter 4
Solutions
4. The DOS bootup process starts with the PC bootup process, beginning from either a cold or
warm boot, which causes the processor to load a special program (the POST), residing on
ROM BIOS, into memory. After this program completes, another program searches for an
operating system on drive A: (if the computer is configured to boot from A:). If it does not
find an OS on A:, it looks for an OS on drive C:. If it finds DOS on drive C:, it loads the
DOS system files into memory. MS-DOS has two system files, IO.SYS and MSDOS.SYS,
and FreeDOS has one, KERNEL.SYS. FreeDOS’ KERNEL.SYS looks for the
FDCONFIG.SYS configuration file and MS-DOS’s MSDOS.SYS looks for the
CONFIG.SYS configuration file. If the configuration file is found, DOS interprets the
commands in the file (modifying OS values and loading device drivers). Then, in both
versions of DOS, COMMAND.COM is loaded and it looks for AUTOEXEC.BAT. If it finds
AUTOEXEC.BAT, it runs the commands from this file. After this it displays a DOS prompt.
5. A primary partition can contain a single logical drive and is the only type of hard disk
partition that can be used for starting up the operating system. An extended partition can
contain one or more logical drives, but cannot be used for starting up the operating system.
Solution to Lab Project 2.1
1. [While the project lists file names for MS-DOS, the solution can also be applied to FreeDOS,
using the FDCONFIG.SYS file.] A solution to the problem is to turn on the Read-Only
attribute of COMMAND.COM, CONFIG.SYS (or FDCONFIG.SYS), and
AUTOEXEC.BAT.
2. The COMMAND.COM, CONFIG.SYS (or FDCONFIG.SYS), and AUTOEXEC.BAT files
are located on the root of drive C:.
3. To implement the solution on a lab computer with DOS installed on the hard drive, run the
following commands at the DOS Prompt:
ATTRIB +R COMMAND.COM
ATTRIB +R CONFIG.SYS
[or ATTRIB +R FDCONFIG.SYS]
ATTRIB +R AUTOEXEC.BAT
4. To test the solution, attempt to delete each of these files, using the following commands at
the DOS prompt:
4-7
Survey of Operating Systems, 3e
Chapter 4
Solutions
DEL COMMAND.COM
DEL CONFIG.SYS [or DEL FDCONFIG.SYS]
DEL AUTOEXEC.BAT
The result of each of these commands should be an error message: “Access denied.”
Solution to Lab Project 4.2
Answers will vary. We do not believe there is any future for DOS on the desktop, and
even in the embedded market, there are better options, such as Linux.
Solution to Lab Project 4.3
1. To automate the process of creating several directories on ten computers, create a batch file
similar to the following listing, name the batch file with a name, such as NEWDIRS.BAT,
copy it onto a floppy disk, and take the floppy disk to each computer. At each computer,
insert the floppy disk, make the drive current by typing A:, and then run the batch file by
entering the name of the batch file at the command prompt.
Begin code listing
@ECHO OFF
ECHO Subdirectories will be created on drive C:.
PAUSE
C:
CD \
MD DATA
MD \DATA\CUSTOMER
MD \DATA\CUSTOMER\WHLSALE
MD \DATA\CUSTOMER\RETAIL
MD \DATA\SALES
MD \DATA\SALES\ADS
MD \DATA\SALES\PROMOS
4-8
Survey of Operating Systems, 3e
Chapter 4
Solutions
MD \DATA\SALES\PLANS
ECHO The directories have been created.
End code listing
2. If you have problems when you test the batch file, recheck the file. The most likely cause of
problems with the batch file will be typos. Check your typing!
3. To estimate the total time it will take to run the batch file on ten computers, time how long it
takes to run on a single computer, and multiply it by 10. You can estimate the amount of time
it would take to create the directories manually at the ten computers by deleting the
directories you created with the batch files on your computer, and manually creating them
while you keep track of the time spent.
4-9