Quiz 1 (Intro & Shell) Flashcards
In an operating system, [______] memory is used to provide each process with the illusion that the entire memory is reserved for them.
In an operating system, ___virtual___ memory is used to provide each process with the illusion that the entire memory is reserved for them.
Early consumer PC OS’es such as MS DOS implemented multi-programming and memory protection
True False
False
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
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
Match each concept to its correct description
____
Different component of the same program share the same CPU
____
Multiple independent programs share the same CPU
- CPU virtualization
- Concurrency
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
- CPU virtualization
- Concurrency
Modern operating systems manage memory using the same abstractions that are used for storage
True False
False
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.
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.
What’s the correct command to access the manual (man) page for the “ls” command?
tell ls
ls tell
man ls
manual ls
man ls
A regular expression is a pattern that describes a set of strings
True False
True
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
Redirects the standard error to the standard output
The touch command is used to create an empty file.
True False
True
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
The file system location from which file are accessed by default
The syntax “./mycmd” means “run the program called mycmd from the current working directory”
True False
True
Match the syntax to the directory it represents
____
Current working directory
____
Directory above the current one (parent)
- ../
- ./
__2__
Current working directory
__1__
Directory above the current one (parent)
- ../
- ./
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”
Run a program called “myprogram”
You can run a command in any directory by specifying the full path
True False
True