HomeWork 各類cs作業

QEMU: Adding a System Call

<标题>Assignment 3 CMPT-300

<标题>QEMU: Adding a System Call

<标题>Disclaimer: This assignment is adapted from a project developed by Dr. Jason Nieh at

<标题>Columbia University.

Part A:

<标题>Setup Your Linux Kernel Building Environment and add dummy

syscall(25%):

The first step is to learn how to create a virtual machine using QEMU and install a

custom kernel.

Please follow this tutorial:

<标题>http://www.sfu.ca/~rws1/cmpt-300/assignments/a3-qemu-tut.pdf

All files can be downloaded from:

http://www.sfu.ca/~rws1/cmpt-300/assignments/cmpt300-a3.zip

Part B:

<标题>Adding an advanced system call(75%):

Write a new system call in Linux. The system call you write should take one argument

(pointer to a data structure) and return various information for the process identified by

the pid in the data structure. All return information will be put into the data structure. For

<标题>the following discussion all relative paths refer to the top of your kernel source

directory linux-2.6.26.5

The prototype for your system call will be:

int prinfo(struc

CSCE614 solution supersalar

CSCE614 Computer Architecture (Spring 2015)

Homework #4 (Pseudo-Associative Cache)

<标题>(Due: Beginning of class on 4/17/2015)

Objective

<标题>This project is to help you understand how pseudo-associative (column-associative) cache works. You

<标题>will initially analyze the sensitivity of L1 caches to changes in parameters. Then you are to implement L1

data cache as pseudo-associative in SimpleScalar and compare its performance to the normal direct-
mapped L1 data cache.

<标题>System Requirement

Linux operating system is needed in order to use the pre-compiled little-endian Alpha ISA SPEC2000

binaries. Do not use Cygwin. If you don’t have any linux machine, please use linux.cs.tamu.edu with your

<标题>CS account. If you don’t have CS account, contact HelpDesk located in the first floor.

Setting up the environment and installing SimpleScalar

1. Download and Install SimpleScalar 3.0.

(1) Download simplesim-3v0e.tgz from http://www.simplescalar.com/.

(2) Untar the downloaded file.

$ tar xzvf simplesim-3v0e.tgz

<标题>(3) Read the

syr cis341 緩存區溢出漏洞利用實現

這個作業很刺激。。。

<标题>syr cis341 solution

Project 2: Buffer Overflow

1. Objective

<标题>Buffer overflows have been the most common form of security vulnerability in the

last ten years. Moreover, buffer overflow vulnerabilities dominate in the area of

remote network penetration vulnerabilities, where an anonymous Internet user seeks

<标题>to gain partial or total control of a host. These kinds of attacks enable anyone to take

<标题>total control of a host and thus represent one of the most serious security threats. [1]

<标题>Definition of buffer overflow from Wikipedia [2]: A buffer overflow, or buffer

<标题>overrun, is an anomaly where a program, while writing data to a buffer, overruns the

buffer’s boundary and overwrites adjacent memory. This is a special case of violation

of memory safety.

The goal of this lab is to get intimately familiar with the layout and use of data section,

<标题>code section and, particularly, call stacks, as well as MIPS machine language,

assembly and disassembly, debugging, and reverse engineering. As a side ben

C++ code optimiaztion via gprof and gcov

CS作業代寫

<标题>Due date: April 2, in class

Read about the linpack benchmark at

http://www.netlib.org/utk/people/JackDongarra/faq-linpack.html

Download the (slightly modified) file linpack.c from

http://www.cas.mcmaster.ca/~nedialk/COURSES/3f03/private/linpack.c

<标题>When running this benchmark on a 2.66GHz Dual-Core Intel Xeon, I obtain this table (MFLOPS

is million floating-point operations per second):

<标题>n max MFLOPS compiler flags

100 329.813 gcc

1000 410.306

<标题>330.914 -O0

931.276 -O1

930.425 -O2

1276.764 -O3

408.111 -O0

<标题>1208.931 -O1

<标题>1220.399 -O2

1619.045 -O3

Problem 1 (6 points) Study the compile options of the gcc compiler, and in particular the

optimization flags, and the flags that are related to SSE instructions.

Produce the same table for each of penguin, mills, and your own computer. Keep the same

flags as above, but you can also add other flags. Try to obtain as high count as you can. Submit

the three tables and a discussion on your results.

Note. You can obtain information about your system

unmanned lawn mowers c程序代寫

代寫c程序 二維數組 指針 內存申請與釋放

<标题>dfs recrusive 遍歷所有路徑

// ~ Overview ~ //

This exercise will familiarize you with 2-dimensional arrays and
<标题> some more file operations.

// ~ Learning Goals ~ //

(1) To learn to perform file operations
(2) To learn to create and manipulate 2-dimensional arrays using
malloc and free function.
(3) To apply recursion to solve a maze traversal problem
// ~ Submitting Your Assignment ~ //

You must submit one zip file to blackboard. This zip file must
contain:

(1) pa_answer02.c
(2) pa02.c

You create the zip file using the following command.

> zip pa02.zip pa_answer02.c pa02.c

<标题>// ~ Overview ~ //

This exercise will give you more practice with file operations,
<标题> memory allocation, and recursion.

You own a business that performs mowing using unmanned lawn mowers
(ULM). Suppose you have just agreed to a contract to provide mowing
service to a corn maze operator. Based on a pre-processed satellite
images of corn maze, where the walls of the corn maze are stored as ‘X’ and
<标题> the paths are store

COMP 2691: Assignment #4 solution

計算機體系架構作業代做

COMP 2691: Assignment #4

!!! Note About Code !!!

<标题>Points will be deducted for any line of assembly code that does not have an explanatory comment at the end of it.

Please create a single PDF document containing the answers for the following questions. This file should be called hw04.pdf.

Question 1

Question 1.1: For (a) and (b) above, what is the clock cycle time in a pipelined and non-pipelined processor? [5 points each]

Question 1.2: For (a) and (b) above, what is the total latency of a lw i