Find Jobs
Hire Freelancers

Data Structure in C prog. ..operating systems typically set aside a portion of the computer&'s RAM to cache recently read files. While the amount of RAM is much smaller than size of a disk drive, if many files are accessed repeatedly, a good hit rate can

$30-75 USD

Ukończony
Opublikowano około 20 lat temu

$30-75 USD

Płatne przy odbiorze
1 Introduction Reading files from disk is a costly operation - usually at least 10ms of time. In constrast, reading data from memory is much cheaper - usually less than a microsecond. Accordingly, operating systems typically set aside a portion of the computer’s RAM to cache recently read files. While the amount of RAM is much smaller than size of a disk drive, if many files are accessed repeatedly, a good hit rate can be achieved. For this project, you will be creating a Cache data type to store the contents of recently read files. 2 The Cache data structure A Cache is a dictionary-like data structure that never keeps more than a certain amount of data. Your Cache will support the following interface: typedef void* Cache; typedef void* DataC; Cache makeCache( int maxTotalCost , void* (*copyDataC )(DataC to, DataC from) , int (*compareDataC )(DataC d1, DataC d2) , void (*freeDataC )(DataC freeMe) ); void freeCache( Cache c ); boolean insertCache( Cache c, DataC d, int cost ); boolean accessCache( Cache c, DataC d ); void setMaxTotalCost( Cache c, int newMaxCost ); int getMaxTotalCost( Cache c ); int getNumItems ( Cache c ); int getTotalCost( Cache c ); Figure 1: Cache.h When a Cache is constructed, it is given a maximum total cost. Each data item that is inserted has a corresponding cost. At any point in time, the sum of the costs of the data items shall never exceed the maximum. If a new item is inserted that would raise the total cost beyond the maximum, the Cache will automatically remove the least recently used (LRU) items, one at a time, until the current total cost is small enough for the new item’s cost to be added. To do this, the Cache will internally keep a sorted list of data items: the least recently used item will be at the tail of the list; the most recently used item will be at the head. Whenever an item is inserted or accessed, it will be moved to the head of this list. That way, items that are not used will eventually wind up at the end of the list..... the complete version of the prog is in the attachment ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement) ## Platform The due date is 2nd of March 2004 The project must be written in C and C programming only. It must be well documented. must include users' manual, programmer logic file and the dot c file. Every detail of the specification should be followed. The operating system or environment the program will run on Unix
Identyfikator projektu: 3110394

Informację o projekcie

4 ofert
Zdalny projekt
Aktywny 20 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
Przyznano:
Awatar Użytkownika
See private message.
$54,99 USD w 8 dni
5,0 (160 opinii)
6,0
6,0
4 freelancerzy składają oferty o średniej wysokości $49 USD dla tej pracy
Awatar Użytkownika
See private message.
$59,50 USD w 8 dni
4,9 (62 opinii)
5,4
5,4
Awatar Użytkownika
See private message.
$46,75 USD w 8 dni
4,9 (25 opinii)
4,0
4,0
Awatar Użytkownika
See private message.
$34 USD w 8 dni
0,0 (0 opinii)
0,0
0,0

O kliencie

Flaga UNITED STATES
United States
4,9
3
Członek od lut 4, 2004

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.