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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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