C Programming task,
Instruction:
https://cs162.org/static/proj/proj-filesys/docs/ta…
The starter is attached.
Category: C Programming
What is a C Programming Language? Different types of C programming language ques
What is a C Programming Language?
Different types of C programming language questions ❓ Arrays, Functions, Pointer, Contents
What is a C Programming Language? Different types of C programming language ques
What is a C Programming Language?
Different types of C programming language questions ❓ Arrays, Functions, Pointer, Contents
Write a program in C and in MIPS assembly language program that: Initializes an
Write a program in C and in MIPS assembly language program that:
Initializes an integer array with 3 rows and 5 columns: 1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
inputs a row and column number from the user
main must call a child function (using jal in MIPS assembly) that calculates the memory address of the chosen row & column like this:int* arrayAddress( int row, int col, int ncolumns, array); //returns address of array[row][col]
use shift instead of multiply where appropriate
print the address and the value of the chosen array element
You must submit THREE files: 1) Your .asm MIPS assembly file – it MUST be in the style / format of the prompt and MIPS .asm example filesLinks to an external site.(labels: start in first column, tab to instruction mnemonics, tab to operands, tab to comment, etc.) The arguments passed from your main program should be row in $a0, col in $a1, ncolumns in $a2, and base address of the array in $a3 and the address return value should be in $v0 when the arrayAddress() child function returns.
2) Your .c source file accessing the array by calling the child function arrayAddress( int row, int col, int ncolumns, array) which uses pointer arithmetic to return the address of array[row][col].
3) A brief report document file in .pdf .doc or .docx including:
a description of the program
2 screen shots showing each one (C and MIPS version) working
the .c and .asm source code MUST be pasted into the end of the document
You need to create a simple 2d game in the provided provided by me. Create a dif
You need to create a simple 2d game in the provided provided by me. Create a different class for each object.
Requirements: no needed
For this assignment, you must write an academic paper that examines the legal an
For this assignment, you must write an academic paper that examines the legal and ethical implications related to cybersecurity for your selected organization.
Your academic paper should provide the senior managers and leaders of your selected organization with the following current legal issues relating to cybersecurity:
Two recent important laws relating to cybersecurity.
Description of one important foreign law that has relevance within the United States.
Information about the implications of the laws you presented.
Review of ethical issues with specific relevance to cybersecurity and appropriate for your specific organization.
Relevance of policies, controls, and audits to cybersecurity.
Length: 5 to 7-page academic paper
References: Include sources within the course, plus a minimum of 2 additional scholarly resources.
This task should be completed with the Advanced programming level expert…. Thi
This task should be completed with the Advanced programming level expert….
This task should be completed with the original code/solutions. Please make sure you do not use any open source solutions.
Link to OVA file https://www.transfernow.net/dl/20231203Co245V4n
Link to video instructions: https://we.tl/t-fLSz2nPMDX
This task should be completed with the Advanced programming level expert…. Thi
This task should be completed with the Advanced programming level expert….
This task should be completed with the original code/solutions. Please make sure you do not use any open source solutions.
Link to OVA file https://www.transfernow.net/dl/20231203Co245V4n
Link to video instructions: https://we.tl/t-fLSz2nPMDX
This task should be completed with the Advanced programming level expert…. Thi
This task should be completed with the Advanced programming level expert….
This task should be completed with the original code/solutions. Please make sure you do not use any open source solutions.
Link to OVA file https://www.transfernow.net/dl/20231203Co245V4n
Link to video instructions: https://we.tl/t-fLSz2nPMDX
1. Write a C program using MPI to implement parallel odd-even sort for the given
1. Write a C program using MPI to implement parallel odd-even sort for the given total
values of elements and cores.
Your code will support 2m elements to sort, that is, the number of elements to sort is even.
The number of cores p will be chosen such that 2m/p is even. That is, each core will have an
even number of elements (this ensures that phase 1 requires no inter-process communication).
The total number of cores p won’t necessarily be even, but you are guaranteed that 2m/p is
even.
Each core will be assigned 2m/p elements. You can either use one large array (of size 2m) that
each core will have a copy of, or define arrays of size 2m/p for each core.
In phase 1, each core will do a compare-exchange on elements that are assigned to it. For
example if there are 4 elements per core (stored in an array A), then core 0 will compareexchange A[0] and A[1], then A[2] and A[3] and so on for the other cores.
In phase 2, each core will do a compare-exchange on the its own elements but also a compareexchange between the next core. For example if there are 4 elements per core (stored in array
A) then core 0 will compare-exchange A[1] and A[2], then A[3] and A[4]. Note that A[4] is
assigned to core 1 in this case. If there are 12 elements in total and 3 cores, then in phase 2:
core 0 will compare-exchange its A[3] with core 1’s A[4], core 1 will compare-exchange A[7]
with A[8] in core 2. You need to generalize this for the scenario where there is an even number
of elements and each core has an even number of elements assigned to it.
Make sure you start with unsorted arrays.
After m rounds of phase 1 and phase 2 i.e. 2m phases in total, the elements should be sorted.
After this is complete, have each core send their current values to core 0 (in order), and have
core 0 print the values in sorted order (see Hello2.c example in slides). Use a for loop to receive
values from each core and print as you receive them, this ensures they will be printed in order
of rank.
Note: if ntasks >=20 then make sure tasks per node is fixed at 20 in your script when you
experiment.
2. Bonus (2 points). Generalize your code in part 1 to take into account an odd number of
elements, and possibly an odd number of elements per core.
3. Bonus (2 points). Generalize your code from part 2 to take into account when the
number of elements is not divisible by the number of cores i.e. there may be a
remainder. For example your code should handle when there are 15 elements and 4
cores.