Wednesday, July 4, 2012

ET0720 Advanced Microcontroller Techology
















Saturday, June 9, 2012

ET0023 OPERATING SYSTEMS [rha030-workbook-student-5.0-2]

Questions
Workbook 1
Workbook 1 / Chapter 1. Logging In

1.Which of the following best describes why Linux is referred to as a multiuser operating system?
( ) a. Multiple users can use the same machine simultaneously, using multiple network connections and dumb
terminals.
( ) b. Multiple users can use the same machine, but only one at a time.
( ) c. Many people contributed to the development of the Linux operating system.
( ) d. Linux is not referred to as a multiuser operating system.

2. Which of the following is not an advantage of using virtual consoles instead of a graphical interface?
( ) a. Virtual consoles often respond more quickly than graphical environments.
( ) b. Virtual consoles operate at the kernel level, and so can be used to debug the system when higher level
components are mis-configured.
( ) c. Virtual consoles are very intuitive, and help is available in an obvious manner.
( ) d. Graphical environments add a lot of complexity to a system, and can make them harder to maintain.

3. From the first virtual console, which key sequence(s) will take you to the second virtual console?
( ) a. CTRL-ALT-2
( ) b. CTRL-ALT-F2
( ) c. CTRL-2 (using the numeric keypad)
( ) d. None of the above.

4. From the X graphical environment, which key sequence(s) will take you to the second virtual console?
( ) a. ALT-F2
( ) b. CTRL-ALT-F2
( ) c. Both a and b.
( ) d. None of the above.

5. If a user has logged into the X graphical environment, but desires to use a terminal command line interface, how
might she go about obtaining a terminal?

( ) a. Using the CTRL-ALT-F3 key-sequence to switch to a virtual console.
( ) b. Clicking the terminal icon that appears in the bottom panel.
( ) c. Right click in the desktop, and choose "Open Terminal" from the pop-up menu.
( ) d. Both a and c

6. What does the who command report?
( ) a. The users who have logged onto the machine since midnight.
( ) b. The users who are currently logged onto the machine, and where they logged on from.
( ) c. The users who are currently logged onto the machine, and how much time they have remaining before
their session expires.
( ) d. The command is used to lookup users from an Internet database of all users.

7. Which of the following is NOT required in order to open a remote shell using ssh?
( ) a. The remote machine must be running the ssh service.
( ) b. You must know the username and password of an account on the machine.
( ) c. The local machine must be a Linux machine.
( ) d. You must know the hostname or IP address of the remote machine.

Workbook 1 / Chapter 2. The Kernel, Programs, and Processes
1.Which of the following is not considered an operating system?
( ) a. Red Hat Enterprise Linux
( ) b. Windows XP
( ) c. Microsoft Office
( ) d. Mac OS X

2. Which of the following is not true for the Linux operating system?
( ) a. Multiple processes appear to be running at the same time.
( ) b. Only one instance of any given program may be running as a process.
( ) c. Programs are stored as files in the filesystem.
( ) d. Only one instance of the kernel may be running at any given time.

3. Which of the following is a true statement?
( ) a. Only the root user may run processes from a shell.
( ) b. The shell is a process that is commonly used to execute other processes.
( ) c. The shell is the kernel component that interacts directly with hardware.
( ) d. Only one instance of a shell may be running as a process.

4. Which of the following is the default shell for Red Hat Enterprise Linux?
( ) a. /bin/bash
( ) b. /bin/tcsh
( ) c. /bin/zsh
( ) d. /bin/sh

5. Which of the following is the command for listing processes?
( ) a. ps
( ) b. lsps
( ) c. lps
( ) d. ls

Workbook 1 / Chapter 3. Examining the Filesystem


1. Assuming the shell’s current working directory is /home/elvis, which of the following would refer to the file
/home/elvis/Mail/sent?
( ) a. Mail/sent
( ) b. /Mail/sent
( ) c. sent
( ) d. /sent

2. As the user elvis, whose shell’s current working directory is /home/elvis, which of the following would refer to
the file received, which is in the directory Mail, which is in the home directory?
( ) a. /home/elvis/Mail/received
( ) b. Mail/received
( ) c. received
( ) d. both A and B.

3. Which of the following commands would list the files in the /usr/lib directory?
( ) a. cat /usr/lib
( ) b. lsdir /usr/lib
( ) c. /usr/lib list

( ) d. ls /usr/lib


4. Which of the following commands would successfully redirect the output of the cal to the file lsout.txt?
( ) a. lsout.txt > cal
( ) b. cal ==> lsout.txt
( ) c. cal > lsout.txt
( ) d. cal } lsout.txt

5. For the user elvis, with /home/elvis for a home directory, which of the following commands would succeed on
a default Red Hat Enterprise Linux installation?
( ) a. ls /etc > /etc/lsetc.txt
( ) b. /etc/lsetc.txt < ls /etc
( ) c. ls /etc > /home/elvis/lsetc.txt
( ) d. /home/elvis/lsetc.txt < ls /etc


Workbook 1 / Chapter 4. Running Commands 


1. Which of the following would be a legitimate invocation of the touch command?
( ) a. touch -k /etc/services
( ) b. touch -ac /etc/services
( ) c. touch -nocreate /etc/services
( ) d. touch -t

2. Which of the following would be a legitimate invocation of the touch command?
( ) a. touch -frm /etc/services
( ) b. touch --cm /etc/services
( ) c. touch --no-create -a /etc/services
( ) d. touch


3. Which best describes why madonna got the "file arguments missing" error message when running touch -r
/etc/services?
( ) a. The -r command line switch requires an argument, which madonna didn’t supply.
( ) b. The file /etc/services does not exist.
( ) c. The touch command could not be found on the system.
( ) d. -r is not a supported command line switch.

4. Which best describes why madonna got the "command not found" error message when running tooch
/etc/services?
( ) a. The file /etc/services does not exist.
( ) b. madonna misspelled the command name, and no command named tooch could be found.
( ) c. The touch command requires a mandatory -a command line switch.
( ) d. madonna does not have the right permissions to execute the command.

5. Which best describes why madonna got the "invalid option" error message when running touch -k /etc/services?
( ) a. The file /etc/services does not exist.
( ) b. madonna misspelled the command name, and no command named touch could be found.
( ) c. The touch command requires a mandatory -a command line switch.
( ) d. The touch command doesn’t support the -k command line switch.

6. When madonna ran the command touch -r /etc/services /tmp/foo, what best describes the role of the word
/etc/services?
( ) a. The word serves as an argument to the touch command.
( ) b. The word serves as an argument to the -r command line switch.
( ) c. The word serves as the name of the command to run.
( ) d. The word is misplaced, and caused the command to exit in failure.

7.When a user runs the command who from the command line, which of the following best describes what happens?
( ) a. The shell asks the kernel to execute the contents of the file /usr/bin/who as a separate process,
displaying the process’s output on the terminal.
( ) b. The shell makes the who system call, prompting the Linux kernel for the output directly.
( ) c. The shell exits, and is replaced by the who process.When the who process terminates, it replaces itself
with a new shell process.


8. When long command line switches were introduced, which best describes why they were preceded with a double
hyphen (such as --size) instead of a single hyphen (such as -size)?
( ) a. The creators of long command line switches liked to type a lot.
( ) b. The word -size could be interpreted as a shortcut for the -s -i -z -e short command line switches, instead of
a single long command line switch.
( ) c. A single hyphen already implied a mandatory command line switch argument.
( ) d. The creators of long command line switches liked to make things complicated.

Workbook 1 / Chapter 5. Managing Terminals


1.Which of the following commands can restore a terminal to sane behavior?
( ) a. sanetty
( ) b. reload
( ) c. start-unicode
( ) d. reset
( ) e. sane

2. Which of the following control sequences can be used to suspend a command?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-Q
( ) d. CTRL-U
( ) e. CTRL-Z

3. If you walk up to a terminal that seems completely non-responsive, which control sequence might restore activity?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-Q
( ) d. CTRL-U
( ) e. CTRL-Z

4. If you suspect that you have mistyped while entering a password, which control sequence would allow you to start
over?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-Q
( ) d. CTRL-U
( ) e. CTRL-Z


5. If you want to cancel a command that is generating too much output, which control sequence would be most
helpful?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-L
( ) d. CTRL-S
( ) e. CTRL-U

6. If you want to freeze the terminal output, so that you can resume it later, which control sequence would be most
helpful?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-L
( ) d. CTRL-S
( ) e. CTRL-U

7. Which control sequence causes bash to clear the screen?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-L
( ) d. CTRL-S
( ) e. CTRL-U

Use the output from the who command to answer the following questions.
[prince@station prince]$ who
blondie tty2 Apr 21 22:07
elvis tty1 Apr 21 22:07
elvis tty3 Apr 21 22:07
root tty6 Apr 21 22:07
prince :0 Apr 21 21:50
prince pts/0 Apr 21 21:53 (:0.0)
prince pts/1 Apr 21 21:54 (:0.0)
prince pts/2 Apr 21 21:55 (:0.0)
madonna pts/3 Apr 21 22:08 (:0.0)


8. How has the user blondie logged onto the Enterprise Linux machine?
( ) a. Using the Login Manager in the X graphical environment.
( ) b. A virtual console.
( ) c. A serial line connected terminal.
( ) d. A ssh network connection
( ) e. The login method cannot be determined with the information provided.

9. How has the user prince logged onto the Enterprise Linux machine?
( ) a. Using the Login Manager in the X graphical environment.
( ) b. A virtual console.
( ) c. A serial line connected terminal.
( ) d. A ssh network connection
( ) e. The login method cannot be determined with the information provided.

10. Which user logged on as the administrative user root?
( ) a. blondie
( ) b. elvis
( ) c. madonna
( ) d. prince
( ) e. It cannot be determined with the information provided.

Workbook 1 / Chapter 6. Getting Help


1.Which of the following is not a way to obtain help for the ls command?
( ) a. help ls
( ) b. ls --help
( ) c. man ls
( ) d. pinfo ls
( ) e. All are legitimate ways of obtaining help.

2. When viewing a man page, which key causes the pager to quit?
( ) a. Z
( ) b. TAB
( ) c. q
( ) d. RETURN
( ) e. SPACE

3. Which chapter of the man pages would contain documentation on the /etc/group configuration file?
( ) a. 1
( ) b. 4
( ) c. 5
( ) d. 7
( ) e. 8


4. Which chapter of the man pages would contain documentation on the groups command?
( ) a. 1
( ) b. 4
( ) c. 5
( ) d. 7
( ) e. 8

5. Which chapter of the man pages would contain documentation on filename suffixes, and the type of file that they
imply?
( ) a. 1
( ) b. 4
( ) c. 5
( ) d. 7
( ) e. 8

6. In the table listing man page chapters, chapter 6 was omitted.What does this chapter contain information on?
( ) a. Unix history
( ) b. hardware devices
( ) c. networking protocols
( ) d. graphical applications
( ) e. games

7. Which of the following commands would generate a keyword search of the man pages for the word sleep?
( ) a. mankey sleep
( ) b. man --key sleep
( ) c. man -key sleep
( ) d. keyword sleep
( ) e. None of the above commands would work.


8. Informally structured documentation is found where in a Red Hat Enterprise Linux distribution?
( ) a. Red Hat Enterprise Linux only includes formally structured documentation.
( ) b. /usr/share/doc
( ) c. /usr/doc
( ) d. /usr/doc/share
( ) e. /tmp/doc/

9. Which of the following interfaces to the info pages allows someone to navigate links with mouse clicks?
( ) a. The pinfo command.
( ) b. The info command.
( ) c. The yelp application.
( ) d. A and C

10. What type of help can be viewed with the GNOME Help Browser, yelp?
( ) a. documentation for GNOME graphical applications
( ) b. man pages
( ) c. info pages
( ) d. A and C
( ) e. All of the above

Workbook 2
Workbook 2 / Chapter 1. Filesystem Navigation


All these questions assume you are logged in as user student on a typical classroom system.
1. Which of the following is a relative directory reference?
( ) a. /home/student
( ) b. /etc
( ) c. ..
( ) d. ~

2. Which of the following could have been displayed by pwd?
( ) a. home/student
( ) b. /etc
( ) c. ..
( ) d. ~

3. Following the command cd ~, which is the most likely result from pwd?
( ) a. /home/student
( ) b. /etc
( ) c. ..
( ) d. ~
Your screen shows the following:
[student@station html]$ cd ../bin
[student@station bin]$ pwd
/home/student/bin
[student@station bin]$ cd -



4. What would be the output of the command pwd?
( ) a. /home/student
( ) b. /home/student/html
( ) c. /home/html
( ) d. -

5. Which of the following pairs of commands always produce the same effect?
( ) a. cd .. and cd -
( ) b. cd / and cd root
( ) c. cwd and pwd
( ) d. cd ~ and cd


Workbook 2 / Chapter 2. Important Directories


1.Which of these is most likely not someone’s home directory?
( ) a. /home/student
( ) b. /root
( ) c. /
( ) d. None of these - all are likely to be home directories

2. The file named.conf is a system configuration file. This file belongs in
( ) a. /tmp
( ) b. /etc
( ) c. /bin
( ) d. /sbin

3. The file e2fsck is a privileged command that must always be available to the system. This file would be found in
( ) a. /tmp
( ) b. /etc
( ) c. /bin
( ) d. /sbin

4. The /root directory is noteworthy because
( ) a. It is the root of the Linux filesystem
( ) b. It is the superuser’s home directory
( ) c. It can always be abbreviated as ~
( ) d. Its contents cannot be read by any user.

5. Which of the following commands could not be used to create a file in /tmp?
( ) a. touch /newfile
( ) b. touch /tmp/newfile
( ) c. touch ../newfile
( ) d. touch ../tmp/newfile



6. T/F: /bin and /usr/bin contain the same files.
( ) a. True
( ) b. False

7. T/F: Only the root user can read files in etc.
( ) a. True
( ) b. False

8. T/F: Files for a website might often be found in /var.
( ) a. True
( ) b. False

9. T/F: Configuration files that customize each user’s account are placed in /etc/users.d.
( ) a. True
( ) b. False

10. T/F: X uses /tmp.
( ) a. True
( ) b. False


Workbook 2 / Chapter 3. Managing Files


1. The command to make a duplicate of a file is
( ) a. dupe
( ) b. rep
( ) c. copy
( ) d. cp

2. To copy file1.txt to file2.txt, you could use
( ) a. cp file1.txt > file2.txt
( ) b. cp file1.txt file2.txt
( ) c. dupe file1.txt file2.txt
( ) d. mv file1.txt file2.txt

3. The successful command mv f1 f2 f3 f4
( ) a. moves four items from the current directory
( ) b. moves four items to the current directory
( ) c. moves four items to the default directory
( ) d. moves three items from the current directory

4. To erase the file file1 from the current directory, you could use
( ) a. rm file1
( ) b. erase file1
( ) c. del file1
( ) d. cut file1

5. The command cp file.a file.b will clobber file.b if
( ) a. file.a is an ordinary file
( ) b. file.a is non-empty
( ) c. file.b is an ordinary file
( ) d. file.b is a directory


6. If /home/student is a directory, then the command rm /home/student will
( ) a. remove all files in the directory
( ) b. delete the directory from the filesystem
( ) c. delete the student user account
( ) d. produce an error message

7. The command echo file.1 file.2 will
( ) a. copy file.1 to file.2
( ) b. display the contents of file.1 and file.2 on STDOUT
( ) c. produce an error message because there is no redirection symbol
( ) d. display "file.1 file.2" on STDOUT

8. The command ls > file.1 will
( ) a. produce an error message because > is an unprotected shell meta-character
( ) b. append the normal output of ls to file.1
( ) c. replace file.1 if it already exists
( ) d. fail if file.1 already exists

9. Assuming both exist, the command mv item.1 item.2 will move an entire subdirectory tree
( ) a. only if both item.1 and item.2 are existing subdirectories
( ) b. only if special command options are used
( ) c. only if item.2 is empty
( ) d. only if item.1 is empty

10. The command cp item.1 item.2 will copy an entire subdirectory tree
( ) a. only if both item.1 and item.2 are existing subdirectories
( ) b. only if special command options are used
( ) c. only if item.2 is empty
( ) d. only if item.1 is empty

Workbook 2 / Chapter 4. Managing Directories

1.Which command will list the contents of the directory report recursively?
( ) a. lsdir report

( ) b. ls --recur report
( ) c. ls -r report
( ) d. ls -R report
( ) e. ls report \r



The user hogan is executing the following command.
[hogan@station hogan]$ cp rep1.txt rep2.txt rep3.txt reps



2. For the command to succeed, which of the following statements must be true?
( ) a. The file rep1.txt must be a text file.
( ) b. The file rep1.txt must be an existing directory.
( ) c. The file reps must be an existing directory.
( ) d. The files rep1.txt, rep2.txt, and rep3.txt must be existing directories.
( ) e. The command cannot succeed, because the -r command line switch must be specified when using multiple arguments.

3. Which command creates a new, empty directory?
( ) a. md
( ) b. nd
( ) c. mkdir
( ) d. newdir
( ) e. touch -d
In his home directory, hogan has a directory called website, which contains various files and subdirectories, and a
currently empty directory called archive, as illustrated in the following graph.
.
|-- archive/
‘-- website/
|-- forms/
|-- html/
| |-- index.html
| |-- page1.html
| |-- page2.html
| ‘-- page3.html
‘-- media/
|-- photos/
| |-- picture1.png
| ‘-- picture2.png
‘-- songs/
|-- song1.midi
‘-- song2.midi


For the following questions, assume that the current working directory is hogan’s home directory, /home/hogan.

4. What would be the effect of the following command? cp -r website archive
( ) a. The directory archive would be clobbered, and replaced with a copy of the website directory.
( ) b. The directory archive would contain a new subdirectory called website.
( ) c. An error, because the cp command does not work on directories.
( ) d. An error, because -r is not a legitimate switch for the cp command.
( ) e. None of the above

5. What would be the effect of the following command? cp website archive/website.bak
( ) a. The directory archive would contain a new subdirectory called website.bak.
( ) b. An error, because the directory archive/website.bak does not exist.
( ) c. An error, because the -r command line switch must be included when copying directories.
( ) d. An error, because the correct command to use is cpdir.
( ) e. None of the above

6. What would be the effect of the following command? mv -r website archive
( ) a. The directory archive would be clobbered, and replaced with the website directory.
( ) b. The directory archive would contain a new subdirectory called website.
( ) c. An error, because the mv command does not work on directories.
( ) d. An error, because the mv command does not recognize the -r command line switch.
( ) e. None of the above

7. Which of the following commands would move the website/media directory and its subdirectories to
archive/media
( ) a. mv -r website/media archive/media
( ) b. mv website/media archive/media
( ) c. mv website/media archive
( ) d. Both B and C
( ) e. All of the above


8. Which of the following commands would remove the website/media directory and its subdirectories?
( ) a. rmdir website/media
( ) b. rm website/media
( ) c. rm -r website/media
( ) d. Both A and C
( ) e. All of the above

9. Which of the following commands would copy the website directory, and all of its subdirectories except
website/media/photos?
( ) a. cp -x photos website archive
( ) b. cp -d2 website archive
( ) c. cp -x photos website archive/website
( ) d. cp -d2 website archive/website
( ) e. None of the above

10. Why would someone be tempted to use rmdir instead of rm -r?
( ) a. To ensure that overlooked files in the directory are not unintentionally erased.
( ) b. Because the rmdir command works recursively, without needing to specify a command line switch.
( ) c. The rmdir command creates an automatic backup of everything it removes.
( ) d. Both B and C
rha030-5.0-






Workbook 2 / Chapter 5. File Names and File Globbing


Note: The following questions all end in an appropriate question mark, which should not be considered part of
any specified commands.
Use the output from the following command to answer the next 5 questions.

[elvis@station files]$ ls
ebbs eras lakes lit loop olden rank renew robe run whirr
echo erect lamed lives lorry one rapid reply robed wagon whorl
elope ergo lash loads lost ounce rasp retry rock wares wile
enact erupt lead loath loves oust rays rho rocky ways windy
end evens leaks lobby lows ovary razor rigid rooms weak witty
enjoy evoke leaps locus loyal overt read rigs roses weep wools

entry ewes learn logic lucks racks reaps rime rouge wench wound
envoy lace leech login oaks radon recta riots rove west wrens
epic laced lick loin obese raged recur risks row wet writ

1. Which of the following files would be included in the output of the command ls r*s ?
[ ] a. eras
[ ] b. raged
[ ] c. rigs
[ ] d. retry
[ ] e. racks
[ ] f. wrens



2. Which of the following files would be included in the output of the command ls r?? ?
[ ] a. eras
[ ] b. row
[ ] c. riots
[ ] d. rho
[ ] e. wet
[ ] f. run

3. Which of the following files would be included in the output of the command ls [aeiou]??? ?
[ ] a. ebbs
[ ] b. lead
[ ] c. oft
[ ] d. whip
[ ] e. oaks
[ ] f. oust

4. Which of the following files would be included in the output of the command ls *[^aeiou] ?
[ ] a. ebbs
[ ] b. rove
[ ] c. one
[ ] d. rasp
[ ] e. ways
[ ] f. era


5. Which of the following files would be included in the output of the command ls [aeiou]?e* ?
[ ] a. ebbs
[ ] b. rove
[ ] c. one
[ ] d. rasp
[ ] e. ways
[ ] f. rouge







Use the following recursive listing of the /etc/X11/gdm directory to answer the following questions.
[student@station student]$ ls -R /etc/X11/gdm/
/etc/X11/gdm/:
factory-gdm.conf gnomerc locale.alias PreSession XKeepsCrashing
gdm.conf Init PostSession Sessions
/etc/X11/gdm/Init:
Default
/etc/X11/gdm/PostSession:
Default
/etc/X11/gdm/PreSession:
Default
/etc/X11/gdm/Sessions:
default Default Failsafe GNOME KDE



6. Which of the following files would be included in the output of the command ls /etc/X11/gdm/S*/*a* ?
[ ] a. /etc/X11/gdm/Init/Default
[ ] b. /etc/X11/gdm/locale.alias
[ ] c. /etc/X11/gdm/factory-gdm.conf
[ ] d. /etc/X11/gdm/Sessions/Default
[ ] e. /etc/X11/gdm/Sessions/Failsafe
[ ] f. /etc/X11/gdm/Sessions/default


7. Which of the following files would be included in the output of the command ls /etc/X11/gdm/*/*[Ef] ?
[ ] a. /etc/X11/gdm/gdm.conf
[ ] b. /etc/X11/gdm/factory-gdm.conf
[ ] c. /etc/X11/gdm/Init/Default
[ ] d. /etc/X11/gdm/Sessions/GNOME
[ ] e. /etc/X11/gdm/Sessions/KDE
[ ] f. /etc/X11/gdm/Sessions/Failsafe

8. Which of the following files could be included in the output of the command ls /etc/*.?? ?
[ ] a. /etc/issue.net
[ ] b. /etc/mail.rc
[ ] c. /etc/php.ini
[ ] d. /etc/huh.??
[ ] e. /etc/xpdfrc.ja
[ ] f. /etc/gss-1.0

9. Which of the following files could be included in the output of the command ls /etc/[akp]??[0-9]* ?
[ ] a. /etc/krb5.conf
[ ] b. /etc/as5-0
[ ] c. /etc/pbm2ppa.conf
[ ] d. /etc/a2ps.cfg
[ ] e. /etc/php.ini
[ ] f. /etc/krc8

10. Which of the following files would be included in the output of the command ls
/etc/[aeiou][^aeiou]??[aeiou]* ?
[ ] a. /etc/adjtime
[ ] b. /etc/issue
[ ] c. /etc/aeplog.conf
[ ] d. /etc/at.deny
[ ] e. /etc/at.allow
[ ] f. /etc/auto.tab



Workbook 2 / Chapter 6. Examining Files


Use the file command to help answer the following 2 questions.
1. What type of file is /usr/bin/htmlview?
( ) a. A compiled ELF Executable
( ) b. An Awk script
( ) c. A Bash (Bourne-Again) shell script
( ) d. A Symbolic Link
( ) e. A /usr/bin/perl script

2. What type of file is /dev/log?
( ) a. A character special file
( ) b. A block special file
( ) c. A socket
( ) d. A named pipe
( ) e. A compiled ELF executable


3. Which of the following commands would act the same as cp a.txt b.txt, assuming the file b.txt does not
exist?
( ) a. cat -5 a.txt b.txt
( ) b. cat a.txt b.txt
( ) c. cat -A a.txt > b.txt
( ) d. cat a.txt > b.txt
( ) e. None of the above.

4. Which of the following key sequences can be used to quit the less pager?
( ) a. q
( ) b. x
( ) c. CTRL-C
( ) d. Both A and C
( ) e. All of the above

5. While reading the file /etc/services, which of the following is an advantage of the less pager over the more
pager?
( ) a. less allows the user to browse output one page at a time, while more does not.
( ) b. less recognizes familiar navigation keys, such as UpArrow and PgDown.
( ) c. less allows users to page backwards through the file, while more only allows users to page forwards.
( ) d. less allows the user to quit with a simple q, while more requires a CTRL-C
( ) e. All of the above

6. Which of the following commands would display the first 5 lines of the file /etc/passwd?
( ) a. head -5 /etc/passwd
( ) b. head -n /etc/passwd
( ) c. head --five /etc/passwd
( ) d. head /etc/passwd > 5
( ) e. head /5 /etc/passwd

7. Why would you expect trouble from the following command?

[bob@station bob]$ head /bin/ls
( ) a. The user bob does not have permissions to read the file /bin/ls.
( ) b. The head command must be called with the -n command line switch, to specify how many lines to show.
( ) c. The file /bin/ls is too small for the head command
( ) d. The file /bin/ls is a binary file, and the head command works primarily on text files.
( ) e. None of the above.

8. How can a user stop the tail -f command?
( ) a. There is no need to, as the command times out after 10 seconds.
( ) b. By typing the q key.
( ) c. With the CTRL-Q control sequence.
( ) d. By switching virtual consoles.
( ) e. None of the above.


Use the following output to help in answering the next two questions.
[alice@station alice]$ cat -An /etc/fstab
1 LABEL=/ / ext3 defaults 1 1$
2 LABEL=/boot /boot ext3 defaults 1 2$
3 none /dev/pts devpts gid=5,mode=620 0 0$
4 none /proc proc defaults 0 0$
5 none /dev/shm tmpfs defaults 0 0$
6 /dev/hda2 swap swap defaults 0 0$

9. Which of the following is NOT true?
( ) a. The /etc/fstab file is 6 lines long.
( ) b. The columns in the /etc/fstab are separated by tabs instead of spaces.
( ) c. The /etc/fstab file is a text, instead of binary, file.
( ) d. The commands head -8 /etc/fstab and tail -6 /etc/fstab would produce identical output.
( ) e. None of the Above.

10. How would the output of the commands cat /etc/fstab /etc/fstab and head /etc/fstab
/etc/fstab differ?
( ) a. The first command would only list the contents of the /etc/fstab file once.
( ) b. The first command would display tabs as visible characters.
( ) c. The second command would only show the first 10 lines of the duplicated /etc/fstab file.
( ) d. The second command would include banners identifying the filename in the output.
( ) e. None of the Above.







Tuesday, April 10, 2012

ET0023 OPERATING SYSTEMS

MST Quiz / LECTURE 1 - LECTURE 4

Q1. Which of the following is NOT a component of a thread?

a. File handler
b. Registers
c. Program counter
d. Process Identifier

Q2. Which operating system makes the user aware of other computers on a network?

a. Time-sharing operating system
b. Multi-tasking operating system
c. Real-time operating system
d. Network operating system

Q3. Which of the following systems is used in an intelligent home entertainment system that is network aware?

a. Network operating system
b. Real-time operating system
c. Distributed operating system
d. Embedded operating system

Q4. In a MS-DOS system, process A creates a child process B and later, B creates process C. When process C is executing,

a. Processes A and B are also executing at the same instance
b. Process B is also executing, with A suspended
c. Process A is also executing, with B suspended
d. Process A and B must be suspended

Q5. Select the best statement regarding cooperative multitasking

a. Each process is given physical resources which runs to completion before release
b. Each process is given a timeslot, and works though the timeslot until completion
c. Each process is given a timeslot, and works until its time is up
d. Each process is given a timeslot, and works until its time is up or is interrupted by the OS

Q6. A good algorithm in process scheduling should

a. Minimize Latency: Minimize Response/Job completion time
b. Maximize Throughput: Maximize number of jobs in a given time
c. Maximize Utilization: Keep all devices busy
d. Fairness: Every job makes progress, no job starves
e. All of the above

Q7. Which of the following scheduling policies is used by the Windows 7 operating system?

a. FCFS
b. SJF
c. RR
d. Priority queues

Q8. There process P1, P2 and P3 arrived at the same time at T=0 and all there process completed at time T=6. Each process was given 2 units of time slices. Determine the average turnaround time for the three processes.

T=0        1        2        3            4              5           6
P1P2P3P1P3P2

a. 2
b. 3
c. 5
d. 6

Q9. What is an advantage of using Interrupt systems for the servicing of I/O devices by a CPU?

a. Allows priority assignment of devices
b. Allows devices to request and obtain service instantly
c. It can be implemented very easily using hardware
d. It can be implemented very easily using software

Q10. Which of the following operations are suited to Direct Memory Access?

a. Data transfer to the Graphics Display Unit
b. Data transfer to the Video Display card
c. Data transfer from hard disk storage
d. Data transfer from the keyboard to software

Q11. Which of the following statements best describes the role of an operating system?

a. A software layer that drives the hardware of the computer
b. A software layer that controls the technical aspects of a computer’s operation.
c. A software layer that controls the software running on the computer.
d. A software layer that drives the file system and I/O of the computer.

Q12. An advantage of using First-Come-First-Served scheduling is

a. Simplicity
b. Maximization of throughput
c. Minimization of waiting times
d. Prioritization of jobs

Q13. Process scheduling has to be performed so that

a. The CPU is kept as busy as possible.
b. All the memory can be used to maximize throughput
c. All the I/O devices can be utilized efficiently
d. All of the above is applicable.

Q14. A parent process (A) creates 2 child processes (B and C) which in turn create two child processes each (B1, B2 and C1, C2). What would happen if the process A was pre-maturely killed?

a. The processes will continue execution
b. The processes B and C will be killed but processes B1,B2, C1 and C2 will continue execution
c. All processes associated with A will be killed.
d. It would be impossible to kill process A

Q15. Which of the following is NOT a role of the OS in process management?

a. Creation of the process
b. Suspension of the process
c. Resetting of the process for error control
d. Termination of the process

Q16. A typical tape drive storage can store approximately

a. 10 Gb
b. 100GB
c. 1TB
d. 10 TB

Q17. A hard disk has 4 read/write heads, 8 platters, 320 cylinders, with 26 sectors per track. How much data is usually stored in a sector?

a. 256 bytes
b. 512 bytes
c. 6 Kilobytes
d. 1,92 Megabytes

Q18. An interactive application makes use of threads to speed up its processing and to increase responsiveness to the program. In which areas, would a thread or threads help

a. Using threads to update display areas on the screen
b. Using threads to answer requests on the network interface
c. Using threads to compute the shadow and graphic rendering of images.
d. All of the above cases are valid.

Q19. User programs are allowed to access the operating system using

a. System calls
b. User interfaces
c. Libraries
d. External programs

Q20. A typical high-speed drive spins its platters at

a. 540 RPM
b. 720 RPM
c. 5400 RPM
d. 7200 RPM

Q21. Which of the following is a prime consideration for scheduling policy of a Real-time processing system?

a. Maximum utilization of the CPU
b. Minimize waiting time
c. Meeting hard deadlines
d. Minimize context switching

Q22. In a multi-tasking system which of the following will each process be competing for

a. System resources
b. Memory
c. I/O devices
d. All of the above

Q23. Which of the following statements about user-level multi-thread is not true?

a. It is implemented by a thread library at user-level
b. It is fast to create and manage the user-level threads
c. If one thread performs a blocking system call, all other threads will be blocked
d. Thread control tables are kept in the kernel memory space.

Q24. Which of the following is TRUE when a process is being executed?

a. The OS will be in sleep mode, the process has control
b.The OS will be in supervisory mode, monitoring the access of the process
c. All memory registers will be available to process
d. All I/O systems will be available to the process

Q25. Select the correct sequence of states when a process is in the system:

a. Ready – terminated – running
b. Running – ready – running
c. Waiting – running – ready
d. Ready – waiting – running

Q26. Which of the following is NOT a characteristic of a thread?

a. User controlled within a program.
b. Shares resources with the main process
c. Requires a multi-core processor to run
d. Can be assigned priorities

Q27. A non-preemptive Shortest Job First scheduling system has the disadvantage of

a. Scheduling shortest jobs first
b. Scheduling shortest last
c. Not knowing the actual time required for the job
d. Not knowing the actual memory requirements for the job

Q28. A CPU with a three-bus architecture has

a. Address, Data and Control buses
b. Address, Data and Execute buses
c. Address, Command and Data buses
d. Instruction, Data and Control buses

Q29. The access time of a hard disk defines

a. How fast data is stored on the drive
b. How fast data is retrieved from the drive
c. The average time required to write data to the drive
d. The average time required to read or write data from the drive

Q30. A multiprocessing system operates on a

a. Time sharing system
b. Equally sharing system from the I/O devices
c. Multi-processor system
d. Multi-threaded on multiprocessor system

Q31. A second generation computer and Operating System operated on

a. Vacuum tubes
b. Transistor and batch systems
c. Integrated Circuit system
d. Multiprogramming systems

Q32. In order to create an executing program from source code, the program has to be

a. Interpreted
b. Compiled
c. Compiled and linked with other functions
d. Compiled and linked with systems libraries of the OS

Q33. Which register(s) in the CPU keep track of the next instruction to be executed?

a. Instruction register
b. Program counter
c. Control register
d. Logic Unit

Q34. From the x.86 CPU system, which of the following handles high speed memory and I/O operations?

a. The CPU chipset
b. The Northbridge
c. The Southbridge
d. The System and I/O buses

Q35. In order to perform process context switching, the CPU

a. Must be in constant communication with the memory
b. Must be working with 100% utilization
c. Must be able to store the current process status and load the next process control block
d. Must be able to move the current process to I/O storage and load the next process control block

Q36. A process is terminated using the “pskill” command in Linux. This termination is known as

a. Normal exit (voluntary)
b. Error exit (voluntary)
c. Fatal error (involuntary)
d. Killed by another process (involuntary)

Q37. A multi-tasking system

a. Can run multiple process at the same time
b. Can run multiple process at the same time using multiple threads
c. Runs only one process, but switches between other processes using time-slices
d. Runs only one process, but switches between other processes using interrupts

Q38. A thread is usually created as part of a mini process

a. To run a helper program for faster mathematical computation
b. Within a process to run different sections of the code in parallel
c. To access different I/O devices separately
d. As an interrupt service routine

Q39. The operating system on a batch processing system

a. Can run only one job at a time because it ran off a single CPU
b. Can run more than one job at a time because it run off multiple CPUs
c. Can run more than one job at a time because it multi-tasked the jobs
d. Can run only one job at a time because it could not share the CPU

Q40. What is the difference between a Personal Operating system (e.g. Windows XP) and a Server Operating system (Windows Server 2003)?
a. The Personal Operating System is tuned to handle file and I/O operations
b. The Server Operating System is tuned to handle file and I/O operations
c. The Server Operating System is tuned to run multiple background processes
d. There is no difference between the two operating systems

Q41. Which of the following is the most common method of accessing information by a CPU using three-bus architecture?

a. Fetch-Execute-Decode
b. Fetch-Decode-Execute
c. Decode-Fetch-Execute
d. Fetch-Execute-Store

Q42. For the x86 CPU system, which of the following handles low speed I/O interface operations?

a. the CPU chipset
b. the Northbridge
c. the Southbridge
d. the System and I/O buses

Q43. The command g++ -o hello.cpp (on a Linux system) creates

a. an executable file “hello”
b. an executable file “hello.exe”
c. an object code file “hello.o”
d. an error, the command gcc should be used instead of g++

Q44. When a process is interrupted by the OS in the middle of its time slot, the process goes to the

a. new state
b. ready state
c. waiting state
d. terminated state

Q45. An operating system uses batch processing. The OS will run jobs that

a. are only CPU bound
b. are only I/O bound
c. are not interactive with the users
d. are real-time processes

Q46. Which of the following was a commonly used single-task operating system for personal computers in 1970s-80s?

a. MS-DOS
b. Windows 3.0
c. UNIX
d. All the above

Q47. The term “quantum” is used to represent

a. the amount of time given to a process for execution
b. the amount of memory given to a process for execution
c. the amount of resources given to a process for execution
d. 1/n of the total time, where n is the number of processes running

Q48. A process is started which perform some computation and I/O requests. Upon completion of the tasks, the process terminates. The termination is known as

a. Normal exit (voluntary)
b. Error exit (voluntary)
c. Fatal exit (involuntary)
d. Killed by another process (involuntary)

Q49. Which of the following operating systems best suits interactive user involvement?

a. Real time operating systems
b. Multitasking operating systems
c. Batch processing systems
d. Embedded operating systems

Q50. What is the major disadvantage of using a Last-In-First-Out scheduling policy?

a. Maximum utilization of the CPU
b. Minimize waiting time
c. Meeting hard deadlines
d. Minimize context switching

Q51. In comparing a process to a thread,

a. a thread is developed and executed under user control
b. a thread is created by a process when the process feels that parallel processing is required
c. a thread is created by a process when there is a need for I/O operations
d. a thread is developed as part of the interrupt service routes

Q52. The instruction and data cache of a CPU is constructed using

a. Memory registers similar to those used in the main memory
b. The fasted available memory
c. The largest density of memory
d. ROM material

Q53. The purpose of process scheduling is to

a. maximize the waiting time for each of the processes
b. maximize I/O utilization
c. maximize CPU utilization
d. minimize the-throughput of the system

Q54. Which of the following statements about process and thread is true?

a. Processes are threads are both running instances of a program
b. Threads within a process share the same memory spaces, codes and I/O resources
c. A thread is a mini version of a process and threads do not share any resources with other processes
d. Processes from the same software programme share the memory spaces, code tables and I/O resources

Q55. Which of the following is an advantage of Direct Memory Access?

a. Speeds up I/O operations between CPU and devices
b. Speeds up Memory operations between CPU and devices
c. Allow direct transfer of data from I/O devices to the memory
d. Allows direct transfer of data from I/O devices to the CPU

Q56. In which mode can the CPU execute every instruction in its instruction set and use every feature of the computer hardware?

a. Supervisor mode
b. Application mode
c. User mode
d. Kernel mode

Q57. Which of the following multi-tasking systems require a system clock?

a. Pre-emptive multitasking
b. Non pre-emptive multitasking
c. Cooperative multitasking
d. Time-sharing systems

Q58. In a RR scheduling system, if the quantum is increased,

a. The system will follow a FCFS scheduling policy
b. The processes will run more efficiently
c. The processes will terminate later
d. There will be more context-switching

Q59. What is defined as the “throughput time” of a process?

a. The total time before an I/O device completes the job
b. The total time from start to finish of the process
c. The total time the process takes to run on the CPU
d. The time the process has to wait before it enters the execution phase

Q60. Which one of the statements is correct in comparing a process to a thread?

a. A thread is considered as a heavy-weight process
b. A thread shared the same codes and file identifier as the parent process
c. All threads created by a process shared the same stacks and registers
d. A thread is more expensive in CPU time during context switching

Q61. Which of the following is classified as static storage?

a. Cache memory
b. Main memory
c. Magnetic disk or tape
d. Registers

Q62. Which of the following systems do NOT have an operating system?

a. Personal desktop computer
b. Basic mobile handphone
c. Washing machine with embedded system
d. None of the above

Q63. What is an advantage of using Polling for the servicing of I/O devices by a CPU?

a. Allows priority assignment of device
b. Allows devices to request and obtain service at any time
c. It can be implemented very using hardware
d. It can be implemented very using soft ware

Q64. Determine the completion time of process Job A in multi-tasking performance of the CPU.

JobArrival timeCPU time required1 CPU process2 CPU processes
A10:00 am5 secondsCPU Idle0.80.7
B10:10 am4 secondsCPU busy0.20.3
CPU/process0.20.15

a. 10:20am
b. 10:25am
c. 10:30am
d. 10:45am

Q65. Select the most correct statement regarding programs and processes

a. A program creates a single process
b. A program can create multiple processes
c. A program creates a single process which later creates multiple processes
d. A program creates a process which can create other programs

Q66. Select the correct statement regarding resource management by the Operating System

a. The OS manages the way the data is output to the I/O device
b. The OS manages the way the I/O device is shared between different processes
c. The OS manages the way the I/O resource is used by the process
d. The OS manages the way the process uses the I/O device

Q67. What is defined as the “waiting time” of a process?

a. The total time before an I/O device becomes ready
b. The total time from start to finish of the process
c. The total time the process has to wait before it can run
d. The time the process has to wait before it enters the execution phase

Q68. Which of the following is NOT an algorithm used by the process scheduler in determining the execution of a process?

a. How much CPU time should be allocated
b. Who gets the next execution state (priority)
c. Which process will be terminated
d. When the process will be interrupted

Q69. In most operating systems the term “kernel” is used to represent

a. A set of software dedicated to the control of running other processes on the system
b. A set of software dedicated to the control of I/O devices on the system
c. A set of software dedicated to the control of memory for the system
d. A set of software drivers that interface the hardware to the software of the system

Q70. Which of the following is NOT a multitasking operating system?

a. MS-DOS
b. Windows XP
c. Linux
d. OS/2

Q71. Select the CORRECT statement regarding processes and threads

a. A single process may generate multiple threads
b. A single task process may only generate a single thread
c. Multi-tasking processes are only allowed to generate multiple threads
d. A thread can only generate a single process

Q72. What advantage does the API provide for the system programmer?

a. Provides a consistent interface to the OS
b. Provides better control to hardware devices
c. Provides better libraries for development of system routines
d. Provides a simpler method of writing programs

Q73. In order to run multiple processes, the OS must

a. Be able to load and reload the program counter from different processes
b. Perform context switching between different processes
c. Perform context switching between different process blocks
d. Perform switching of memory and code area using segmentation

Q74. Which of the following is NOT a characteristic of a Program?

a. It is a sequence of instructions
b. It can be stored on secondary storage
c. It takes up RAM space
d. It can consist of one or more files

Q75. A process executes taking up 80% of CPU utilization, this process is

a. A CPU-bound process
b. An I/O-bound process
c. A shared CPU and I/O bound process
d. A I/O-burst process

Q76. Which of the following is NOT a key element of an operating system?

a. A simple command language which enables users to run their own programs
b. An organised file system
c. An entry point in its code to allow basic operations for reading/writing I/O devices
d. Device drivers that allow the control of the hardware of the computer

Q77. Direct memory access is used to

a. Speed up I/O operations between the CPU and I/O devices
b. Speed up memory operations between the CPU and memory devices
c. Provide parallel operations for I/O requests with the CPU
d. Provide parallel I/O transfers to memory with the CPU

Q78. In the process of executing instructions, which CPU bus carries bi-directional data?

a. Address bus
b. Data bus
c. Control bus
d. All of the above

Q79. Which of the following scheduling policies is used by the Linux operating system?

a. FCFS
b. SJF
c. RR
d. Priority queues

Q80. Why is process switching considered “expensive”?

a. You have to pay for special context-switching CPUs to perform this task
b. You have to use up CPU time to switch the processes
c. You have to use up extra memory to switch the processes
d. You have to use up process scheduler resources in order to switch the processes

Q81. A multi-tasking operating system running on a single-threaded CPU achieves multi-tasking capabilities by

a. Using batch processing of multiple jobs
b. Splitting each operation up into threads and executing them one at a time
c. Splitting up the time it allocates in processing each of the multiple processes run simultaneously
d. Using a scheduler to allocate tasks on a first-come-first-serve basis to the CPU

Q82. The term “spooling” is used to describe the process of

a. Assembling a number of threads in a “spool” or ready queue for execution
b. Assembling a number of processes in a “spool” or ready queue for execution
c. Reading a number of programs and placing them on the disk for later execution
d. Reading a number of processes and converting them to threads

Q83. Which of the following is TRUE regarding threads?

a. A thread is scheduled in a similar manner as a process
b. Threads from a process share the same resource area
c. Threads are expensive to switch in terms of memory
d. Threads require registers, stack and separate memory space to run

Q84. Which of the following is NOT a task of Process Management in the creation of a process?

a. Naming the process
b. Creating the process control block
c. Allocating the resources to the process
d. Scheduling the process

Q85. In the writing of interrupt service routines, which of the following MUST always be done?

a. You have to reset the interrupt flag to allow other interrupts to occur
b. You gave to save the data that you were working on
c. You have to save the address location of the current program
d. You have to save the status of the current program before servicing the interrupt request

Q86. When a process runs out of its time-slot, the process goes to the

a. New state
b. Ready state
c. Waiting state
d. Terminated state

Q87. On a single processor system

a. Only one process can be run at any time
b. Multiple processes can be run at any time
c. Multiple processes can be run using multi-tasking control on the CPU
d. Only one process can be run using multi-tasking control on the CPU

Q88. The _____ converts a program to a process and places it in the ready queue.

a. Loader
b. Compiler
c. Linker
d. Scheduler

Q89. Which of the following is NOT s task of Process Management?

a. Efficient and fair use of resources
b. Efficient and fair use of the CPU
c. Management of file and I/O space
d. Management of the power utilization of a system

Q90. The basic instruction format of any CPU must consists of

a. The op-code
b. The instruction address
c. The data
d. The control signals

Q91. Which of the following policies is usually implemented on a multi-tasking system?

a. FCFS
b. LIFO
c. SJF
d. RR

Q92. A system which used priority scheduling is tuned using the arrival time as the highest priority, the system can now be approximated to a

a. FCFS
b. LIFO
c. RR
d. SJF

Q93. Which of the following techniques is used with Direct Memory Access?

a. CPU-I/O stealth operations
b. CPU-Memory stealth operations
c. CPU cycle stealing
d. CPU Block Memory requests

Q94. The Round-robin scheduling policy is usually coupled with which policy in order to enhance the processing of system processes?

a. FCFS
b. SJF
c. Priority queues
d. SRTF

Q95. Windows XP is a ___________ operating system.

a. Single-user, single-tasking
b. Single-user, multi-tasking
c. Multi-user, single-tasking
d. Multi-user, multi-tasking

Q96. The Red Hat Enterprise Linux Rev 6.1 is a _____ operating system.

a. Single-user, single-tasking
b. Single-user, multi-tasking
c. Multi-user, single-tasking
d. Multi-user, multi-tasking

Q97. Which of the following is NOT part of a process?

a. Source code
b. Registers
c. Data space
d. Stack

Q98. In a multi-tasking environment, the process scheduler must first try to

a. Ensure fairness for all processes
b. Maximize the throughput
c. Maximize the waiting time
d. Ensure that CPU is utilized 100%

Q99. For interactive systems, which of the following scheduling criterion should be used?

a. CPU time and throughput
b. CPU time and response time
c. Throughput and Waiting time
d. Response time and Turnaround time

Q100. Comparing to processes, which of the following is not an advantage of threads?

a. Since threads are mini-processes, more threads will acquire more slices of the CPU time in some scheduling policy
b. Threads increase the user responsiveness within a process
c. Threads can take advantage of multiprocessor architectures to run Multiple threads in parallel
d. Thread is more economical as it requires lower CPU overhead switching cost

Q101. Select the most correct statement:

a. A process is the same as a program
b. A program can be used to create a process through compilation
c. A program becomes a process when it executes
d. A process is the way a programme is compiled and linked with the API

Q102. The Process Table in the OS structure is used

a. To store all active processes
b. To store all resources used by a process
c. To store the ready and current processes on the system
d. To store suspended processes on the system

Q103. Which of the following is NOT a scheduling criterion?

a. CPU utilization
b. Throughput
c. Response time
d. Execution time

Q104. Which of the following policies is NOT implemented on a multi-tasking system?

a. FCFS
b. LIFO
c. SJF
d. RR

Q105. What is an advantage of using an API?

a. Allows direct access to the OS Kernel
b. Allows direct access to the system hardware
c. Provides the necessary access libraries to the OS commands
d. Provides the necessary access libraries to the system hardware

Q106. When a process requires an I/O operation, the process goes to the

a. New state
b. Ready state
c. Waiting state
d. Terminated state

Q107. In the instruction decode / execute state, which bus is inactive?

a. Address bus
b. Data bus
c. Control bus
d. All of the above

Q108. When a process completes within its time slot with extra time to spare, the process goes to the

a. New state
b. Ready state
c. Waiting state
d. Terminated state

Q109. Which of the following is NOT a prime consideration for the scheduling policy of a Batch processing system?

a. Maximum utilization of the CPU
b. Minimize waiting time
c. Minimize the response time
d. Minimise context switching

Q110. A process control block does NOT contain

a. Stack spare
b. Heap spare
c. Executable code
d. I/O devices

Q111. Which of the following scheduling policies is used by the MSDOS operating system?

a. FCFS
b. SJF
c. RR
d. Priority queues

Q112. Select the INCORRECT statement regarding CPUs

a. CPUs are currently constructed using VLSI with high-densities of transistor circuitry
b. Most CPUs are driven by a clock
c. Each CPU instruction completes in a single clock cycle
d. CPUs contain registers, arithmetic and logic units

Q113. A networked graphical application is written using multiple threads. In which area of the application would threads be most probably used?

a. Using threads to update display areas on the screen
b. Using threads to answer requests on the network interface
c. Using threads to compute the shadow and graphic rendering of images
d. All of the above cases are valid

Q114. A ‘virtual machine’ means?

a. A non-existent imaginary machine
b. A machine which can perform any job
c. A system where different OS requiring different hardware are run on the same platform and each OS thinks it has complete control
d. A machine which can be configured to run like any machine with any operating system

Q115. Which of the following design structures is used by the Linux operating system?

a. Monolitchic system
b. Layered system
c. Virtual machines and exokernals
d. Client-server

Q116. The specific technique or method which an operating-system uses to decide which process gets to use the CPU is called the

a. Scheduling algorithms
b. Process scheduler
c. Program loader
d. Interprocess communications

Q117. Which of the following items is not shared by all threads running in a process

a. Address space
b. Open files
c. Global variables
d. Stack

Q118. Which of the following items is not related to a command-line interface

a. Mouse
b. Keyboard
c. MS-DOS
d. Command interpreter and shells

Q119. In Linux what is a ‘zombie process’?

a. It is a process which has gone into a frozen state and does not respond to any command
b. It is a process which has stopped after completion and the parent task is not waiting for it
c. It is a dummy process that cannot produce any useful output
d. It is a process which does not interact with any other process or any hardware

Q120. The CPU contains some ________ inside to hold key variables and temporary results.
a. Caches
b. Registers
c. Arithmetic and Logic Units (ALU)
d. Timers

Q121. The operating system has just loaded five processes, A, B, C, D and E for execution. The first process in the queue is A followed by B, C, D and finally with E at the end of the queue. The processes have estimated running times of 1, 7, 3, 5 and 2 minutes. If non-preemptive first come, first served (FCFS) scheduling is used, what is the order that the scheduler will schedule the processes to run?

a. A→B→C→D→E
b. E→D→C→B→A
c. B→E→A→C→D
d. D→C→A→E→B

Q122. Which of the following devise below is not an input device?

a. Keyboard
b. Mouse
c. Scanner
d. Printer

Q123. Resource management in computers refer to:

a. Managing all the components in the computer to reduce wastage
b. Managing the resources on a computer so that all processes run efficiently
c. Managing the computer so that all users of the system are served well
d. Managing the computer hardware so that it lasts for the maximum time

Q124. Which of the following statements most accurately describes a process that is currently in the ready state?

a. The process is currently using the CPU at that instant
b. The process is runnable, but is waiting in a queue
c. The process is unable to run until some external event happens
d. The process no longer has an entry in the process table

Q125. What does the Text memory area in an operating system normally hold?

a. The Text memory area holds the temporary parameters
b. The Text memory area holds the Message formats
c. The Text memory area holds the Code to be executed
d. The Text memory area holds the information to be swapped between the processes

Q126. Which of the following is NOT a characteristic of a thread?

a. It is quite expensive (in terms of time) to switch threads
b. Threads do not require files, resource allocation and accounting structures
c. Each thread is created in the processes’ resource space
d. Each thread can spawn other threads within its own resource space

Q127. In order to perform process scheduling, an algorithm has to be used to

a. Determine the amount of memory the process requires
b. Determine the amount of CPU time the process requires
c. Determine when to switch the process out of the execution state
d. Determine when to terminate the process

Q128. In a CPU, the ______ contains the memory address of the next instruction to be fetched

a. General registers
b. Program counter
c. Stack pointer
d. Program Status Word (PSW)

Q129. The early versions of the Linux operating system used ______ threads, called pthreads

a. User-level
b. Kernel-level
c. Hybrid
d. Scheduler activations

Q130. Which of the following goals below is not a scheduling goal for batch systems?

a. Maximize throughput
b. Minimize turnaround time
c. Maximize CPU utilization
d. Minimize response time

Q131. Comparing the four computer systems below, which is the one that has been first used and deployed?

a. Mainframe
b. Minicomputer
c. Microcomputer
d. Handphone

Q132. The Process call Switch Process will take action to:

a. Start a process or stop a process
b. Change the current process to ready and give control to next ready process
c. Move a process from hard disk to system memory
d. Move process from one memory bank to another memory bank

Q133. A ______ runs in the kernel mode

a. User interface
b. Library
c. Software application
d. Operating system

Q134. The input to a compiler such as Visual basics or Visual C++ is one or more _____ files

a. Executable
b. Static library
c. Object code
d. Source code

Q135. Linux is a ______ operating system.

a. Single-user, single-tasking
b. Single-user, multi-tasking
c. Multi-user, single-tasking
d. Multi-user, multi-tasking

Q136. A system which used priority scheduling is tuned using the job length as the highest priority, the system can now be approximated to be

a. FCFS
b. LIFO
c. RR
d. SJF

Q137. The basic instruction format of any CPU must consists of

a. The op-code
b. The instruction address
c. The data
d. The control signals

Q138. Which of the following in the information that is stored by a Process Control Block?

a. Process identifier
b. Process context
c. Allocated resources
d. All of the above

Q139. When a parent process creates a child process

a. The child process is allocated a new process control block with new resources
b. The child process inherits the resources from the parent
c. The child process can request its own resources from the OS
d. The child process cannot use any of the parent’s resources

Q140. When several users run the same program (e.g. hello) at the same time

a. A single process is created which executes the hello code
b. Several processes are created which executes the hello code
c. Several processes are created, each executes its own copy of the hello code
d. Several processes are created, each executes its own copy of the hello code, but share the same data area

Q141. In a RR scheduling system, if the quantum is decreased,

a. The system will follow a FCFS scheduling policy
b. The processes will run more efficiently
c. The process will terminate later
d. There will be more context-switching

Q142. Which of the following are not a requirement of a thread?

a. Registers
b. Stack pointer
c. Commonly memory area
d. Interrupt service routines

Q143. A CPU is currently executing 2 processes. The CPU utilization rate is 40%. Assuming that each process takes 4 times units to complete, how long does it take to complete both processes assuming an equal time-share of the CPU?

a. 4 time units
b. 8 time units
c. 20 time units
d. 40 time units

Q144. Name the two interface that a software programmer will be using when developing a software application

a. User interface and application programming interface
b. User interface and device driver interface
c. Hardware interface and device driver interface
d. Application programming interface and device driver interface

Q145. Which of the following statements is not true about a program?

a. A program is an application that can be used by a normal user or a system administrator
b. Programs are stored inside secondary storage such as a hard disk, cd-rom or a floppy disk.
c. A program uses up main memory and CPU time.
d. A program consists of one or more files

Q146. Which os these components is the fastest in the memory hierarchy?

a. Registers
b. Cache
c. Main memory(RAM)
d. Secondary storage (Hard disk)

Q147. On a single processor system,
a. only one process can be run at any time
b. multiple processes can be run at any time.
c. multiple processes can be run using multi-tasking control on the CPU.
d. only one process can be run using multi-tasking control on the CPU

Q148. Maximizing throughput, reducing turnaround time and increasing CPU utilization are scheduling goals for _______.

a.batch systems
b. interactive systems
c.Real-time systems
d. All of the above

Q149. A mainframe is a _______ generation of the computer?

a. First
b. Second
c. Third
d. Fourth

Q150. In linux which command show processes “in action”?

a. Vmstat
b. Grep
c. Procmon
d. Ps.

Q151. Which of the following statements is not a true statement about central process units (CPUs)?

a. The central processing unit is the “brain” of the computer
b. The central processing unit fetches instructions from main memory and execute them
c. All central processing units use the same set of instructions that can execute , even if they are different processor architectures and are made by different companies
d. A basic CPU cycle consists of the fetch, decode and execute operations

Q152. Vacuum tubes, plug boards, bare metal machines (with no operating system installed) and the ENIAC are associated with which generation of computer system?

a. First generation
b. Second generation
c. Third generation
d. Fourth generation

Q153. the correct sequence of procedures that a software programmer uses to create computer programs is

a. Link > source codes > compile> executable file
b. compile > link > source codes> executable file
c. source codes> compile>link>executable file
d. source codes> link >compile> executable file

Q154. The DEC PDP and the DEC VAX are examples of a ___________.

a. Mainframe
b. Minicomputers
c. Microcomputer
d. UNIX workstation

Q155. which of the following is not an input or not an output of the linker?

a. source code.
b. object code.
c. shared library
d. executable

156. The window xp operating system uses _____ threads

a. User-level
b. Kernel -level
c. Hybird
d. Scheduler activations

Q157. Which of the following items is shared by all threads running in a process?

a. Address space
b. Program counter
c. Registers
d. Stack

Q158. Which of the following devices below is not an input/out device?

a. Modem
b. Network card
c. Touchscreen monitor
d. Printer

Q159. In linux a process is referenced by its

a. process token - PT
b. process identifier - PID
c. task identifier - TID
d. process name - PN

Q160. Distributed Operating systems is best described as:

a. Operating system which is stored in different parts of a computer.
b.Operating system which sends parameters around a network to get it processed by different computer.
c. Operting systems which splits the tasks to various points to process them fast
d. Operating systems which are complex and kept at different places.

Q161. Which of the following statements most accurately describes a process that is currently in the blocked state?

a. The process is currently using the CPU at that instant.
b. The process is runnable, but is waiting in a queue.
c. The process is unable to run until some external event happens.
d. The process no longer has an entry in the process tables.

Q162. There are four users currently using a multi-user, multi-tasking operating system on a personal computer. User ChewKit has 3 processes running on the system, while users AHBeng, Muthu and Faridah have 4,1, and 2 processes running respectively. if found-robin scheduling is used, what is the CPU time given to each user?

a. Chewkit (100% CPU time), AhBeng(0%), Muthu (0%), Faridah (0%)
b. Chewkit (25% CPU time), AhBeng(25%), Muthu (25%), Faridah (25%)
c. Chewkit (30% CPU time), AhBeng(40%), Muthu (10%), Faridah (20%)
d. Chewkit (30% CPU time), AhBeng(20%), Muthu (10%), Faridah (40%)

Q163. Which of the following is a prime consideration for scheduling policy of a Real-time processing system?

a. Fairness in process scheduling
b. Minimize waiting time
c. Predictability in the response rate
d. Turnaround times of processes

Q164. Which of the following words below is not related to the hard disk drive?

a. Sectors
b. Gigaherts
c. Read-write heads.
d. Cylinders.

Q165. Which of the following is not a characteristic of a process?

a. It is quite expensive(in terms of time) to switch processes
b. Processes do not require files, resource allocation and accounting structures
c. Each process requires a full process control block
d. Each process can spawn other processes within its own resource space.

Q166. In running a process that involves file I/O operations, the process discovers that a file required for process is missing. The process then terminates. This termination is known as

a. Normal exit (voluntary)
b. Error exit (voluntary)
c. Fatal error (involuntary)
d. Killed by another process (involuntary)

Q167. Which of the statements below is not true regarding scheduling in batch systems?

a. The process scheduler in a batch system consists of four different components, i.e. the routing scheduler, the admission, the memory scheduler and the CPU scheduler.
b. The admission scheduler decides which jobs to admit to the system.
c. the memory scheduler determines which processes are kept in memory and which on the disk.
d. The CPU scheduler picks one of the ready processes in main memory to run next.

Q168. which of the scheduling algorithms below is the simplest and easiest to implement?

a. Round-robin scheduling
b. Priority scheduling with multiple queues
c. Lottery scheduling
d. Fair-share scheduling

Q169. Which of the following is not a library provided by windows?

a.Glibc
b.Win32
c.MFC
d.DirectX

Q170. The part of the operating system that decides which process to run next on the CPU is called the_______?

a.Scheduling algorithm
b.Process scheduler
c.Program loader
d.Interprocess communications

Q171. Maintaining fairness, policy enforcement and balance are scheduling goals for ________.

a. Batch systems
b. Interactive systems
c. Real-time systems
d. All of the above

Q172. In a computer, Interrupt means:

a. The Computer has stopped working
b. User has halted the operation for maintenance
c. Multiple jobs are contending for a resource and have stopped operating
d. An asynchronous processor event which causes an alteration to the flow of the execution of the program.

Q173. Which of the following design structure is used by the Mach microkernel?

a. Monolithic system
b. Layered system
c. Virtual machines and exokernels
d. Client-Server

Q174. In most operating systems the memory is classified into the following 3 areas:

a. The Text, Data and Stack memory areas
b. The Display, Data and Program memory areas
c. The Display, Process, and Temporary memory areas
d. The Rom, Volatile and Non-volatile memory areas

Q175. A Microsoft XBox and a Sony Playstation 2 is considered as what type of computer system?

a. A laptop computer.
b. A desktop PC.
c. A personal digital assistant (PDA)cooperative
d. A game console

Q176. The part of the operating system that manages the RAM is called the ______.

a. Process Manager
b. Memory manager
c. Files and storage manager
d. I/O device manager

Q177. Which of the following parts is the “brain” of the computer?

a. The central processing unit (CPU)
b. The main memory (RAM)
c. The secondary storage (Hard disk)
d. The modern

Q178. Which of these components is the fastest in the memory hierarchy?

a. Registers
b. Cache
c. Main Memory (RAM)
d. Secondary storage (Hard disk)

Q179. A minicomputer is a _____ generation computer system.

a. First
b. Second
c. Third
d. Fourth

Q180. Which of the following provides support to the CPU in terms of I/O and memory control?

a. System bus
b. Arithmetic and Logic Unit
c. Chipset
d. Memory and I/O cache system

Q181. Select the best statement regarding preemptive multitasking

a. Each process is given physical resources which runs to completion before release.
b. Each process is given a timeslot, and works through the timeslot until completion.
c. Each process is given a timeslot, and works until its time is up
d. Each process is given a timeslot, and works until its time is up or is interrupted by the OS

Q182. A process that spends 80% of its time doing I/O wait is a _______ process.

a. CPU-bound
b. I/O-bound
c. Process scheduling
d. CPU utilization.

Q183. Which of the following companies do not make and sell central processing units (CPUs) for the desktop personal computer?

a. Intel
b. Advance Micro Devices (AMD)
c. Seagate Technologies
d. Transmeta

Q184. Which of the operating systems below support cooperative multi-tasking?

a. MS-DOS
b. Windows 3.1.
c. Windows XP
d. Linux

Q185. The part of the operating system that manages the mouse, keyboard and video card is called the _______.

a. Process manager
b. Memory manager
c. Files and secondary storage manager
d. I/O device manager


Q186. Which of the following statements is not the reason why threads are used?

a. Threads are useful on computer systems with multiple CPUs, where real parallelism is possible
b. Creating and destroying threads is much faster (100x) and easier than processes
c. There are performance gains when overlapping CPU and IO-bound threads
d. Processes share an address space and all its data among themselves.Threads don’t

Q187. Which of the following technologies is not used as a bus for a personal computer?

a. PCI
b. ISA
c. ROM
d. USB

Q188. Which of the following components in the memory hierarchy has the largest storage space or capacity?

a. Registers
b. Level 2 Cache
c. Main memory
d. Hard disk

Q189. The system call _______ into the kernel and invokes the operating system.

a. traps.
b. Falls.
c. Drops.
d. Executes.

Q190. Which of the following statements is not true about a process?

a. A process is created by software programmers
b. A process is basically a program in execution. In other words, it is a running program
c. Each process has its process space, which is a list of memory locations from some minimum to maximum, which the process can read or write
d. processes use up main memory and cpu time

Q191. All the information about each process is stored in an operating system structure called the ____.

a. Process structure
b. Process link
c. Process memory
d. Process table

Q192. In an Linux system, process A creates a child process B and later, B creates process C. When process C is executing,

a. Processes A and B may also executing at the same instance
b. Process B is also executing, with A suspended
c. Process A is also executing, with B suspended
d. Process A and B must be suspended.

Q193. What is the major disadvantage of using a Last-In-First-Out scheduling policy?

a.Simplicity
b. Maximization of throughput
c. Minimization of waiting times
d. Starvation

Q194. The Windows XP operating system uses ______ threads.

a. User-Level
b. Kernel-level
c. Hybrid
d. Scheduler activations

Q195. There are four users currently using a multi-user, multi-tasking operating system on a personal computer. User ChewKit has 3 processes running on the system, while users AhBeng, Muthu and Faridah have 4, 1 and 2 processes running respectively. If lottery scheduling is used with each equally, and there are a total of 100 lottery tickets, what is the number of lottery tickets given to each user?

a. Chewkit(25 tickets), AhBeng(25 tickets), Muthu(25 tickets), Faridah(25 tickets)
b. Chewkit(30 tickets), AhBeng(40 tickets), Muthu(10 tickets), Faridah(20 tickets)
c. Chewkit(20 tickets), AhBeng(10 tickets), Muthu(40 tickets), Faridah(30 tickets)
d. Chewkit(100 tickets), AhBeng(0 tickets), Muthu(0 tickets), Faridah(0 tickets)

Q196. A process that spends 10% of its time doing I/O wait is a ________ process.

a. CPU-bound
b. I/O-bound
c. Process scheduling
d. CPU-utilization

Q197. An advantage of using Shortest Job First scheduling in a pre-emptive system is

a. Simplicity
b. Maximization of throughput
c. Minimization of waiting times
d. Prioritization of jobs

Q198. The operating system has just loaded five processes, A, B, C, D and E for execution. They have estimated running times of 1, 7, 3, 5 and 2 minutes. Their (externally determined) priority are 3,5,2,1 and 4, respectively, with 5 being the highest priority. if shortest job first (SJF) scheduling is used and process is run until it finishes. what is the order that the scheduler will schedule the processes to run?

a. A→B→C→D→E
b. E→D→C→B→A
c. B→E→A→C→D
d. A→E→C→D→B

Q199. Which of the following is NOT a task of Process Management?
a. Efficient and fair use of resources
b. Effiicient and fair use of the CPU
c. Management of file and I/O space
d. Management of the power utilization of a system

Q200. The interface between the user and the applications is the

a. User interface.
b. Application Programming Interface
c. Device driver interface.
d. Hardware interface

Q201. The part of the operating system that manages the hard disk is called the _____.

a.Process manager
b.Memory manager
c.Files and secondary storage manager.
d.I/O device manager

Q202. Under which of the four application scenarios below are threads not useful?

a.We want to make the application more interactive and have better responsiveness
b.We want to improve the performance of a server application by serving multiple requests at the same time.
c. We have an application that must run sequentially and cannot be parallelized due to certain constraints and dependencies.
d. We have an application that processes large amount of data

Q203. The SUN Solaris operating systems uses ______ threads?

a. User-level
b. Kernel-level
c. Hybrid
d. Scheduler activations

Q204. In which mode can the CPU execute every instruction in its instruction set and use every feature of the computer hardware?

a. Terminator mode
b. Application mode
c. Kernel mode
d. User mode

Q205. Which of the two design structure is used by both the Windows NT and Windows 2000 operating systems?

a. Monolithic system and layered system.
b. Layered system and client-server.
c. Client-server and virtual machine
d. Layered system and exokernel.

Q206. The scheduling algorithm whereby each process is given some tickets and the process that has the winning ticket for that round is given the CPU time is called ______.

a. Round-Robin Scheduling
b. Priority scheduling with multiple queues
c. Lottery Scheduling
d. Fair-Share scheduling

Q207. Which of the following statements most accurately describes a process that is currently in the running state?

a. The process is currently using the CPU at that instant
b. The process is runnable, but is waiting in a queue
c. The process is unable to run until some external event happens
d. The process no longer has an entry in the process table

Q208. A _______ Scheduling algorithm picks a process and lets it run for a maximum of some fixed time. If it is still running at the end of time interval, it is suspended and the scheduler picks another process to run (if one is available)

a. Multi-Tasking
b. Process
c. Non-Preemptive
d. Preemptive.

Q209. Meeting deadlines and having predictable performance are scheduling goals for ________.

a. Batch systems
b. Interactive systems
c. Real-time systems.
d. All of the above

Q210. While running a program, a divide-by-zero error occurs and the process terminates. this termination is known as

a. normal exit(vuluntary)
b. error exit(voluntary)
c. fatal error(involuntary)
d. killed by another process(involuntary)

Q211. Which of the following items is not related to a graphical user interface?

a. Windows
b. Icons
c. Mouse
d. Command prompt

Q212. The part of the operating system that manages the printer, network card and modem is called the _____.

a. process manager
b. memory manager
c. files and storage manager
d. i/o device manager

Q213. Which of the following application below is not a Multimedia software?

a.Windows Media Player
b.Quicktime Player
c. Microsoft office
d. Real Video Player

Q214. which of the following statements below is not correct?

a. an operating system manages all the hardware devices of the computer system
b. an operating system provides users with programs with a simpler interface to the hardware
c. an operating system is not an extended machine, and does not hide the messy details which must be performed
d. an operating system is a resource manager and devicems which program gets to use the resource

Q215. __________ allows user programs to access the operating system.

a. User interfaces
b. Programs
c. Libraries
d. System calls

Q216. A ________ scheduling algorithm picks a process to run and then just lets it run until it blocks (either on I/O or waiting for another process) or until it voluntary release the CPU

a. Multi-tasking
b. Process
c. Non-preemptive
d. Preemptive

Download link for MST Quiz / LECTURE 1 - LECTURE 4 question with all answer