1/24
Comprehensive practice flashcards covering operating system fundamentals, Linux kernels, system calls, and Bash shell scripting from the Week 5 lecture.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
When is Assignment 1 due?
Thursday at 3 PM.
What specific command should be used on MOS to prepare a submission for Gradescope?
twenty three ten create zip
What two items must a student bring to the Assignment 1 interview?
A laptop with Zoom installed and a student card.
How does the lecturer define 'abstraction' regarding operating systems and hardware?
Simplifying details and hiding low level information (like CPU type or storage device specifics) from the user or application.
What is 'time slicing'?
Chopping up CPU time into little slices (often tens of milliseconds) and swapping quickly between applications to create the appearance of multitasking.
What standard defines a set of standard functions available across many different operating systems like Linux and Windows?
POSIX
What are the two primary privilege levels (spaces) in the Linux architecture?
user space and kernel space
According to the transcript, what is the 'kernel'?
The code within the operating system that takes care of all low level details, such as process management and handling network sockets.
What three ways can a system enter kernel mode?
System calls, exceptions (hardware rejects), and interrupts (hardware signaling the CPU).
What is the specific machine instruction used to trigger a change into kernel mode on supported CPUs?
syscall
In Linux, what is the system call number for nanosleep?
35
What utility 'intercepts and records' system calls made by a command?
s trace
Why is the c standard library buffered (e.g., performing reads in blocks of 4,096 bytes)?
System calls are expensive because switching from user mode to kernel mode involves saving registers and checking permissions; buffering minimizes these transitions.
In the context of the time command, what is the difference between 'user' and 'system' time?
User time is spent in user mode (the program's own code), while system time is spent in kernel mode (executing system calls).
What is a 'hypervisor'?
Software or hardware that supports running multiple virtual machines on top of physical hardware.
How do containers like Docker differ from virtual machines regarding the OS kernel?
Containers do not have a full operating system kernel inside them; they run on top of a single host kernel and use namespaces to restrict visibility.
Why must the cd (change directory) command be a shell built-in rather than an external executable?
If run as an external program, it would only change the directory of that process; upon exiting, the shell would remain in the original directory.
What environment variable specifies the directories searched for executables?
PATH
What command converts a local shell variable into an environment variable that can be passed to child processes?
export
What is the 'hash bang' (shebang) and its purpose in a shell script?
A character sequence (#!) followed by a path at the start of a script that specifies which interpreter (shell) should be used to execute the file.
What is the functional difference between single quotes ('') and double quotes ("") in Bash?
Double quotes allow the expansion of environment variables (e.g., dollarpath), whereas single quotes treat all characters literally.
What does the shell variable ? contain?
The exit status of the last executed command.
In shell scripting, what does the 'square bracket' ([) in an if-statement represent?
It is actually a command equivalent to the test program.
What utility is used to take results from standard input and provide them as arguments to another command?
XARGS
What syntax is used for command substitution, taking the output of a command and using it as an argument?
back quotes (``) or the newer notation dollar(command)