Programming Homework Help

Programming Homework Help. CSCI 3120 Dalhousie University Add Functions to Original Code C Programming Task

 

Extend your program from Assignment 3 (or the provided solution) to make the main thread of your miner
spawn a reader thread that is responsible for reading all the input. The reader thread should then insert
the input into a queue (buffer). The main thread will be responsible for dequeuing the input and processing it, just like in Assignment 3. This is essentially the Unbounded Buffer Producer-Consumer problem
where the reader thread is the producer, and the main thread is the consumer. Your program must be
compiled to an executable called miner. The program will read in five events, which are the same as in
Assignment 3. Please see the Problem Statementsin Assignment 1, 2 and 3 for a description of the events.
The reader thread should consist of a loop that reads events from stdin and enqueues them onto an
unbounded queue. The queue can never fill up, so a linked-list implementation is recommended.
The main thread will use the same main loop as in Assignment 3, except that instead of reading from stdin
it should dequeue events from the queue fed by the reader thread and process the events. Please note
that if the queue is empty, the main thread should block until more events are added by the readerthread.

Programming Homework Help

Programming Homework Help

Programming Homework Help. University of Amsterdam Wk 2 C Programming Computer Coding Task

 

Better see the pdf below.

here only post the first question.

Input: The first line contains the integers n and m, separated by a space. n is the total
number of assignments in the collection, and m is the number of assignments you must
output. The next n lines each contain two integers separated by a space, representing the
identifier and difficulty level of an assignment. Both the identifier and difficulty level are
unique.
Output: m lines, each containing an assignment of top difficulty levels – the identifier and
difficulty level of the assignment. The assignments should be sorted by difficulty level, from
highest to lowest.

Programming Homework Help

Programming Homework Help

Programming Homework Help. Implement a Scoreboard Simulator Small Program

 

Project Specification

undefined

In this project, you will work in groups of 1-2 students to implement a Scoreboard simulator.

The maximum students per group will be 2.

undefined

Deliverables:

undefined

You can use one of the following languages to implement the program:

  • C
  • C++
  • Python
  • Java
  • Verilog
  • VHDL


You will also need to:

  • Write clean code
  • Make sure your code is readable even for someone not versed in the particular language
  • Comment your code where necessary (too much commenting of code sometimes makes it hard to read)
  • Submit a user manual for your code detailing how to run it; step by step instructions as well as what OS to use and how to compile the source code.
    • Your instructor has access to the following OS:
      • a Mac OS Catalina (unix) platform
      • a Linux via linux.gl.umbc.edu
      • Windows 10
    • I would suggest you test your code on one of these platforms to ensure it runs as you expect.
  • Make sure that it is possible to run your code without needing to purchase any additional software. (I count Trials as a purchase)

undefined

You will need to submit a zip file named lastname_firstname_project.zip and containing:

undefined

  • An executable of your simulator if the language you used requires one.
  • The program files and source code.
  • A text file (README) detailing how to run your simulator and recompile it if needed.
  • Only one submission per group. You will need to make sure all your names are shown in the README as well as in the program code.

undefined

Your program should take as an input a text file with MIPS code (see Instructions section), and output a table similar to one used in class showing:

  • When each instruction completed each stage
  • The values in all the registers at the end of execution
  • See input and output sections for further details

undefined

Due Date:

May 9th 2021 at 11.59pm

undefined

Grading:

undefined

The code and program will be graded according to the following:

undefined

10% -if the program works. It does not have to be perfect for you to get this credit

undefined

50%- Implementation

  • How close is your simulator to mimicking a true scoreboard
  • How well does it meet the specifications in this document
  • Do values in the register match what is expected
  • How does it handle corner cases

undefined

40%-Well written code:

  • use of good variable names
  • code is easy to follow an understand and is well organized
  • Good instructions on how to run/compile your code

undefined

Late submissions will incur a 10 point deduction for every 6 hours they are late.

undefined

This project follows the UMBC Academic Integrity Policy and any work submitted must be your own. In addition to that policy, Collaboration between teams should only involve discussion of ideas but no sharing of code.

Any work copied from online resources MUST be cited.

Processor Configuration:

undefined

The algorithm will model a processor with the following configuration:

  • Pipelined FP adder/s for FP adds and subtracts -2cycles
  • Pipelined FP multiplier/s for FP multiplies -10cycles
  • Pipelined FP divider/s for FP divides -40cycles
  • Integer Unit/s for Loads, Stores, Integer Adds and Subtracts -1cycle
  • Your program should ask the user for how many units there are for each functional units, that is, how many adders, how many multipliers, how many dividers and how many integer units.

32 FP registers and 32 integer registers.

  • All registers will be initialized to 0 at the beginning.

Memory:

undefined

You can initialize your data memory to the following values:

undefined

Memory Location

Value in Memory

0

45

1

12

2

0

3

0

4

10

5

135

6

254

7

127

8

18

9

4

10

55

11

8

12

2

13

98

14

13

15

5

16

233

17

158

18

167

undefined

The memory location will be the index of the value and we will use that index as the actual address for loads and stores.

For simplicity the value at the memory location is what gets loaded into a register and if the memory location is offset then it loads whatever value is at that offset.

Example:

LD F2, 0(17) would load 158 into register F2

LD F2, 1(17) would load 167 into register F2

Instructions:

undefined

You can program your algorithm for the following instructions:

undefined

Memory Instructions:

L.D Fa, Offset(addr)

Load a floating point value into Fa

S.D Fa, Offset(addr)

Store a floating point value from Fa

LI $d, IMM64 -Integer Immediate Load

Load a 64 bit Integer Immediate into $d

LW $d, Offset(addr)

Load an integer value into $d

SW $s, Offset(addr)

Store an integer from $s

ALU Instructions:

ADD $d, $s, $t – Integer add

$d = $s + $t

ADDI $d, $s, immediate – Integer Add with Immediate

$d = $s + immediate

ADD.D Fd, Fs, Ft – Floating Point Add

Fd = Fs + Ft

SUB.D Fd, Fs, Ft – Floating Point Subtract

Fd = Fs – Ft

SUB $d, $s, $t -Integer Subtract

$d = $s – $t

*MUL.D Fd, Fs, Ft -Floating Point Multiply

Fd = Fs X Ft

DIV.D Fd, Fs, Ft – Floating Point Divide

Fd = Fs ÷ Ft

*You can assume that Fd is big enough to hold the value of the result.

$s/$d are integer registers and Fa/Fd are floating point registers

undefined

Inputs

Your program should take the following inputs (how it takes them is up to you):

  1. The number of units per functional unit
  2. Text file with a program written using MIPS instructions outlined above
  • You do not have to account for MIPS instructions not outlined in this document

undefined

Outputs

Programming Homework Help

Programming Homework Help

Programming Homework Help. Java 2 Programming and Auto Complete Task

 

I’m working on a java question and need guidance to help me understand better.

Is about autocomplete, 3 small classes need to be done 

Class 1

public class Term implements Comparable<Term> { /**
    * Initialize a term with the given query and weight.
    * This method throws a NullPointerException if query is null,
    * and an IllegalArgumentException if weight is negative.
    */
public Term(String query, long weight) { } /**
    * Compares the two terms in descending order of weight.
    */
public static Comparator<Term> byDescendingWeightOrder() { } /**
    * Compares the two terms in ascending lexicographic order of query,
    * but using only the first length characters of query. This method
    * throws an IllegalArgumentException if length is less than or equal
    * to zero.
    */
public static Comparator<Term> byPrefixOrder(int length) { } /**
    * Compares this term with the other term in ascending lexicographic order
    * of query.
    */
@Override public int compareTo(Term other) { } /**
    * Returns a string representation of this term in the following format:
    * query followed by a tab followed by weight
    */
@Override public String toString(){ } } 

Class 2

public class BinarySearch { /**
    * Returns the index of the first key in a[] that equals the search key,
    * or -1 if no such key exists. This method throws a NullPointerException
    * if any parameter is null.
    */
public static <Key> int firstIndexOf(Key[] a, Key key, Comparator<Key> comparator) { } /**
    * Returns the index of the last key in a[] that equals the search key,
    * or -1 if no such key exists. This method throws a NullPointerException
    * if any parameter is null.
    */
public static <Key> int lastIndexOf(Key[] a, Key key, Comparator<Key> comparator) { } 

Class 3

public class Autocomplete { /**
* Initializes a data structure from the given array of terms.
* This method throws a NullPointerException if terms is null.
*/
public Autocomplete(Term[] terms) { } /**
* Returns all terms that start with the given prefix, in descending order of weight.
* This method throws a NullPointerException if prefix is null.
*/
public Term[] allMatches(String prefix) { } } 

Programming Homework Help

Programming Homework Help

Programming Homework Help. Create a Program Code C Programming Task

 

Background

1. Dynamic memory allocation

In this assignment, you will use malloc function to allocate dynamic function.

void * malloc(size_t size) allocates the requested memory, and returns a pointer to it, or returns NULL if the allocation fails.

You should always deallocate the memory with the void free(void *ptr) function when you are done using the memory.

  • For example, int * arr = (int *) malloc(10 * sizeof(int)); allocates the memory for 10 integers, and free(arr) releases the allocated memory.

You will use the valgrind tool to debug memory, and detect memory leak. Check this page for the various types of errors that you may have.

  • For example, to use a valgrind to check a program hw4 for memory errors with input file filename, run the following command:

> valgrind --tool=memcheck --leak-check=full ./hw4 filename

2. QSort

QSort is a generic function in C for sorting arrays. In this assignment, you will not need to implement the qsort function. Instead, you will need to read the qsort function and understand how to use this qsort function. The QSort algorithm is based on recusion. You will learn the algorithm later when we discuss recussion in class.

What do you need to do?

You need to complete the following functions:

  • int main(int argc, char * * argv) in main.c, this file contains your main function, which gets the names of the input and output files from the command line (argv[1] and argv[2]), allocate memory, and calls qsort.
  • int countInt(char* filename) in hw4.c
  • bool readInt(char* filename, int * intArr, int size) in hw4.c
  • bool writeInt(char* filename, int * intArr, int size) in hw4.c
  • int compareInt(const void *p1, const void *p2) in hw4.c

Programming Homework Help

Programming Homework Help

Programming Homework Help. California University of Management Text Mining Healthcare Discussion

 

Use 3 resources for each discussion. Include at least 2-3 quotes from your sources enclosed in quotation marks and cited in-line by reference to your reference list for each discussion. Example: “words you copied” (citation) These quotes should be one full sentence not altered or paraphrased. Cite your sources using APA format. Use the quotes in your paragraphs. Write in essay format, not in bulleted, numbered, or other list formats.

No plagiarism or spinbot, please.

Discussion 01: Write at least 500 words discussing how to use text mining to analyze how we can use text mining to improve healthcare.

Discussion 02: Write at least 500 words discussing how Cambridge Analytica used text mining to analyze to affect the 2016 US presidential election.

Discussion 03: Write at least 500 words discussing how risk management in the financial industry could be aided by text mining.

Discussion 04: Write at least 500 words discussing how text mining and anti-crime applications are making internet crime prevention easier.

Programming Homework Help

Programming Homework Help

Programming Homework Help. California University Multi Threading and Parallel Processing Report

 

Use 3 resources for each discussion. Include at least 2-3 quotes from your sources enclosed in quotation marks and cited in-line by reference to your reference list for each discussion. Example: “words you copied” (citation) These quotes should be one full sentence not altered or paraphrased. Cite your sources using APA format. Use the quotes in your paragraphs. Write in essay format, not in bulleted, numbered, or other list formats.

No plagiarism or spinbot, please.

Discussion 01: Write at least 500 words discussing limitations and issues related to the use ff and ffbase packages for processing large datasets.

Discussion 02: Write at least 500 words explaining logistic regression and how it is used in the chronic kidney disease data set.

Discussion 03: Write at least 500 words discussing how the ff and ffbase packages enable users to process large datasets with R.

Discussion 04: Write at least 500 words comparing and contrasting multi-threading and parallel processing. Let me know if you have any questions. Thank you!

Programming Homework Help

Programming Homework Help

Programming Homework Help. Arkansas Baptist College Age of Patien and Maximum Heart Rate Questionnaire

 

I’m studying and need help with a Programming question to help me learn.

1. What is the relationship between `age of patient` (i.e., `age`) and `maximum heart rate` (i.e., `thalach`)?

1. What is the relationship between `serum choloesterol in mg/dl` (i.e, `chol`) and `maximun heart rate achieved` (i.e., `thalach`) by whether `exercise induced angina` (i.e., `exang`)?

1. What is the distribution of patients’  `maximum heart rate` (i.e., `thalach`) across `exercised induced angina` (i.e., `exang`)?and here are codes :for question one :

heart_disease_data %>%

 ggplot(aes(x=age,

            y=thalach )) +

 geom_point()

for question two:

heart_disease_data %>%

 ggplot(aes(x=chol,

            y=thalach,

            color= exang)) +

 geom_point() 

for question three:  

heart_disease_data %>%

 ggplot(aes(x=thalach,

            fill= exang)) +

 geom_bar() 

and you can download data csv from this https://www.kaggle.com/kingabzpro/heart-disease-pa…

Programming Homework Help