Memory Management Mid Semester Questions

Unit Code BN104 Unit Title Operating Systems Assessment Type Individual Assessment Title Assignment Two Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to report on some important characteristics of Operating Systems. Students must answer Multiple Answer questions and provide written answer about process, file and device management, deadlock, and UNIX commands. After successful completion of this assignment, students should be able to: a. Report on the basics, and provide examples, of operating systems structure and functionality, including memory allocation, virtual memory, demand paging and process and device management. b. Describe the integration of hardware, operating systems and application software. c. Explain in detail the functioning of some devices such as peripherals (e.g. printers and network connections). d. Discuss the most common file systems structure and technology. e. Explain the concept of user interfaces and their role in the functionality of an OS. f. Demonstrate competency in the use of a command line interface to operate with and manage an OS such as UNIX, and perform simple UNIX (Linux) administration. g. Support and troubleshoot operating systems and applications at an introductory level. Weight 30% of the total marks Total Marks 60 Word limit N/A Due Date 11:55 PM, 5TH June, 2020 (Friday, week 11) Submission Guidelines

• All work must be submitted on Moodle by the due date along with a title Page.

• The assignment must be in MS Word format, 1.5 spacing, 11-pt Calibri (Body) font and 2.54 cm margins on all four sides of your page with appropriate section headings.

• Reference sources must be cited in the text of the report, and listed appropriately at the end in a reference list using IEEE referencing style. Extension

• If an extension of time to submit work is required, a Special Consideration Application must be submitted directly AMS. You must submit this application three working days prior to the due date of the assignment. Further information is available at:

c Misconduct

• Academic Misconduct is a serious offence. Depending on the seriousness of the case, penalties can vary from a written warning or zero marks to exclusion from the course or rescinding the degree. Students should make themselves familiar with the full policy and procedure available at: http://www.mit.edu.au/about-mit/institute-publications/policiesprocedures-and-guidelines/Plagiarism-Academic-Misconduct-PolicyProcedure. For further information, please refer to the Academic Integrity Section in your Unit Description.

 Assignment Description Assignment 2-Questions Introduction to operating System (5+5 marks) Question 1 Explain with an example (any application that is not mentioned in slides) all the steps which are taken by all the managers of operating system cooperating with each other from initiation till the complete execution of the application. For example, if you are clicking on video file how different resources are allocated to play the video Question 2 List all existing Operating Systems along with their features, Applications and suitability of the OS for the applications mentioned. Process Management and Memory Management (12+3+5 marks) Question 3 Given the following mix of job, job lengths, and arrival times, assume a time slice of 10 and compute the completion time for each job. Also draw the time line for each job. a. First-come, first-served scheduling (FCFS) algorithm. b. Shortest Job First Scheduling (SJF) algorithm. c. Shortest Remaining time (SRT) algorithm. d. Non-pre-emptive priority Scheduling algorithm. e. Pre-emptive priority Scheduling algorithm. f. Round-Robin Scheduling algorithm

Question 4 Explain in your own words any three types of user interfaces in current devices. Question 5 The following is a memory diagram of a computer system at one particular moment. The OS decides to do a memory compaction, what are the values of the base and limit registers after the compaction? Show your result on new diagram. Figure 1: memory diagram of computer system with three pages in the memory Device Management and File Management(6+6+3 marks) Question 6 On a hard disk, the queue of track requests is as follows: 95 180 34 119 11 123 62 64 Assuming that the head starts at track 50, Draw the diagrams for arm movement for the seek strategies mentioned in the lecture. Calculate the total and average number of tracks travelled. Question 7 Explain RAID (Level 1 to Level 10) with help of figure. Question 8 On your own computer find 6 files that are stored in 6 different directories. For Each File, list both the relative filename and its complete file name

Android and Unix Operating Systems (5+5 marks) Question 9 Android is open source software. Research the extent to which Android source code is available to the public and explain whether or not Android could or should be a more open system. Cite your sources and the dates of publication. Question 10 Run any 5 Unix commands and paste the screen shots in answer. Also give the brief description of each command.

In a bank, a process transfers money from account A to account B as follows:
Money Transfer Process Lock account A: Lock account 8; Transfer money from account A to account 8; Unlock account A; Unlock account 8;
(a) Apply the Testament() institution to realize the above money transfer.
[5 marks]
(b) Apply semaphore(s) to realize the above money transfer.
[5 marks] (c) Explain what you would do to ensure that the money transfer processes would not have deadlock
[5 marks]
2. Suppose processes A, B, C and D must be synchronized as follows: Process A executes Processional () and Process B executes Processbato2() concurrently. When the above two functions have completed execution, Process C executes Processbata3() and Process D executes Processbata40 concurrently. Apply semaphores to solve the above synchronization problem.

Direct-Mapped Cache
This programming assignment builds off the Module 10 Direct-mapped Cache assignment. Write a C
program that simulates the 16-byte memory segment and 8-byte cache. Given the series of memory
accesses noted, write the necessary code to complete and output the table below.
Use the first Contents/Tag column to insert an item to the cache the first time and use the second
Contents/Tag column if a cache entry is overwritten. Note: no index will have more than two blocks
mapped to it. The first two examples have been provided.
Lastly, count and output how many cache hits occur given the memory accesses. Count and output how
many cache misses that have occurred.
Remember, the strategy is to overwrite existing elements in the cache if cache slot is already full.

. Use the best-fit algorithm to indicate which memory blocks are allocated to each of the four arriving jobs. b. Use the first-fit algorithm to indicate which memory blocks are allocated to each of the four arriving jobs. [2 + 2 = 4 marks] 2. If a program has 571 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? b. Compute the page number and exact displacement for each of the byte addresses where the data is stored. (Remember that page numbering starts at zero). [2 + 2 = 4 marks] 3. 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) indicating each page fault with an asterisk (*). Then compute the failure and success ratios. 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. c. What general statement can you make from this example? Explain your answer.

Choose an operating system that:

  • Was introduced prior to 1990
  • Is, or was, either a time-sharing or fully multitasking operating system
  • Is not any version of MS-DOS, Microsoft Windows, any Unix-like system, or the Macintosh OS?

Describe:

  • The history of its development
  • Its intended usage domain, and the general characteristics of operating and/or using it
  • At least one distinctive feature or trait that set it apart from other operating systems either historically or at the time
  • The degree of its commercial success and impact, or lack thereof
  • Any technological influence it had on the development of later operating systems
  • Whether it or any of its descendants remain in use, and why

The length limit is three pages (11 or 12 point, a standard font, and 1” margins).

You need at least three references. One of these may be an online reference to the operating system; one should be a manual, textbook, or contemporary article describing it; and one should be either another contemporary article or a later article describing its legacy.

You must cite any source you use, and you must write all material in your own terms, not merely copy and paste.

OS/2 from IBM is an obsolete OS for PCs.
In OS/2, what is commonly embodied in the concept of process in other operating systems is split into three separate types of entities: session, processes, and threads. A session is a collection of one or more processes associated with a user interface (keyboard, display, and mouse). The session represents an interactive user application, such as a word processing program or a spreadsheet. This concept allows the personal computer user to open more than one application, giving each one or more windows on the screen. The OS must keep track of which window, and therefore which session, is active, so that keyboard and mouse input are routed to the appropriate session. At any time, one session is in foreground mode, with other sessions in background mode. All keyboard and mouse input are directed to one of the processes of the foreground session, as dictated by the apple- cations. When a session is in foreground mode, a process performing video output sends it directly to the hardware video buffer and then to the user’s display. When the session is moved to the background, the hardware video buffer is saved to a logical video buffer for that session. While a session is in background, if any of the threads of any of the processes of that session executes and produces screen output, that output is directed to the logical video buffer. When the session returns to foreground, the screen is updated to reflect the current contents of the logical video buffer for the new foreground session.

There is a way to reduce the number of process-related concepts in OS/2 from three to two. Eliminate sessions, and associate the user interface (keyboard, mouse, and display) with processes. Thus, one process at a time is in foreground mode. For further structuring, processes can be broken up into threads.

a. What benefits are lost with this approach?
b. If you go ahead with this modification, where do you assign resources (memory, files, etc.): at the process or thread level?