Find Jobs
Hire Freelancers

C Programming —Cache Memory - 05/03/2017 20:46 EST

$10-30 USD

Cancelado
Publicado há aproximadamente 7 anos

$10-30 USD

Pago na entrega
Objective: To simulate reading and writing to a custom-sized direct-mapped cache, involving a custom-sized main memory. Inputs: The total size of accessible main memory (in words) The total size of the cache (in words) The block size (words/block) A signal to read (0) or write (1) to the cache The main memory address to read from/write to The contents of the address for writing to the cache Outputs: The corresponding cache tag, block, and word for a main memory address The contents of the address resulting from reading/writing to the cache A message indicating either a hit or a miss to the cache Specification: The program simulates reading from and writing to a cache based on choosing from a menu of choices, where each choice calls the appropriate procedure, where the choices are: 1) Enter parameters 2) Access cache for reading/writing and transfer data {this will lead to another prompt for input as below} Enter 0 for read or 1 for write. 3) Quit program Notes: * Use a structure (struct) to represent a cache line consisting of a tag (integer) and a block (integer pointer). Define the cache to be a pointer to the struct. * Upon entering the parameters, the main memory and cache are to be dynamically allocated based on their respective total sizes. Each word i of main memory is initialized with the value M–i, where M is the size of main memory in words. *Reading/writing from/to a new block in the cache results in dynamically allocating the block based on the block size. What I require: softcopy of source code Bash-4.1$ ./asmt2 Output: Output: Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 1 Enter main memory size (words): 65536 Enter cache size (words): 1024 Enter block size (words/block): 16 Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 1 Enter main memory address to write to: 65535 Enter value to write: 14 Write miss! ----------------------------------------------------- | Tag: 63 | Block: 63 | Word: 15 (14) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 0 Enter main memory address to read from: 65535 Read hit! ----------------------------------------------------- | Tag: 63 | Block: 63 | Word: 15 (14) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 1 Enter main memory address to write to: 65534 Enter value to write: 512 Write hit! ----------------------------------------------------- | Tag: 63 | Block: 63 | Word: 14 (512) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 0 Enter main memory address to read from: 1023 Read miss! ----------------------------------------------------- | Tag: 0 | Block: 63 | Word: 15 (64513) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 3
ID do Projeto: 13304332

Sobre o projeto

5 propostas
Projeto remoto
Ativo há 7 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
5 freelancers estão ofertando em média $73 USD for esse trabalho
Avatar do Usuário
hi i have a lot of experience programming in c. i can easily complete this project for you. we can have a chat. thanks
$35 USD em 1 dia
4,8 (260 avaliações)
6,8
6,8
Avatar do Usuário
Hello. How are you. I have read and understood the project. I have strong knowledge in Data structures and Algorithms. And I'm expert in Java ,C/C++, Python ,PHP etc. I'm interested this project. So, firstly I want to discuss with you about this project. Then I'll be happy. I wait for your good reply. Thanks.
$60 USD em 1 dia
4,9 (139 avaliações)
6,2
6,2
Avatar do Usuário
Hi there, i am senior android and web developer, have experience with client server apps and mobile apps custom UI. Why would you hire me? -I will not waste your or my time! I know very well about the value of time and reputation. I will say YES to your projects only when I will be absolutely sure about meeting your requirements 100%. -I am an organized person and a fast worker. I maintain schedules and I always meet your deadlines. Many of my clients have said that I am the fastest provider they have worked with. -I have worked on a lot of projects and my feedback score is good. Thank you
$25 USD em 1 dia
5,0 (2 avaliações)
1,8
1,8

Sobre o cliente

Bandeira do(a) UNITED STATES
northridge, United States
4,6
3
Método de pagamento verificado
Membro desde nov. 6, 2015

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.