Operating systems

NIT1202 Operating systems Assignment 

Q1. 400 words Article review about operating system in a computing magazine since January 2016.

In the 2016 ZDnet article, Linux Mint 18 was presented as the best desktop undoubtedly (Vaughan-Nichols, 2016).The new features of Linux Mint 18 are explored in very effective manner.

The operating system was launched in the June end of 2016 with the in-house built Cinnamon desktop and GNOME 2 fork MATE desktop options. Two other versions were also launched named Xfce and KDE. This operating system is based on Ubuntu 16.04 and number of new significant features introduced.

Earlier the Linux Mint 17series was also launched in 2014 and it has proved itself as an alternative to Canonical’s Ubuntu. (“Operating Systems”, 2016) It has a very impressive look and feel with a huge collection of background images.

The newly introduced features of Linux Mint 18 are:

  • MATE 1.14, Linux kernel 4.4 and Cinnamon 3.0 compatible
  • It supports exFATfile system and by default is the Btrfs le system. · It has an enhanced update manager that provides support for the installation of different versions of Linux kernel.
  • Whatever the changes will be done in the update manager will be received successfully by the user.
  • It provides easier configuration to manage safety, security and stability for system updates.
  • It supports a new syntax of Debian “apt” with some enhancements and changes.
  • We can use a terminal command to clean up the junk repository.
  • Whenever the terminal commands “apt install”, “apt remove” or “sudo apt autoremove” run it displays a progress bar.

Linux Mint 18 Reviews

In Linux Mint 18 there are windows management improvements available on tilling, mapping and unmapping windows (Vaughan-Nichols, 2016).

Window can be easily snapped by dragging it into position

In Linux Mint 18, there is option available for disabling the favourites and system options related with menu applet. Animation effects can also be seen on menus and dialogs. It has enhanced touchpad support. More options are available for choosing default applications for different le types. It has improved support for Spotify 0.27, Viber and GTK 3.20

Linux Mint 18 has a stylish dark background theme with some enhanced options related with documentation, apps, drivers, forums, chat room etc. While comparing Linux Mint 18 from the hardware point of view, we saw that USB devices such as mobile phones, MP3 audio and sony Walkman are preinstalled on Linux Mint 18. Setting up a network printer is also a very simple process in this version of Linux. OnCheamtNoroewvery advance feature of Linux Mint 18 is network storage capability with even the device those were failed in other operating systems.

Linux Mint 18 issues

Some of the issues in Linux Mint 18 operating system are such as wireless issues that were the same in earlier versions of Linux.

Reference

Vaughan-Nichols, S. (2016). ​Linux Mint 18: The best desktop – period. Retrieved from https://www.zdnet.com/article/linux-mint-18-the-best-desktop-period/

 Q2. Given the following information:

Job List: Memory Block List:
Job NumberMemory Requested Memory BlockMemory Block Size
Job A57KBlock 1900K
Job B920KBlock 2910K
Job C50KBlock 3200K
Job D701KBlock 4300K

Use the best-fit algorithm to indicate which memory blocks are allocated to each of the three arriving jobs.

ANS:

Best -Fit Algorithm – In best-fit algorithm , the arriving job is allocated the smallest memory chunk available which is large enough to provide the memory requested by that job

Job A is allocated to Block 3,

Job B is allocated to waiting, since there is no memory block that can match the job memory size of 920K,

Job C is allocated to Block 4,

Job D is allocated to Block 1.

Use the first-fit algorithm to indicate which memory blocks are allocated to each of the three arriving jobs.

ANS:Job A is allocated to Block 1,

Job B is allocated to waiting, since memory requested is higher than memory block size available

Job C is allocated to Block 2,

Job D is allocated to waiting, since memory requested is higher than memory block size available

Notice that neither algorithm can allow Job B to move into memory because no partition is large enough for it.

Q3: Compare and contrast internal fragmentation and external fragmentation. Explain the circumstances where one might be preferred over the other

Memory fragmentation occurs when a system contains memory that is technically free but that the computer cannot utilize it. Both internal and external fragmentations are a form of wasted space.

Internal fragmentation occurs when the memory allocator leaves extra space empty inside of a block of memory that has been allocated for a client. External fragmentation happens when the memory allocator leaves sections of unused memory blocks between portions of allocated memory.

During internal fragmentation, it is essential for the operating system to maintain a partition table containing the starting address of individual processes, along with the number of partitions, whereas in external fragmentation further information is required, which include starting and ending address along with the information for the free memory locations.

Internal fragmentation is preferred when the wasted memory or unallocated memory can be re-utilised in the form of new memory blocks. However external fragmentation is preferred when the program data requires more memory than the maximum single memory block available.

Q4. 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?

Answer:

The number of pages required = total length of program/page size = 471/100= 4.71. Therefore, number of pages needed to store the program = 5

b. Compute the page number and the exact displacement for each of the byte addresses where the data is stored. (note: page numbering starts at zero).

Answer:

The first page commences from address 0. As the given page size is 100 bytes each: Address 100 represents page 1 (the second page) with offset (displacement) 0. Address 266 represents page 1with offset 1. Address 514 represents page 2 with offset 2.

To store page number: 3 bits

To store offset:7 bits

Q5.Given that main memory is composed of only three-page frames for public use and that a sevenpage 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

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.

ANS:

The job pages are (a, b, c, d, e, f) are a total of 6 in number. Also, number of page frames = 3. Therefore, total number of requested pages = 12. (The first-in page, the oldest swappable page, is shown in bold.)

Page requestacabadacbdef
Page fault**********
Page Frame 1aaaaadddbbbf
Page Frame 2cccccaaaddd
Page Frame 3bbbbcccee

Failure ratio = 10 / 12 = 83%

Success ratio = 2 / 12 = 17%

Failure ratio: 10/12,

Success ratio: 2/12

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.

ANS:

Here, the number of page frames is increased to 4.

Page requestacabadacbdef
Page fault******
Page Frame 1aaaaaaaaaaee
Page Frame 2ccccccccccf
Page Frame 3bbbbbbbbb
Page Frame 4ddddddd

Failure ratio = 6 / 12 = 50%

Success ratio = 6 / 12 = 50%

What general statement can you make from this example? Explain your answer.

A general conclusion, which agrees with intuition, is that by adding more available page frames when using FIFO, one can reduce the rate of failure and increase the rate of success. This conflicts with the answer in the next exercise.

Q6. Five jobs arrive nearly simultaneously for processing and their estimated CPU cycles are, respectively: Job A = 12, Job B = 2, Job C = 15, Job D = 7, and Job E = 3 ms.

a. UsingFCFS, and assuming the difference in arrival time is negligible, in what order would they be processed? What is the total time required to process all five jobs? What is the averageturnaround time for all five jobs?

The order of processing for the given jobs

Job A → Job B → Job C → Job D → Job E

Total time needed to process all the jobs = 12+2+15+7+3 = 39 ms.

Turnaround time for job A = 12 ms.

Turnaround time for job B = 14ms.

Turnaround time for job C = 29ms.

Turnaround time for job D = 36ms.

Turnaround time for job E = 39ms.

Average turnaround time =

((12−0)+(14−0)+(29−0)+(36−0) + (39−0)) / 5

Therefore,Average turnaround time is computed to be26 ms

b. Using SJN, and assuming the difference in arrival time is negligible, in what order would they be processed? What is the total time required to process all five jobs? What is the averageturnaround time for all five jobs?

The order of processing of given jobs will be

Job B → Job E → Job D → Job A → Job C

Total time taken to process all the jobs = 12+2+15+7+3 = 39 ms.

Turnaround time for job B = 2 ms.

Turnaround time for job E = 5 ms.

Turnaround time for job D = 12 ms.

Turnaround time for job A = 24 ms.

Turnaround time for job C = 39 ms

Average turnaround time =

{(2−0)+(5−0)+(12−0)+(24−0)+(39−0)}/5

Therefore,Average turnaround time is computed to be 16.4 ms

Q7.

  1. FCFS: By the time the 1sttask relinquishes the CPU, all of the tasks would have arrived, at the Time 15
  2. SJN: By the time the 1sttask relinquishes the CPU, all of the tasks would have arrived, at the Time 15
  3. SRT: By the time the 1st task relinquishes the CPU, Only Task B would have arrived, at the Time 24. Round Robin (use a time quantum of 5, but ignore the time required for contextswitching and natural wait)

By the time the 1st task relinquishes the CPU, Only the task B and Cwill have arrived, at Time 5

JobArrival TimeCPU CycleFCFSSJNSRTRound Robin
A015Start:   0

Finish:  15

Start:    0

Finish: 15

Start:    0

Finish: 28

Start:    0

Finish: 38

B22Start:    15

Finish:  17

Start:    16

Finish:  18

Start:     2

Finish:   4

Start:    5

Finish:  7

C314Start:    17

Finish:  31

Start:    28

Finish:  42

Start:    28

Finish:  42

Start:    7

Finish: 42

D610Start:    31

Finish:  41

Start:    18

Finish:  28

Start:      6

Finish:  17

Start:   12

Finish: 33

E91Start:    41

Finish:  42

Start:    15

Finish:  16

Start:      9

Finish:  10

Start:   17

Finish: 18

 

 

Leave a Comment