hello quizlet
Home
Subjects
Expert solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
Science
Computer Science
Operating Systems: Exam 3 Topics
Flashcards
Learn
Test
Match
Flashcards
Learn
Test
Match
Chapters 6, 8, 9, 10, and 11.
Terms in this set (61)
Explain the difference between preemptive and nonpreemptive scheduling
In preemptive scheduling, the scheduler can retake the CPU from a currently-running process and reassign the CPU to another process. In non-preemptive scheduling, the scheduler cannot retake the CPU from a currently-running process to reassign it unless the process voluntarily gives it up
What advantage is there in having different time-quantum sizes at different levels of a multilevel queueing system?
Having different time-quantum sizes allows the system to be more efficient and give different processes the amount of time they need
Distinguish between PCS and SCS scheduling
In process contention scope (PCS) scheduling, the contention occurs among the threads within the same process. In system contention scope (SCS), the contention occurs among all the threads in the system
Why is it important for the scheduler to distinguish I/O-bound programs from CPU-bound programs?
A good balance of CPU-bound and I/O-bound processes keeps the overall system as busy as possible.
Why would it make more sense to give higher priority to I/O-bound programs and allow them to execute ahead of the CPU-bound programs?
Because I/O-bound programs tend to take longer, giving them higher priority will mean they are able to get their stuff out of the way, followed by the assured CPU-bound programs to go through.
What relation holds between the Priority and Shortest-Job-First scheduling algorithms?
Both of these scheduling algorithms can be either preemptive or non-preemptive
What relation holds between the Priority and First-Come-First-Served scheduling algorithms?
Order
What relation holds between the Round Robin and Shortest-Job-First scheduling algorithms?
Time
Which of the following scheduling algorithms could result in starvation? a. First-Come-First-Served b. Shortest-Job-First c. Round Robin d. Priority
Shortest-Job-First and Priority scheduling
What is the effect of allowing 2 entries in a page table to point to the same page frame in memory?
The users can share code and data.
If the code is re-entrant, then memory space can be saved through the shared use of large programs such as text editors, compilers, and database systems.
How would allowing 2 entries into a page table be used to decrease the amount of time to copy a large amount of memory from one place to another?
Having everything point to the same memory location.
What effect would updating a byte on one page have on the other page?
It would be effected on the other user's copy.
Explain the difference between internal and external fragmentation
a. Internal Fragmentation:
i. Fixed-sized memory, blocks square measure appointed to process.
ii. Occurs when memory is divided into fixed-sized partitions
iii. Solution is best-fit block
b. External Fragmentation:
i. Variable-sized memory, square measure appointed to method.
ii. Occurs when memory is divided into variable size partitions based on the size of processes.
iii. Solution is compaction, paging and segmentation.
What is the purpose of paging the page tables?
To improve the performance (if the size of the page tables become larger).
Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault occurs.
When a program accesses a page that has been mapped in address space, but has not been loaded into the physical memory.
1. Consider a demand-paging system with the following time-measured utilizations:
a. CPU utilization 20%
b. Paging disk 97.7%
c. Other I/O devices 5%
For each of the following, indicate whether it will (or is likely to) improve CPU utilization. Explain your answers.
a. Install a faster CPU
b. Install a bigger paging disk
c. Increase the degree of multiprogramming
d. Decrease the degree of multiprogramming
e. Install more main memory
f. Install a faster hard disk or multiple controllers with multiple hard disk
g. Increase the page size
a. No this will not improve --- (because a faster CPU reduces the CPU utilization further since the CPU will spend more time waiting for a process to enter into the ready queue.)
b. No, this will not improve --- (because the size of the paging disk does not affect the amount of memory that is needed to reduce the page faults.)
c. No, this will not improve --- (because since each process would have fewer frames available and the page fault rate would increase.)
d. Yes, this will help --- (because by suspending some of the processes, the other processes will have more frames in order to bring their pages in them, hence reducing the page faults.)
e. Yes, this will help --- (because more pages can remain resident and do not require paging to or from the disks.)
f. Yes, this will help --- (because more pages can remain resident and do not require paging to or from the disk; there are more disks and it is faster.)
g. No, this will not help --- because since each process would have fewer frames avaliable and the page fault rate would increase.)
What is the copy-on-write feature?
(Two processes using the same set of program values)
When a write does indeed take place, then a copy must be made to allow the two programs to individually access the different copies without interfering with each other.
In a system using pure demand paging, when process first start execution, how would you characterize the page fault rate?
i. When there are no pages which could be used by the process is present in memory, then it will generate a page fault.
ii. Initially, when a process starts execution, we can characterize the page-fault rate equal to number of page faults occurred divided by the number of instructions executed. Hence, the larger number of instructions present per page, the lesser the page fault rate will be.
In a system using pure demand paging, once the working set for a process is loaded into memory, how would you characterize the page fault rate?
i. A page fault can only occur only if the number of pages required to execute the process cannot be accommodated into the physical memory at the same time.
ii. page-fault rate = # page faults / # pages
iii. Hence, the page fault rate will be less if more pages are accessed with less page faults.
In a system using pure demand paging, assume a process changes its locality and the size of the new working set is too large to be stored into available free memory. Identify some options system designers could choose from to handle this situation?
i. Virtual memory
ii. Global page replacement policy
Explain why SSTF scheduling tends to favor middle cylinders over the innermost and outermost cylinders.
i. The center of the disk is the location having the smallest average distance to the other tracks, thus after servicing the first request, the algorithm would be more likely to be closer to the center track than to any other particular track, and hence would more often go there first.
ii. Once at a particular track, SSTF tends to keep the head near this track; thus, this scheduling strategy would compound the initial tendency to go to the center.
What are the tradeoffs involved in rereading code pages from the file system versus using swap space to store them?
i. If stored in swap space, they can be transferred quickly to main memory.
ii. Using swap space can require startup time if the pages are copied there at process invocation rather than just being paged out to swap space on demand.
iii. More swap space must be allocated if it is used for both code and data pages.
None of the disk-scheduling disciplines, except FCFS, is truly fair (starvation may occur).
Explain why this assertion is true.
New requests for the track over which the head currently resides can theoretically arrive as quickly as these requests are being serviced.
Describe a way to modify algorithms such as SCAN to ensure fairness.
All requests older than some predetermined age could be forced to the top of the queue, and an associated bit for each could be set to indicate that no new request could be moved ahead of these requests.
Explain why fairness is an important goal in a time-sharing system.
To prevent unusually long response times.
Give three or more examples of circumstances in which it is important that the operating system be unfair in serving I/O requests.
i. Paging and swapping should take priority over user requests.
ii. It may be desirable for other kernelinated I/O, such as the writing of file system metadata, to take precedence over user I/O.
iii. If the kernel supports real-time process priorities, the I/O requests of those processes should be favored.
How does attacker possess threats to the security of operating system?
i. Sensitive information
ii. Internet browsing habits
iii. Viruses, trojans, botnets, etc.
Define vulnerability in terms of technology
Vulnerability means the non ability to resist a hazard / to respond when a disaster has occurred.
Define vulnerability in terms of configuration
A flaw in your security settings, example failing to auto-encrypt your files, may leave the entire network & every single device connected to it vulnerable to an massive attack.
Define vulnerability in terms of policy
Diminished capacity of an individual or group to anticipate, cope with, resist & recover from the impact of a natural or man-made hazard.
Define threats
Any event / circumstance with the potential to highly impact any computer through unauthorized access, modification of data, destruction, disclosure or denial of service.
Types of threats
i. External Threats:
- Individuals or organizations working from the outside that do not have access or authorization to computer systems.
ii. Internal Threats:
- Someone who has authorized access to the system or network and misuses their account.
Define attacks
Any attempt to expose, alter, disable, destroy, steal or gain information through unauthorized access to or make unauthorized use of an asset.
Types of attacks (active and passive)
a. Types of active attacks are as following:
i. Masquerade -Masquerade attack takes place when one entity pretends to be different entity.
ii. Modification of messages -It means that some portion of a message is altered or that message is delayed or reordered to produce an unauthorised effect.
iii. Repudiation -This attack is done by either sender or receiver. The sender or receiver can deny later that he/she has send or receive a message.
iv. Denial of Service - denial is the disruption of an entire network wither by disabling the network or by overloading it by messages so as to degrade performance.
b. Types of Passive attacks are as following:
i. The release of message content -Telephonic conversation, an electronic mail message or a transferred file may contain sensitive or confidential information.
ii. Traffic analysis -Suppose that we had a way of masking (encryption) of information, so that the attacker even if captured the message could not extract any information from the message. The opponent could determine the location and identity of communicating host and could observe the frequency and length of messages being exchanged.
Different types of attackers
i. Cyber Criminals - Cybercriminals are individual or group of people who use technology to commit cybercrime with the intention of stealing sensitive company information or personal data and generating profits. In today's, they are the most prominent and most active type of attacker.
ii. Hacktivists - Hacktivists are individuals or groups of hackers who carry out malicious activity to promote a political agenda, religious belief, or social ideology.
iii. State-sponsored Attacker - State-sponsored attackers have particular objectives aligned with either the political, commercial or military interests of their country of origin. These type of attackers are not in a hurry.
iv. Insider Threats - The insider threat is a threat to an organization's security or data that comes from within. These type of threats are usually occurred from employees or former employees, but may also arise from third parties, including contractors, temporary workers, employees or customers.
Give the difference in masquerader, misfeasor, and clandestine
a. Masquerader: pretend to be someone one is not.An individual who is not authorized to use the computer and who penetrates a system's access controls to exploit a legitimate user's account
b. Misfeasor : authentic user doing unauthorized actions. A legitimate user who accesses data, programs, or resources for which such access is not authorized, or who is authorized for such access but misuses his or her privileges
c. Clandestine user : done secretively, especially because illicit. An individual who seizes supervisory control of the system and uses this control to evade auditing and access controls or to suppress audit collection.
-------------------------------------------------------------
d. The masquerader is likely to be an outsider; the misfeasor generally is an insider; and the clandestine user can be either an outsider or an insider.
1. Why is it difficult to prevent DoS and DDoS attacks?
i. Sites don't know where the attacks are coming from.
ii. Firewalls aren't designed to handle DDoS attacks.
iii. The defense can't be mounted on the hosting provider's infrastructure.
What is confidentiality?
The data of the user is accessed only by the user and no other person can access it
What is integrity?
Accuracy and completeness of the data.
What is availability?
The providing of the services to the authorized user when he/she needs it.
Explain the differences in worms, viruses, and trojan horses.
a. Worms:
i. Replicate themselves to slow down the computer system.
ii. Self-replicating.
iii. Can be controlled remotely.
iv. Executed by weaknesses in the system.
b. Virus:
i. Virus is a software or computer program that connects themselves to another software or computer program to harm computer systems.
ii. Self-replicating.
iii. Cannot be controlled remotely.
iv. Executed by executable flies.
c. Trojan Horses:
i. Capture some important information about a computer system or a computer network.
ii. Not self-replicating.
iii. Can be controlled remotely.
iv. Executed through a program and interprets as utility software.
Explain how you can provide security at each layers in the four-layered model of security.
1. Physical Layer
- locked doors and desks (we are talking about physical hard-drives and stuff like that)
2. Network Layer
- using passwords and biometric scans
3. Operating System Layer
- updating security patches
4. Application Layer
- restrict user downloads
How is security different from protection in an operating system?
a. Security:
- Covers the safety of the system's resources.
b. Protection:
- Deals with the access to the system resources.
What are the goals of protection in operating system?
i. To prevent malicious misuse of system by users.
ii. To ensure that errant programs cause minimum problems or damage.
iii. To ensure each shared resource is used in accordance with system policies.
What is the Principle of Least Privilege?
Works by allowing sufficient access to perform the required job. Adhering to this principle, the risk of attackers gaining access to critical systems is reduced by compromising a low level user account or device.
What is the Need to Know Principle?
This principle allows the user to access the amount of information which is required to accomplish a particular task.
What are the differences between the Principle of Least Privilege and the Need to Know Principle
Need to know principle means the user has a legitimate reason to accomplish a task. Whereas, least privilege can be implemented to limit what the user can do with something.
How does a domain structure provide protection in the modern computer system?
To ensure the data's safety and to prevent any illegal user from getting access to the data or programs.
The domain structure also limits the access of the each process through their resources.
What do you mean by protection rings and how is protection ensured by such protection scheme?
i. The protection rings are a hierarchical system architecture that separate the levels of interaction to protect the use of computer, process, application, component in operating system.
ii. In protection rings there are different protection layers so it provides the security.
How to get bits in a logical address (formula)
Pages * words
ex: 64 pages = 2^6
1024 words = 2^10
2^6 * 2^10 = 2^16
How to get bits in the physical address (formula)
Frames * words
ex: 32 frames = 2^5
1024 words = 2^10
2^5 * 2^10 = 2^15
Page number + offset from logical address (deriving these from logical address)
ex: 3085
Logical address: 00000000000000000000110000001101
Before last 10 (page #): 0000000000000000000011
i. Page #: 3 (convert from binary to decimal)
Last 10 (offset): 0000001101
i. Offset: 13 (convert from binary to decimal)
How many bits in logical address? (formula)
ex: 256 pages with 4-KB page size mapped onto 64 frames of physical memory
Note: we do 2^10 * 4 because it is 4 KB in this example
ex: 256 pages with 4-KB page size mapped onto 64 frames of physical memory
Logical address = # pages * page size
= 256
(4
2^10) = 2^8
2^2
2^10 = 2^20
= 20 bits.
How many bits are required in the physical address? (formula)
ex: 256 pages with 4-KB page size mapped onto 64 frames of physical memory
ex: 256 pages with 4-KB page size mapped onto 64 frames of physical memory
Physical Address = # frames * size of frame
= 64
(4
2^10) = 2^6
2^2
2^10 = 2^18
= 18 bits.
How many entries are there in a single-level page table? (formula)
ex: A computer system with a 32-bit logical address and 4-KB page size. The system supports up to 512 MB of physical memory
ex: A computer system with a 32-bit logical address and 4-KB page size. The system supports up to 512 MB of physical memory
Logical Address: 2^32
Page Size: 2^12
Physical Memory: 2^29
= Number of page entries: 2^32 / 2^12 = 2^20
The maximum number of entries in the page table (formula)
ex: A computer system with a main memory of size 256 MB and each addressable units of size 2 bytes. Consider a logical address is 32 bits and the page size of 512 bytes
ex: A computer system with a main memory of size 256 MB and each addressable units of size 2 bytes. Consider a logical address is 32 bits and the page size of 512 bytes
Maximum # of entries in page = # pages
= 2^32 / 512 = 2^32 / 2^9 = 2^23
How many entries are required for the process? (formula)
ex: A computer system with a main memory of size 256 MB and each addressable units of size 2 bytes. Consider a logical address is 32 bits and the page size of 512 bytes
ex: A computer system with a main memory of size 256 MB and each addressable units of size 2 bytes. Consider a logical address is 32 bits and the page size of 512 bytes
# pages = process size / page size
i. (2 * 2^20) / 2^9 = 2^12
What is the size of the page table? (formula)
ex: A computer system with a main memory of size 256 MB and each addressable units of size 2 bytes. Consider a logical address is 32 bits and the page size of 512 bytes
ex: A computer system with a main memory of size 256 MB and each addressable units of size 2 bytes. Consider a logical address is 32 bits and the page size of 512 bytes
# frames = size of main memory / page size
= (256 * 2^20) / 2^9 = 2^25 / 2^9 = 2^19
Size = # pages * size per entry
= (2^12) * 19 bits
Average Memory Access Time (formula)
ex:
Main Memory Access Time = 250 usec
TLB Access Time = 35 usec
TLB Hit Ratio = 0.95
ex:
Main Memory Access Time = 250 usec
TLB Access Time = 35 usec
TLB Hit Ratio = 0.95
Average Memory Access Time = TLB Hit Ratio
(TLB Access Time + Main Memory Access Time) + (1 - TLB Hit Ratio)
(SLB Access Time + 2 Main Memory Access Time)
= 0.95
(35 + 250) + 0.05
(35 + 500)
= 270.75 + 26.75 = 297.5 usec.
Average Memory Access Time (without TLB) (formula)
ex:
Main Memory Access Time = 250 usec
TLB Access Time = 35 usec
TLB Hit Ratio = 0.95
ex:
Main Memory Access Time = 250 usec
TLB Access Time = 35 usec
TLB Hit Ratio = 0.95
Average Memory Access Time (without TLB) = 2 * main memory access time
= 500 usec.
Average Memory Access Time (with TLB) (formula)
ex:
Main Memory Access Time = 250 usec
TLB Access Time = 35 usec
TLB Hit Ratio = 0.95
ex:
Main Memory Access Time = 250 usec
TLB Access Time = 35 usec
TLB Hit Ratio = 0.95
Average Memory Access Time (with TLB) / Average Memory Access Time (without TLB)
= 297.5 / 500 = 0.595
Sets found in the same folder
CS 4323 Exam 1
62 terms
OPSYS Exam1
83 terms
CS 4323 Exam 2
32 terms
Other sets by this creator
STAT4203 Chapter 3
26 terms
STAT4204 Chapter 2
35 terms
STAT4203 Chapter 1
14 terms
BCOM Exam 1 Chapter 1
3 terms
Verified questions
biology
If 1.0g of a radioactive isotope had a half-life of 1 billion years, how much of it would be left after each of the following intervals of time: 1 billion years, 2 billion years, 3 billion years, and 4 billion years?
physics
If an object has a constant rotational acceleration, is its rotational velocity also constant? Explain.
chemistry
(S)-Lactic acid has a specific rotation of +3.8. (a) If the ee of a solution of lactic acid is 60%, what is $$ [ \alpha ] $$ for this solution? (b) How much of the dextrorotatory and levorotatory isomers does the solution contain?
environmental science
Write true if the statement is true. If it is false, change the underlined word or words to make the statement true. A population's $\underline{\text{distribution}}$ describes how crowded it is.
Recommended textbook solutions
Fundamentals of Database Systems
7th Edition
•
ISBN: 9780133970777
(1 more)
Ramez Elmasri, Shamkant B. Navathe
687 solutions
Service Management: Operations, Strategy, and Information Technology
7th Edition
•
ISBN: 9780077475864
James Fitzsimmons, Mona Fitzsimmons
103 solutions
Service Management: Operations, Strategy, and Information Technology
7th Edition
•
ISBN: 9780077475864
James Fitzsimmons, Mona Fitzsimmons
103 solutions
Introduction to Algorithms
3rd Edition
•
ISBN: 9780262033848
(2 more)
Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
726 solutions
Other Quizlet sets
The Giver Ch. 7-14
36 terms
Science Lesson 2
14 terms
COMM 275 - Ch 8, 10, 11, 13, 14, & 15
85 terms
Career Cluster Skills: Writing A Resume
23 terms