CS3103 - Operating Systems Assignment

Assignment Help Operating System
Reference no: EM132411820

CS3103 - Operating Systems Assignment - City University of Hong Kong, Hong Kong

Project - Parallel Zip

I. Project Instructions

Overview - In the earlier programming assignment, you implemented a simple compression tool based on run-length encoding, known simply as czip. For this project, you'll implement something similar, except you'll use threads to make a parallel version of zip. We'll call this version pzip.

There are three specific objectives to this project:

- To familiarize yourself with the Linux pthreads package for threading.

- To learn how to parallelize a program.

- To learn how to program for performance.

II. Project Description

For this project, you will implement a parallel version of zip using threads. First, recall how zip works by reading the description in Assignment 1 (Part II). You'll use the same basic specification, with run-length encoding as the basic technique.

Your pzip will externally look the same as czip. However, internally, the program will use POSIX threads to parallelize the compression process. The general usage from the command line will be as follows:

$ ./pzip file.txt > file.z

Doing so effectively and with high performance will require you to address (at least) the following issues:

How to parallelize the compression. The central challenge of this project is to parallelize the compression process. Think about what can be done in parallel, and what must be done serially by a single thread, and design your parallel zip as appropriate. For example, does it possible to zip several small files using multiple threads instead of a large file using only one thread (czip)? If it's possible, how to divide the large file and merge the zip result of several small files? One interesting issue that the "best" implementations will handle is this: what happens if one thread runs more slowly than another? Does the compression give more work to faster threads? This issue is often referred to as the straggler problem.

How to determine how many threads to create. On Linux, this means using interfaces like get_nprocs() and get_nprocs_conf(); read the man pages for more details. Then, create an appropriate number of threads to match the number of CPUs available on whichever system your program is running.

How to efficiently perform each piece of work. While parallelization will yield speed up, each thread's efficiency in performing the compression is also of critical importance. Thus, making the core compression loop as CPU efficient as possible is needed for high performance.

How to access the input file efficiently. On Linux, there are many ways to read from a file, including C standard library calls like fread() and raw system calls like read(). One particularly efficient way is to use memory-mapped files, available via mmap(). By mapping the input file into the address space, you can then access bytes of the input file via pointers and do so quite efficiently.

To understand how to make tackle these problems, you should first understand the basics of thread creation, and perhaps locking and signaling via mutex locks and condition variables. Review the tutorials and read the following chapters from OSTEP book carefully in order to prepare yourself for this project.

- Intro to Threads

- Threads API

- Locks

- Using Locks

- Condition Variables.

Attachment:- Operating Systems Assignment File.rar

Reference no: EM132411820

Questions Cloud

Identify additional concepts of nursing : Theories are derived from conceptual models and are comprised of concepts and propositions. The only concepts that are common to all nursing theories.
Creating a movie recommendation system : For this project, you will be creating a movie recommendation system using the MovieLens dataset. Use a publicly available dataset to solve the problem
Identify and articulate concepts relevant to your practice : This will help you identify your own values and beliefs about the established metaparadigms and metatheories of the discipline. It will also help you identify.
Discuss two areas of difficulty you encountered : Discuss two areas of difficulty you encountered or two new nursing interventions you learned this week at your clinical site. I'm doing my rotations.
CS3103 - Operating Systems Assignment : CS3103 - Operating Systems Assignment Help and Solution, City University of Hong Kong, Hong Kong. Project - Parallel Zip. To learn how to parallelize a program
Analyze each phase of the project : Throughout the semester I was presenting phase by phase until I finished my project. This week's assignment is as follows: To unite all the phases in a single.
How your objective relates to the public health knowledge : Give a brief description of an objective you worked on this week. Make sure to cite at least one reference showing how your objective relates to the public.
Conduct a family-focused functional assessment : Select a family, other than your own, and seek permission from the family to conduct an interview. Utilize the interview questions complied in your interview.
With what political issues is the organization involved : With what political issues is this organization involved? How does this organization go about working within the political system? Citations should conform.

Reviews

Write a Review

Operating System Questions & Answers

  Differences between routers and switches

Assume you are currently working for Surebank, a medium financial institution. The company has approximately eighty people working in their main location where your office is located.

  A distributed file service

explain if 5 clients accessed the same file in a Distributed File Service how many copies of the file may exist on the network? List where the copies are.

  Preserve the verifiable integrity of digital evidence

Explain the process used to preserve the verifiable integrity of digital evidence. How does this ensure that data is preserved unmodified? How can an analyst show that the original evidence is modified?

  Analyze potential operating system based cyber attacks

Analyze potential operating system based cyber attacks. Characterize the bad actors that might perform operating system based cyber attacks.

  Explain mobile computing technology

Compare and contrast monitoring of patient vital signs using mobile computing technology to in-patient visits to the doctor's office or hospital.

  Question about network design

Sterling Corporation wishes you to create a network infrastructure for them. They have 5-divisions with many hundred users at each division across the US.

  How unix administrator distribute the message

I was recently working on our mainframe UNIX system, and suddenly I received a message that the server required to be rebooted on my screen.

  Explain the concept of locality of reference

1. Explain the concept of locality of reference and state its importance to memory systems.

  Solving hipaa privacy issues

Suppose if we learned anything from Katrina and Joplin, paper records are susceptible to loss en masse. Can you assume having 50,000 paper records blown for miles across Joplin and trying to recreate those records later

  Formulate the above in terms of a linear programming problem

Formulate the above in terms of a Linear Programming problem Solve this linear program graphically. Determine the quantity of each type of toaster that will maximise the maximum profit

  Explain deadlock-avoidance system

What is the difference between a safe state and an unsafe state in a deadlock-avoidance system?

  What command can write to print out the value of second

In a Bourne shell script, what command can write to print out the value of second argument from command line?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd