Quiz 1 (Intro & Shell) Flashcards

1
Q

In an operating system, [______] memory is used to provide each process with the illusion that the entire memory is reserved for them.

A

In an operating system, ___virtual___ memory is used to provide each process with the illusion that the entire memory is reserved for them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Early consumer PC OS’es such as MS DOS implemented multi-programming and memory protection

True
False
A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Suppose a process needs to call the OS to execute a bit of protected functionality (e.g., file access). Sort the operations below in the correct order.

____ Execution switches to privileged mode into the OS
____ Execution switches back to unprivileged mode
____ The OS executes the requested task and prepares the results for the app

A

Suppose a process needs to call the OS to execute a bit of protected functionality (e.g., file access). Sort the operations below in the correct order.

__1__ Execution switches to privileged mode into the OS
__3__ Execution switches back to unprivileged mode
__2__ The OS executes the requested task and prepares the results for the app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Match each concept to its correct description

____
Different component of the same program share the same CPU

____
Multiple independent programs share the same CPU

  1. CPU virtualization
  2. Concurrency
A

Match each concept to its correct description

__2__
Different component of the same program share the same CPU

__1__
Multiple independent programs share the same CPU

  1. CPU virtualization
  2. Concurrency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Modern operating systems manage memory using the same abstractions that are used for storage

True
False
A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In a UNIX shell, the ______ command can be used to change the current working directory; while the ______ command can be used to list the files in a directory.

A

In a UNIX shell, the ___cd___(50 %) command can be used to change the current working directory; while the ___ls___(50 %) command can be used to list the files in a directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s the correct command to access the manual (man) page for the “ls” command?

tell ls

ls tell

man ls

manual ls

A

man ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A regular expression is a pattern that describes a set of strings

True
False
A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In the context of a UNIX shell, what does the following command accomplish?

cat myfile.txt 2>&1

Saves the output of the command to a file called “1”

Redirects the standard output to the standard input

Redirects the standard error to the standard output

Runs the command in privileged mode

A

Redirects the standard error to the standard output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The touch command is used to create an empty file.

True
False
A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the “working directory” in the context of a shell?

A directory that works very hard

The file system location from which file are accessed by default

A directory that stores all data in a computer

A directory that stores all programs in a computer

A

The file system location from which file are accessed by default

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The syntax “./mycmd” means “run the program called mycmd from the current working directory”

True
False
A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Match the syntax to the directory it represents

____
Current working directory

____
Directory above the current one (parent)

  1. ../
  2. ./
A

__2__
Current working directory

__1__
Directory above the current one (parent)

  1. ../
  2. ./
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Consider the command “/home/lorenzo/ensf461/myprogram” on the command line. What does it do?

Run a program called “myprogram”

Change the current directory to “/home/lorenzo”

Run a program called “ensf461”

Change the current directory to “/home/lorenzo/ensf461”

A

Run a program called “myprogram”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

You can run a command in any directory by specifying the full path

True
False
A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly