IS 270 Midterm Study Guide Basic Topics

advertisement
IS 270
Midterm
Study Guide
Date of Midterm _________________
Please save this study guide. It is part 1 of the study guide for the final.
Basic Topics
• Chapter 1: Introducing Operating Systems
− What is an Operating System
− Types of Operating Systems
− Brief History of Operating Systems Development
• Chapter 2: Memory Management: Early Systems
− Single User Contiguous
− Fixed Partitions
∗ Internal Fragmentation
∗ Program Relocation
∗ Memory Protection
− Dynamic Partitions
∗ External
− Allocation Algorithms
∗ Best-Fit
∗ First-Fit
∗ Worst-Fit
− Relocatable Dynamic Partitions
• Chapter 3: Memory Management: Virtual Memory
− Paged Memory Allocation
∗ Pages and Frames
∗ Page Tables: Standard and Inverted
∗ Logical versus Physical Addresses
∗ Translation Look-Aside Buffer
− Demand Paging
∗ Overlays
∗ Additional bits added to the page table
− Page Replacement Algorithms
∗ First-In, First-Out
∗ Least Recently Used
∗ Optimal
− Belady’s Anomaly
− Working Set
− Thrashing
− Frame Allocation Algorithms
∗ Equal or Proportional
∗ Local or Global
− Segmented Allocation
IS 270: Midterm Study Guide
Page 1 of 5
revised: 10/11
− Cache Memory
∗ Principle of locality of reference
◊ Spatial Aspect
◊ Temporal Aspect
∗ Levels: L1, L2, L3
∗ Split or Unified
∗ Mapping functions: Direct, Associative, Set-Associative
∗ Replacement Policy: LRU, LFU, FIFO
∗ Write Policy: Write Through, Write Back, Write Once
1.
Suppose someone comes up to you and asks, "I don't know much about computers, but I
keep hearing the term operating system. What is an operating system?" How would you
respond?
2.
Describe what is mean by batch processing.
3.
Describe what is meant by interactive processing.
4.
Describe what is meant by time-sharing.
5.
Describe what is meant by multiprogramming.
6.
One view of an operating system is that it manages the resources of a computer system.
The textbook divides resources into 4 areas. What are those areas?
7.
Describe the memory hierarchy. What is the purpose of creating a memory hierarchy?
8.
An early form of memory allocation was single-user contiguous allocation. Describe
how this type of memory allocation worked.
9.
Describe how Fixed-Partition memory allocation works. A problem with this type of
memory allocation is internal fragmentation. Describe this problem.
10.
When a multiprogramming memory allocation scheme such as fixed partitions was used, a
problem known as program relocation would occur. Why is program relocation a
problem?
11.
A solution to program relocation was the use of base and limit registers. How are these
registers used?
12.
To avoid the problem of internal fragmentation, variable memory partitioning was
developed. However, this scheme suffers from external fragmentation. Describe the
problem of external fragmentation.
IS 270: Midterm Study Guide
Page 2 of 5
revised: 10/11
13.
To assign a memory partition to a job when variable partitions are used, one of three
algorithms might be used: best-fit, first-fit, worst-fit. Describe how these three
algorithms work.
14.
Suppose variable memory partitioning is being used and the current state of the memory is
the following.
Size
30K
45K
15K
20K
50K
10K
20K
Status
Free
Busy
Free
Busy
Free
Busy
Free
Job
Job 1
Job 2
Job 3
Job 4
Size
10K
20K
30K
10K
Also suppose there are 4 jobs waiting in a job queue with memory requirements given
above. Show how the memory would look using (a) first-fit, (b) best-fit, and (c) worst-fit.
15.
Is paged memory allocation a variation of fixed partitioning or variable partitioning?
16.
What are some of the differences between paged memory allocation and fixed memory
allocation.
17.
Does paged memory allocation use contiguous or non-contiguous memory allocation?
18.
Paged memory allocation requires the use of a data structure called a page table. Describe
how a standard page table is used.
19.
What is the difference between a page and a frame?
20.
With the advent of paged memory allocation, we have the distinction between a logical
address and a physical address. What is the difference between the two?
21.
For what does the acronym TLB stand? What is the purpose of a TLB?
22.
Suppose a 1K memory has 16 byte frames, how many frames does the memory have? If a
program requires 64 bytes of memory, how may pages is the program? If page 0 is in
frame 7, page 1 in frame 20, page 2 in frame 9, and page 3 in frame 14, what is the physical
address of the logical address 0000100110? (Note that 1K = 210 and 16 = 24).
23. How does demand paging differ from paged memory allocation?
24.
What is a page fault?
IS 270: Midterm Study Guide
Page 3 of 5
revised: 10/11
25.
Virtual memory is built on demand paging. Explain how virtual memory works.
26.
When using virtual memory, what is the purpose of a modified or “dirty” bit?
27.
When using virtual memory, what is the optimal page replacement algorithm? Can this
algorithm actually be implemented? Why or why not. Can this algorithm be simulated?
Explain you answer.
28.
Explain the following page replacement algorithms: FIFO, LRU, LFU, Second chance.
Which one(s) are usage based? Which one(e) are time based? Which one used most often
in practice?
29.
What is Belady’s Anomaly? Which of the algorithms in the previous question can exhibit
Belady’s Anomaly?
30.
What is a working set? What is thrashing?
31.
What is the difference between a frame allocation algorithm that uses a local replacement
policy and one that uses a global replacement policy? Which policy is used most often in
practice?
32.
Given the reference string 1, 3, 4, 2, 3, 5, 1, 4, 2, 3, 2 and 3 frames, what is the hit ratio
using the FIFO page replacement algorithm? What is the hit ratio using the LRU page
replacement algorithm?
33.
With virtual memory a program can be very large. Large programs mean large page tables.
What are two techniques that are used to reduce the size of the page table?
34.
What is the difference between paged memory allocation and segmented memory
allocation? Is there any advantage to using segmented memory allocation? If so, what is
it?
35.
Given the following segment table, where Y means the segment is currently in memory, S
= shared, RO = read only, NS = not shared, RW = read/write, and EXEC = executable:
Segment
0
1
2
Base
1400
200
4000
Size
600
300
1250
Status
Y
Y
Y
Access
S, RO
NS, RW
NS, EXEC
What are the physical addresses for the following logical addresses: (0, 500), (1, 400), and
(2, 10)?
36.
Can segmented memory be combined with paged memory? How is this done?
IS 270: Midterm Study Guide
Page 4 of 5
revised: 10/11
37.
What is the principle of locality of reference? What is the difference between spatial and
temporal locality?
38.
What is a cache mapping function used for? There are 3 mapping functions for cache
memory. What are they and how do they differ from each other?
39.
What is the purpose of a cache replacement policy? Describe some cache replacement
algorithms. Which algorithm is the most commonly used?
40.
What is the difference between the write-through and write-back cache policy? How
does the write-once cache policy compare to these two?
41.
What is the difference between L1 and L2 cache? If a cache is described as a split cache
(versus a unified cache), what is being split?
42.
What is the cache coherency problem? What are some solutions to this problem?
43.
For what does the acronym JCL stand? What is the purpose of JCL? Is JCL a current
practice or an early practice?
IS 270: Midterm Study Guide
Page 5 of 5
revised: 10/11
Download