Written Assignment 2 COS-2400 Randy Barham (1)
pdf
keyboard_arrow_up
School
Thomas Edison State College *
*We aren’t endorsed by this school
Course
2400
Subject
English
Date
Apr 3, 2024
Type
Pages
10
Uploaded by SuperHumanBookStingray38
Written Assignment 2
Randy Barham
Thomas Edison State University
COS-2400 Operating Systems
January 16, 2024
Chapter 1
2. Give an example of an organization that might find batch-mode processing useful and
explain why.
An organization that could benefit from this kind of processing is a financial institution. A bank
generally has to process a large volume of transactions every day. By accumulating those
transactions throughout the day and then processing them in batch mode after business hours, the
bank can optimize their resource usage and operational efficiency. This method allows for
automated and scheduled processing without the need for real-time interaction.
3. Name five current operating systems (other than those mentioned in Table 1.1)
and identify the devices that each is designed to run on.
MacOS - Designed for Apple Macintosh computers.
Ubuntu - A Linux distribution made for personal computers, servers, and workstations.
Android - Developed specifically for mobile devices like smartphones and tablets.
FreeBSD - An open-source Unix-like operating system capable of running on various platforms,
including servers and embedded systems.
Chrome OS - Made for Chromebooks and devices that heavily rely on web apps.
4. List three situations that might demand a real-time operating system and
explain in detail the system characteristics that persuade you to do so.
Aerospace systems - RTOS is critical for aircraft navigation that requires immediate response
times for safety and precision.
Medical equipment - In devices like heart monitors or infusion pumps, real-time processing is
necessary for timely and accurate treatment.
Industrial Automation - Systems that control manufacturing processes require real-time
capabilities to maintain coordination among the various systems it uses.
5. Many people confuse main memory and secondary storage. Explain why this
happens, and describe how you would explain the differences to classmates so
they would no longer confuse the two.
The confusion most likely stems from the verbiage as RAM and secondary storage have entirely
different uses. Main memory (RAM) is volatile and used for temporary storage only, while
secondary storage is permanent. To explain the difference, I would use an analogy. RAM is like a
work desk in that it’s only used while you’re working, and secondary storage is like a filing
cabinet where work is stored.
6. Name the five key concepts about an operating system that you think a user
needs to know and understand.
User interface - how the user interacts with the operating system.
Device management - interaction with hardware such as printers and keyboards.
File system - organization and storage of data on storage devices.
Memory management - Allocation and management of system memory.
Process management - How the OS handles and schedules processes.
7. Explain the impact of the evolution of computer hardware and the
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
accompanying evolution of operating systems software.
The impact of the evolution of both computer hardware and operating systems is clearly
interconnected. Advancements in hardware drive the development of more sophisticated
operating systems that can handle more complex tasks. Similarly, the demand for more advanced
operating systems drives hardware innovation to meet the new requirements. The relationship is
interdependent.
8. Give real-world examples of interactive, batch, real-time, and embedded
systems and explain the fundamental differences among them.
Interactive system - Personal computers that allow users to directly interact through a user
interface.
Batch system - Payroll systems that handle large volumes of data in batches without immediate
interaction.
Real-time system - Air traffic control systems that require immediate responses due to safety.
Embedded system - Automotive systems in cars managing functions like engine control and
anti-lock brakes.
9. Briefly compare active and passive multiprogramming and give examples
of each.
Active multiprogramming involves concurrent execution of multiple programs with the operating
system continuously switching between them. Passive multiprogramming lets multiple programs
be loaded into the main memory but only executes them one at a time. An example of active
multiprogramming is a modern operating system, while passive multiprogramming can be seen
in simple batch processing systems where only one task executes at a time.
Chapter 2
1. Describe a present-day computing environment that might use each of
the memory allocation schemes (single user, fixed, dynamic, and relocatable
dynamic) described in the chapter. Defend your answer by describing the
advantages and disadvantages of the scheme in each case.
Single user - This scheme is best for personal computers or devices like phones where there’s
only one user. The advantage is its simplicity, but the disadvantage is that the entire memory is
dedicated to a single user, limiting concurrent use.
Fixed - Industrial control systems and embedded devices both use fixed allocation for predictable
memory usage. The advantage is that it’s stable, but the disadvantage is that it’s potentially
inefficient due to static allocation.
Dynamic - Servers and multitasking operating systems use dynamic allocation for its flexibility.
The advantage is its efficient use of memory, but disadvantages include memory fragmentation.
Relocatable - Modern desktop operating systems usually use this scheme. The advantage is how
efficiently it can utilize memory and stay flexible, but the disadvantages include increased
complexity and potential fragmentation.
2. How often should memory compaction/relocation be performed? Describe
the advantages and disadvantages of performing it even more often than
Recommended.
Memory compaction/relocation should be performed as often as it’s needed, which depends on
the system’s memory management requirements. Performing it more often than recommended
can have advantages like reducing fragmentation and improving overall system performance.
Disadvantages include increased overhead and a potential performance impact during the
compaction process.
3. Using your own words, explain the role of the bounds register.
The bounds register plays an important role in protecting memory. It contains the boundary
address values that set the limits for a program’s access to memory. If a program attempts to
access memory beyond these bounds, a hardware exception is triggered that prevents
unauthorized access while simultaneously enhancing system security.
6.
a. Use the first-fit algorithm to indicate which memory blocks are allocated to
each of the three arriving jobs.
Job A is allocated to Block 1. Job B is allocated to Block 2. Job C is allocated to Block 3.
b. Use the best-fit algorithm to indicate which memory blocks are allocated to
each of the three arriving jobs.
Job A is allocated to Block 3. Job B is allocated to Block 2. Job C is allocated to Block 1.
10. Imagine an operating system that cannot perform memory deallocation. Name
at least three effects on overall system performance that might result and
explain your answer.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Three effects would be fragmentation, limited resource utilization, and performance degradation.
Over time, memory fragmentation will increase, leading to inefficient use of memory. The
system wouldn’t be able to reclaim memory occupied by terminated processes, limiting resource
availability over time. This will lead to overall performance degradation since the available
memory is constantly shrinking.
12. In a system using the relocatable dynamic partitions scheme, given the following
situation (and using decimal form): Job W is loaded into memory starting
at memory location 5000K.
a. Calculate the exact starting address for Job W in bytes.
5000K
b. If the memory block has 3K in fragmentation, calculate the size of the
memory block.
5003k
c. Is the resulting fragmentation internal or external? Explain your reasoning.
The fragmentation is internal since it occurs within the allocated memory block.
13. If the relocation register holds the value -83968, was the relocated job moved
toward the lower or higher addressable end of main memory? By how many
kilobytes was it moved? Explain your conclusion.
The job was moved toward the lower addressable end of memory. It was moved by 82 kilobytes.
The relocation value indicates a negative offset from the base address.
Chapter 3
3. If a program has 471 bytes and will be loaded into page frames of 100 bytes each,
and the instruction to be used is at byte 132, answer the following questions:
a. How many pages are needed to store the entire job?
5 pages are needed.
b. Compute the page number and the exact displacement for each of the byte
addresses where the data is stored. (Remember that page numbering starts
at zero).
Page 1 with a displacement of 32.
5. Given that main memory is composed of only three page frames for public use
and that a seven-page program (with Pages a, b, c, d, e, f, g) that requests pages
in the following order:
a, c, a, b, a, d, a, c, b, d, e, f
a. Using the FIFO page removal algorithm, indicate the movement of the
pages into and out of the available page frames (called a page trace analysis). Indicate each
page fault with an asterisk (*). Then compute the failure and success ratios.
A*, C*, A, B*, A, D*, A, C*, B*, D, E*, F*
The failure ratio is 8 faults /12 total references.
The success ratio is 4 successes/12 total references.
b. Increase the size of memory so it contains four page frames for public use.
Using the same page requests as above and FIFO, do another page trace
analysis and compute the failure and success ratios.
A*, C*, A, B*, A, D*, A, C*, B*, D, E*, F*
The failure ratio is 8 faults/12 total references.
The success ratio is 4 successes/12 total references.
c. What general statement can you make from this example? Explain your
Answer.
Increasing the memory size did not improve the success ratio at all. The program’s page
reference pattern is not improved with additional page frames.
6. Given that main memory is composed of only three page frames for public use
and that a program requests pages in the following order:
a, c, b, d, a, c, e, a, c, b, d, e
a. Using the FIFO page removal algorithm, indicate the movement of the
pages into and out of the available page frames (called a page trace
analysis) indicating each page fault with an asterisk (*). Then compute
the failure and success ratios.
A*, C*, B*, D*, A, C, E*, A, C, B*, D, E
6 faults/12 total references
6 successes/12 total references.
b. Increase the size of memory so it contains four page frames for public use.
Using the same page requests as above and FIFO, do another page trace
analysis and compute the failure and success ratios.
A*, C*, B*, D*, A, C, E*, A, C, B*, D, E
6 faults/12 total references.
6 successes/12 total references.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
c. What general statement can you make from this example? Explain your
Answer.
Similar to the last example, increasing memory size did not impact the success ratio. The
program’s page reference pattern remains the limiting factor.
13. Given three subroutines of 550, 290, and 600 words each, if segmentation is
used then the total memory needed is the sum of the three sizes (if all three
routines are loaded). However, if paging is used, then some storage space is
lost because subroutines rarely fill the last page completely, and that results
in internal fragmentation. Determine the total amount of wasted memory due
to internal fragmentation when the three subroutines are loaded into memory
using each of the following page sizes:
a. 100 words
210 words
b. 600 words
860 words
c. 700 words
1,260 words
d. 900 words
1,950 words