C191:
Operating Systems
Study Guide
Hardware and User Needs
Memorize and complete the following table from Section 1.1 in Zybooks:
Hardware Hardware Components User Needs Examples of the
Component Hardware
CPU
Main
Memory
Secondary
Storage
I/O Device
History of Computers
Memorize and complete the following table from Section 1.3 in Zybooks:
Generation Enabling Hardware Technology OS type Defining Characteristics
1 Vacuum Tubes
2 Batch
3 Multi-programming,
multi-tasking
4 Very Large-Scale Integration Multi-processor.
5 OS for supercomputers
and mobile devices
Windows and Linux Commands
Use your book, additional resources, and the internet to memorize and complete the table:
Operation Definition Windows Windows GUI Linux Command
Command
(Command
Prompt)
Change Change the current
working directory to
another directory
Create Create a new named
directory
Delete Delete directory from
the path (and deletes
all the files and
directories nested
within the deleted
directory)
Move Move a directory to
another
Rename Rename a file directory
List List all the file names
and other attributes
within a specified file
name
Find Find a file or directory Wildcard: *
by name
Locate
Print
Mounting File
System
Unmounting
File System
Ping
Ifconfig
Display File
Contents
Stream Editor
for Editing
Text
Security Questions
Memorize and complete the following table from Chapter 16 in Zybooks:
Type of Also Key for Key for Algorithm Describe the
Cryptography known Encryption Decryption Used for Cryptography
as… (Circle one) (Circle one) Encryption
(Circle one)
Symmetric Public / Private Public / Private RSA / DES
Asymmetric Public / Private Public / Private RSA / DES
What is a man-in-the-middle attack?
What is a logic bomb?
What is a back door?
What is a trapdoor?
What is information leaking?
When someone from inside the organization poses a threat with information, what is that called?
What is login spoofing?
How is login spoofing different from phishing?
How is login spoofing different from social engineering?
What are the differences between a virus and a worm?
What is a trojan horse?
What is a buffer overflow attack?
When a bad actor adds code to a form online that exposes customer information at a later time is that
a buffer overflow attack or a logic bomb?
Why should developers use a sandbox?
What is a hash?
What is a DDoS attack?
What does defense in depth mean?
Describe Salting using a picture:
What is Dropbox?
What can be used to access Dropbox?
There are three types of factors of authentication: something you have, something you know,
something you are. Describe and provide an example of each:
• Something you know:
• Something you are (also known as biometrics):
• Something you have:
In cybersecurity, there is a principle of least privilege. Define the following:
• Principle of least privilege:
• Role-Based Access Control (RBAC):
• Roles:
• Discretionary Access Control:
• Mandatory Access Control:
Access and Capabilities List
For access lists, find the object and work down that column
For capability lists, find
the domain and work
across that row
What does * or c mean in an access list? (Hint: you may need to look in the course tips or
announcements)
Memory Questions
What is an example of physical memory and its limitations?
What is logical memory and why is it used?
When memory is considered volatile, what does that mean?
When memory is considered nonvolatile, what does that mean?
What is DMA and when is it used?
Paging
Using Chapter 7 in your Zybooks, complete the following table:
Term Definition Metaphor
Page Table A “phone book” of
where data resides
Page A “page” of a
phone book
Page Frame An “ad” of a phone
book
Why do we use a page table?
How does a page relate to a logical address space?
How does a page frame relate to a physical address?
Define the following: Logical Address, Logical Address Space, and Physical Address.
Page Replacement
What is a page replacement and page fault rate?
What is the best page replacement algorithm?
Which page replacement algorithm results in the fewest number of page faults?
What is the optimal page replacement algorithm?
What is the FIFO page replacement algorithm?
What is the LRU page replacement algorithm?
What is the Aging Replacement algorithm?
Describe the process that occurs in the second chance page replacement algorithm:
Describe the process that occurs in the third chance page replacement algorithm:
What is the Working Set algorithm?
What is the Optimal Working Set algorithm?
What is the Working Set Page Replacement Algorithm?
What is the Page Fault Frequency Replacement Algorithm?
What is thrashing?
Fragmentation
What causes the following types of fragmentation:
Internal:
External:
What is a boot partition?
Draw a diagram showing the user powering up their computer and initiating the boot partition,
boot sector, boot kernel, and OS:
In the 50% rule, how much of memory is wasted on average? (Circle one):
• 1/2
• 1/3
• 1/4
Memory Management
Define and draw a picture of memory Define and draw a picture of memory
swapping: compaction:
Segmentation and Segment Tables
What is the difference between a segment table and page table?
Define the following terms using Chapter 8 in your Zybooks:
Term Definition Potential ways to
remember it on the exam
Segment Smallest unit of data for
memory management
Segment Table Each entry corresponds to
one segment and contains
the starting address of the
segment
Address Translation Like paging within a
segment
TLB Like remembering where
the local stores are around
your house without having
to use GPS to get there
faster. TLB saves the
logical -> physical address
translation with the frame
number component
Hit Ratio If found, easier to get there
sooner and less overhead
used. (Easier to get to the
store without GPS if you
know it by muscle
memory)
Principle of Locality We are creatures of habit –
if we did something
before, chances are we are
going to do it again soon
Types of Memory Fits
Use Chapter 7 in your Zybooks to complete the following table:
Draw a picture and define best fit: Draw a picture and define worst memory
fit:
Draw a picture and define next memory fit: Draw a picture and define first memory fit
Processes and Threads
A program in execution is called:
What is a PCB and what is it purpose?
How many threads are there to a process?
How many processes are there to a PCB?
What is a program counter?
While the acronyms may be similar, PC and PCB are completely different. Describe their impact on
processes and threads:
File Control and Directory
Define and provide an example of each for the layered file system diagram below:
List 4 things that a file system must be able to do:
1.
2.
3.
4.
Select the correct answers:
1. Where are files stored in UNIX? (Select 1.) FFS, UFS, ext3, ext4, NTFS, FAT or FAT32
2. Where are files stored in Windows? (Select 3.) FFS, UFS, ext3, ext4, NTFS, FAT or FAT32
3. Where are files stored in Linux? (Select 2.) FFS, UFS, ext3, ext4, NTFS, FAT or FAT32
Reminder: Look at the course announcements and resources for additional information on
NTFS and ext3/ext4 not covered in the textbook, but required for the OA
Define the three ways what a file type can be identified:
1. Magic Number:
2. File Header:
3. File Extension:
Why is a file extension the most vulnerable to corruption issues?
Using the picture below from Windows, square the relative path name and circle the absolute path
name for this folder:
Define the following terms:
File Directory or Folder:
Root:
Relative Path Name:
Absolute Path Name:
Directed Acyclic Directory Symbolic Link Directory
Structure Structure
Draw a Picture
Define the Term
What does FCB stand for?
Describe the following picture from Zybooks and why approach 3 is used within the file control
block:
Define PCB:
Define FCB:
Identify if the following pictures are either Contiguous, Clustered, or Linked and define the term:
Operation Describe what happens with the file and FCB
Create File
Destroy File
Open File
Table
Open File
Read File
Write
Seek
Which accounts can destroy a file?
How does Windows present a common interface for all system calls to avoid complex per-program
coding?
Memory Management
Complete the following table by filling in the blanks of either the term or definition:
Term Definition
No file system is used
Cooked disk
Stored in firmware, finds the kernel (by
knowing the file system) and starts executing
it when the system is powered on
Boot control block (per volume)
Partition Boot Sector
Contains volume details (number of blocks,
size of blocks, and free block pointers)
What is mounting?
What are the steps for mounting a table?
Step 1:
Step 2:
Step 3:
What is mmount used for within the Linux operating system?
What is memory mapping?
What is memory-mapped I/O?
I/O
Term Definition
Port
Bus
Daisy Chain
Device Driver
Device Controller
Which is a piece of hardware: device driver or device controller?
Which interacts with the operating system and translates information from the I/O device into
genetic system call?
Which storage device is directly connected via a serial bus?
Which two are directly connected to a computer? (Select 2.) Host-attached, iSCI, NAS, or Cloud
Storage
Polling vs. Interrupts
Which system call method is like asking “…are we there yet?...” because it is repeatedly checking to
see if the /O device is available or busy waiting?
Which system call method only announces itself once it has arrived?
Describe how interrupts work with the interrupt request line and what ‘maskable’ means.
Disk Scheduling
Fill in the following diagram with the following words: Track, Sector, Cylinder, Shaft. Each word
may be used more than once.
Fill in the terms within the following table:
Term Definition
One or many concentric rings on a magnetic disk surface
Smallest portion of a track that can be read or written to via a
single r/w operation. Each sector r/w data in blocks.
• Proportional to the distance traveled
• Time to move the r/w from the current position to the track
containing the right data
1
• Proportional to 2disk revolution
• Time to wait for the desired sector/data item to pass under
the r/w head
• Proportional to the disk’s speed
• Time to transfer the desired bits to/from the disk
Data streamed to or from the disk once the head is at the
beginning of the sector to be transferred
The rate at which the data can transfer continuously
R/W head collides with the platter and causes damage
• Speed changes because the outer edges of the track hold
40% more sectors than the inner tracks
• Maintains transfer rate and density per track
• Maintains speed
• Changes transfer rate
Disk Access Optimization
Assume that the R/W head is at track 50 and needs to go to the following tracks (in no particular
order): 0, 10, 55, 70, 100, and 105.
Draw what it would look like under the shortest seek time algorithm:
Define the shortest seek time algorithm:
Draw what it would look like under the C-Scan algorithm:
Define the C-Scan algorithm:
Draw what it would look like under the Scan algorithm:
Define the Scan algorithm:
Chapters 1.1 - 4.1 Crossword Puzzle
Use terms from 1.1 - 4.1 in Zybooks to complete the below crossword puzzle:
ACROSS
3. A communication system; e.g., within a computer.
5. A contained environment (e.g., a virtual machine).
8. Multiple processing cores within the same CPU chip or within a single system.
9. Rewritable memory, also called main memory.
13. The OS uses this to keep track of each process.
15. In interprocess communication, a mode of communication in which the sending process is blocked until
the message is received by the receiving process or by a mailbox and the receiver blocks until a message is
available. In I/O, a request that does not return until the I/O completes.
17. A set of commands, functions, and other tools that can be used by a programmer in developing a
program.
18. The smallest logical storage unit; a collection of related information defined by its creator.
19. A program in execution.
20. A facility that enables a user thread to specify a function that is to be called when the user thread
receives notification of a particular event.
23. A hardware mechanism that enables a device to notify the CPU that it needs attention.
25. Describes storage whose content can be lost in a power outage or similar event.
26. Instance of executing a portion of a program within a process without incurring the overhead of creating
and managing separate PCBs.
DOWN
1. A type of cloud computing that includes both public and private cloud components.
2. Type of computing in which servers or storage are available over the internet.
4. A process role in which the process consumes information produced by a producer process.
6. Interface comprising a window system with a pointing device to direct I/O.
7. Program that allows the computer to start running by initializing hardware and loading the kernel.
10. Describes an interrupt that can be delayed or blocked (such as when the kernel is in a critical section).
11. A scheduling algorithm may stop the currently running process and choose another process to run.
12. Type of computing in which one or more applications are available via the internet.
14. In interprocess communication, a mode of communication in which the sending process is blocked until
the message is received by the receiving process or by a mailbox and the receiver blocks until a message is
available. In I/O, a request that does not return until the I/O completes.
16. A method of giving commands to a computer based on a text input device (such as a keyboard).
21. In UNIX and other operating systems, a means used to notify a process that an event has occurred.
22. Common version of RAM, which features high read and write speeds.
24. In networking, a communication, contained in one or more packets, that includes source and destination
information to allow correct delivery. In message-passing communications, a packet of information with
metadata about its sender and receiver.
Chapters 4.2-7.1 Term Matching
Match the term with its definition.
Definitions:
A. Is an integer in the range [0 : n-1] that identifies a word in a physical memory of size n.
B. Multiple processes trying to enter the CS at the same time must not block each other indefinitely.
C. Is the act of multiple processes (or threads) executing at the same time.
D. Is a segment of code that cannot be entered by a process while another process is executing a
corresponding segment of the code.
E. Schedules processes strictly according to the process arrival time.
F. Schedules processes according to the remaining CPU time needed to complete the work.
G. A newly arriving process enters the highest-priority queue, N, and is allowed to run for Q time units.
H. Is the indefinite postponement of a process while other processes are allowed to proceed.
I. Is an abstraction of physical memory, consisting of a sequence of imaginary memory locations in a
range [0 : m-1], where m is the size of the logical address space.
J. Is a non-negative integer variable that can be accessed using only two special operations, P and V.
K. In an interactive system, turnaround time may not be the best criterion.
L. Algorithm schedules processes according to the shortest remaining time until the deadline.
M. A process not attempting to enter the CS must not prevent other processes from entering the CS.
N. A process (or a group of processes) must not be able to repeatedly enter the CS while other
processes are waiting to enter.
O. Schedules processes according to the total CPU time requirements.
P. Uses a single queue of processes.
Q. If the CPU is busy executing processes, then work is being done.
R. Scheduling assigns priorities dynamically according to deadline.
S. Algorithm schedules processes according to the period.
T. Only one process may be executing within the CS.
Terms:
1. FIFO
2. SJF
3. SRT
4. Starvation
5. Round-Robin
6. MLF
7. RM
8. EDF
9. Throughput
10. Response Time
11. Concurrency
12. Critical Section
13. Mutual Exclusion
14. Lockout
15. Starvation
16. Deadlock
17. Semaphore
18. Physical Address
19. Logical Address Space
Chapters 7.2-16 Word Search
Use the clues from the next page to find the term from Zybooks:
Clues: