Uploaded by ascarnati724

C191 Study Guide

advertisement
C191:
Operating Systems
Study Guide
Hardware and User Needs
Memorize and complete the following table from Section 1.1 in Zybooks:
Hardware
Hardware Capabilities
User Needs
Component
CPU
Examples of the
Hardware
Machine instructions perform
The user thinks in
operations on contents of registers
terms of arrays, lists,
and memory locations.
and other high-level
data structures,
accessed and
manipulated by
corresponding highlevel operations.
Main
Physical memory is a linear
The user must manage
Memory
sequence of addressable bytes or
a heterogeneous
words that hold programs and data.
collection of entities of
various types and sizes,
including source and
executable programs,
library functions, and
dynamically allocated
data structures, each
accessed by different
operations.
Secondary
Disk and other secondary storage
The user needs to
Storage
devices are multi-dimensional
access and manipulate
structures, which require complex
programs and data sets
sequences of low-level operations
of various sizes as
to store and access data organized
individual named
in discrete blocks.
entities without any
knowledge of the disk
organization.
I/O Device
I/o devices are operated by reading
The user needs simple,
and writing registers of the device
uniform interfaces to
controllers.
access different devices
without detailed
knowledge of the
access and
communication
protocols.
History of Computers
Memorize and complete the following table from Section 1.3 in Zybooks:
Generation
1
Enabling Hardware Technology
Vacuum tubes
OS type
None
Defining Characteristics
All programming was
done by experts in
machine language
without any support
from an OS or any other
system software.
2
Transistors replaced vacuum tubes
as smaller and faster switches.
Batch OS
Programs were
submitted in batches of
punch cards. The role
of the OS was to
automate the
compilation, loading,
and execution of
programs.
Multiprogramming was
developed, which
allows the OS to
schedule the execution
of jobs to make more
efficient use of the CPU
and other resources.
3
Integrated circuits allowed the
Interactive multi-user
Interrupts were
development of microchips to
OS.
developed to allow the
replace individual transistors.
OS to enforce timesharing and to interact
with keyboards and
display terminals, and
also developed during
the same period.
Increased capacity and
speed of memory and
secondary storage
devices imposed
additional management
tasks on the OS.
4
Very large-scale integration (VLSI)
Desktop and laptop OS.
The OS was responsible
allowed the placement of a
for all operations,
complete microprocessor on a
starting from the initial
single chip, leading to the
booting, to
development of personal
multitasking,
computers (PCs).
scheduling, interactions
with various peripheral
devices, and keeping all
information safe. The
emphasis was on userfriendliness, including
the introduction of the
GUI.
5
Networking hardware enabled the
OSs for
The ability to create
harnessing of the power of
supercomputers,
extremely powerful
multiple computers.
distributed systems,
chips spawned several
and mobile devices.
directions of
development.
Supercomputers
combined large
numbers of processors
and made the OS and
other software
responsible for
exploiting the
increased computation
power through parallel
processing. Computer
networks gave rise to
the Internet, which
imposed requirements
of privacy and safety
along with efficient
communication.
Wireless networks led
to the development of
hand-held devices, with
additional demands on
the OS.
Windows and Linux Commands
Use your book, additional resources, and the internet to memorize and complete the table:
Operation
Definition
Windows
Command
(Command
Prompt)
Change
Create
Delete
Move
Rename
List
Find
Locate
Print
Mounting File
System
Unmounting
File System
Ping
Ifconfig
Display File
Contents
Stream Editor
for Editing
Text
Security Questions
Windows GUI
Linux Command
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
Asymmetric
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 capabilities lists, find the object and work down that column
For access 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
Page Table
Metaphor
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
Hit Ratio
component
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:
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?
Draw a picture and define first memory fit
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:
Draw a Picture
Define the Term
Directed Acyclic Directory
Symbolic Link Directory
Structure
Structure
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 disk revolution

Time to wait for the desired sector/data item to pass under
2
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
Disk Access Optimization

Maintains transfer rate and density per track

Maintains speed

Changes transfer rate
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. 3
5. A contained environment (e.g., a virtual machine). sandbox
8. Multiple processing cores within the same CPU chip or within a single system. multicore
9. Rewritable memory, also called main memory. ram
13. The OS uses this to keep track of each process. pcb
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. blocking
17. A set of commands, functions, and other tools that can be used by a programmer in developing a program. api
18. The smallest logical storage unit; a collection of related information defined by its creator. file
19. A program in execution. process
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. apc
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. volatile
26. Instance of executing a portion of a program within a process without incurring the overhead of creating and
managing separate PCBs. thread
DOWN
1. A type of cloud computing that includes both public and private cloud components. Hybrid
2. Type of computing in which servers or storage are available over the internet. IaaS
4. A process role in which the process consumes information produced by a producer process. consumer
6. Interface comprising a window system with a pointing device to direct I/O. gui
7. Program that allows the computer to start running by initializing hardware and loading the kernel. bootstrap
program
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. preemptive
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. synchronous
16. A method of giving commands to a computer based on a text input device (such as a keyboard). cli
21. In UNIX and other operating systems, a means used to notify a process that an event has occurred. signal
22. Common version of RAM, which features high read and write speeds. dram
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. message
Chapters 4.2-7.1 Term Matching
Match the term with its definition.
Definitions:
A.
B.
C.
D.
E.
F.
G.
H.
I.
J.
K.
L.
M.
N.
O.
P.
Q.
R.
S.
T.
Is an integer in the range [0 : n-1] that identifies a word in a physical memory of size n.
Multiple processes trying to enter the CS at the same time must not block each other indefinitely.
Is the act of multiple processes (or threads) executing at the same time.
Is a segment of code that cannot be entered by a process while another process is executing a corresponding
segment of the code.
Schedules processes strictly according to the process arrival time.
Schedules processes according to the remaining CPU time needed to complete the work.
A newly arriving process enters the highest-priority queue, N, and is allowed to run for Q time units.
Is the indefinite postponement of a process while other processes are allowed to proceed.
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.
Is a non-negative integer variable that can be accessed using only two special operations, P and V.
In an interactive system, turnaround time may not be the best criterion.
Algorithm schedules processes according to the shortest remaining time until the deadline.
A process not attempting to enter the CS must not prevent other processes from entering the CS.
A process (or a group of processes) must not be able to repeatedly enter the CS while other processes are
waiting to enter.
Schedules processes according to the total CPU time requirements.
Uses a single queue of processes.
If the CPU is busy executing processes, then work is being done.
Scheduling assigns priorities dynamically according to deadline.
Algorithm schedules processes according to the period.
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:
Download