Skip to main content

Memory Allocation Algorithms

First­-Fit
The process for entering a process using the first­-fit algorithm was to find the first available partition that the memory could fit into. Although this may have been the quickest way to allocate a process to an open partition, it was not the most ideal. The process is written in an open partition regardless of the total amount of memory that was available. This is not the most efficient way to store processes because the algorithm may write into a partition that could have later been occupied by a larger process. However, this algorithm, overall, is better than the worst ­fit algorithm in the fact that it was able to store more of the assigned processes.


Best­-Fit
The best fit method was the most efficient algorithm. This is because the algorithm is trying to find the smallest partition that the process can be stored in. Doing so provides the most leftover memory that an additional process can be stored in. However, this may not be the quickest solution as each partition will need to be scanned to determine the best possible final location. Looking at the breakdown below it is easy to see how this algorithm has not only been able to store all the listed processes, but it was also able to leave the most available space remaining.


Worst­-Fit
The worst­-fit algorithm, unsurprisingly, is the worst algorithm. Not only is it not the quickest, but it is also the least efficient. This algorithm sets out to store a process in the least efficient way possible. For example, it has stored the 21 KB process in the 500 KB partition. The best partition the 22 KB process should have been stored in was the 35 KB partition. This algorithm also prevents larger processes from being stored such as the 489 KB and 302 KB partition as shown below.


Throughout all of the algorithms, it was important to store the initial process and then determine the leftover space and so on. Doing so will show the available free space remaining in the partition as there may be a process that can be stored in that space later. This was especially evident with the first­-fit and worst-­fit algorithms as there were instances where numerous processes were able to fit into the same partition after they were broken down. What I found interesting was how large the partitions could potentially be in terms of length when even more processes are added in addition to the ones that were assigned. In my opinion I would rather have the best-­fit algorithm store my processes because that way I know I would have the most amount of available space even though it is not the quickest option. I cannot think of a single instance where a user would want to use any algorithm other than the best­-fit algorithm. Overall, I think that this assignment was a great way to show how processes are stored and what the algorithm is looking for in order to operate correctly.

References:

Silberschatz, A., Galvin, P.B., & Gagne, G. (2014). Operating System Concept Essentials (2nd
ed.). Retrieved from https://redshelf.com/

GeeksforGeeks. (2021, June 28). Thread in operating system. GeeksforGeeks. Retrieved January
10, 2022, from https://www.geeksforgeeks.org/thread­in­operating­system/


Comments

Popular posts from this blog

Peering Points and the Network Application Interface

According to Gibb (2019), “Peering is a method that allows two networks to connect and exchange traffic directly without having to pay a third party to carry traffic across the Internet.” Utilizing a peering point allows users to send a receive data directly to one another without the need to route through other computer networks. Doing so allows for a quicker, more efficient, and safer form of communication.  Researching the total number of active Internet Exchange Points (IXP) proved difficult as it was hard to pinpoint an accurate number. However, according to Rosas (2021), “as of January 2021, of the 630 registered IXPs, 229 are in Europe, 126 in North America, 140 in Asia-Pacific, 96 in Latin America and the Caribbean (LAC), and 39 in Africa.” These numbers are constantly changing as new IXPs are added, and some are removed.  Finding a definitive number of Internet Service Providers (ISP) globally was also difficult to accomplish. Most sources seem to point to the Nations Encyclop

VLAN Aggregation for Efficient IP Address Allocation

The project I chose to summarize on the Internet Engineering Task Force (IETF) website was RFC: 3069, VLAN Aggregation for Efficient IP Address Allocation. Within this project, the authors point out how inefficiently a Virtual Local Area Network (VLAN) allocates IP addresses along with their proposed solutions. I have also attached a diagram showing how the network would look pertaining to this project. Currently, an IP subnet would be made for each existing customer by understanding how many hosts they currently need and may need in the future. Based on that total number, the IP subnet and gateway address would change according to how many hosts the customer requested. For example, if a customer has indicated that they need ten hosts, and they only use five, the additional five that are not in use cannot be used by another customer. An illustration of this is shown below. The proposed solution to this problem is to allocate IP addresses under the same IP subnet and gateway address uti

Access Lists and Capabilities

To implement an access matrix, we must first understand what it is. An access matrix is a protection model within an operating system consisting of objects and domains. The access matrix determines which processes interact with objects within the domain. Objects within the domain can consist of both hardware and software. The lists below show the advantages and disadvantages of access lists associated with objects, and capabilities with domains.  Access lists associated with objects Advantages  Corresponds directly to the user’s needs.  Easy revocation and review of access.  Disadvantages  Difficult to determine access rights for a domain.  Takes time to search the domain for access rights.  Capabilities with domains Advantages  Useful for localizing information for a process.  Secured against unauthorized access.  Disadvantages  Inefficient at the revocation of capabilities.  Does not correspond directly to the user’s needs.  Even though each implementation has its own strengths and w