Operating Sys Final Flashcards
Consider the following terminal transaction:
$ cd/home/Lisa/2019/mail/sent
$cd ../../doc
$pwd
Assuming none of the commas generates an error, what will be the result following the last command?
/home/Lisa/2019/doc
What command would tell us the number of files that begin with the letters ‘sc’ in our parent directory?
ls -l ../sc* | wc -l
What is the command that could be used to get information about sfdisk command?
man sfdisk
Consider the following entry in a long director listing (ls -l)
-rwxrw-r-x 1 paula staff 15020 Feb 13 2017 myFile.txt
what privileges do members of paula’s group have on this file?
rw-
They can read the file
They can write the file
What command identifies the last 5 occurrences of the word “prince” in the file hamlet.txt?
grep -e “prince” hamlet/txt | tail -n 5
What will the permission on the file file1.sh be after executing the following command?
chmod 445 file1.sh
r–r–r-x
What is a system bus?
it is the part of the data bus connects data transfers between RAM and the CPU
How many megabytes in a gigabyte?
There are 1,024 megabytes in a gigabyte
What is a rootkit?
A rootkit is a malicious software program designed to give attackers unauthorized access and control over a computer system.
What is an interrupt service routine?
An ISR(interrupt service rountine) is a routine that sends out a signal (a internet) when a event takes place that needs the CPU’s immediate attention
What are facts about ISRs?
- they are the same as interrupt handlers
- there are as many of them as there are potential interrupt sources
What is the primary reason for having interrupts?
they eliminate CPU busy-waits
Describe the process of making a system call
- program sends TRAP instruction
- operating system switches from user mode to kernel mode
- does instructions
- operating sys switches from kernel mode to user mode
- control is given back to the program
Arrange from least to greatest( 1 = least, 4 = greatest):
__ 0.0038 kilo seconds
__ 38,000 milliseconds
__ 0.38 seconds
__ 38,000 microseconds
3 0.0038 kilo seconds
4 38,000 milliseconds
2 0.38 seconds
1 38,000 microseconds
What command correctly counts the number of words in the 50 lines of the file othello.txt starting at line 1000?
head -1050 Othello.txt | tail -50 | wc -w
What is the output of the second pwd command below?
$pwd
/users/home/dan/documents
$ cd ..
$pwd
/users/home/dan
What is the UNIX command that allows a user to terminate a process based on a Process ID (PID)?
pkill PID
The core (or the “brain”) of the Operating System is called ____.
Kernel
For a MIPS CPU, which subsystem would execute a lw or sw instrution?
the MMU
How many micrograms are in a kilogram
10^9 or 1,000,000,000
Which subsystem of a CPU administers the instruction cycle?
the Control unit
List the three phases of a CPU’s instruction cycle.
Fetch, Decode, Execute
What is a dual-mode CPU? What is the difference between the two modes?
- A dual-mode CPU is a system that has two modes kernel mode and user mode
- Kernel mode has unrestricted privileges
User mode has limited privileges
What is POSIX?
it is a standard API for making system calls
Briefly describe the system bus. What does it do? How does it work?
The system bus connects the CPU, I/O devices, memory and other devices together. It transmites data and instructions between them. There are three buses to make this work
Data Bus: Carries data between the CPU, memory, and I/O devices.
Address Bus: Transmits the physical location (address) of data to be accessed or written by the CPU.
Control Bus: Transfers control signals for coordinating the overall system’s operation.
What is the primary vehicle for moving data from the CPU to a peripheral device?
the system bus
List four main areas of concern for operating systems
- Process management
- Device management
- File management
- Memory management
The central process of an operating system is called
the kernel
What is the primary consumer of O/S services?
programs that run on the computer
What best describes the use of a pipe (|) between shell commands?
It redirects the output of each command to the input of the next
The shell command ‘ls -s’ lists files in the current directory by size order, in descending order. Use this knowledge to write a compound shell command that lists the 3 largest files in the current directory
ls -s | head -n -3
Relate each hardware component on the left to its O/S abstraction on the right
[A] CPU [ ] Virtual Memory
[B] Memory [ ] Filesystems
-Mapped I/O Devices
[C] RAM [ ] Process and Threads
[D] Hardware [ ] Peripheral device abstraction