100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary Computer Science CSC2002S | Notes covering the entire course

Rating
-
Sold
2
Pages
237
Uploaded on
08-01-2024
Written in
2023/2024

These notes cover all content covered in the course - 1. Parallel + concurrent computing. 2. Architecture. 3. Mobile design and development. These notes are in Word format to allow you to edit and add content that may be added. These notes allowed me to achieve above 70% in both theory tests and a final mark of 75%.

Show more Read less











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
January 8, 2024
Number of pages
237
Written in
2023/2024
Type
Summary

Content preview

CSC2002S Notes




1. Parallel and Concurrent Programming ................................................................................. 2
2. Architecture ................................................................................................................................. 84
3. Mobile Development and Design ...................................................................................... 181

,1. Parallel and Concurrent Programming

Parallelism versus Concurrency

Parallel program:
• Use extra computational resources to solve a problem faster (increasing
throughput via simultaneous execution).




Parallel algorithm example:
• May get roughly 4x speedup – array sum




Concurrent program:
• Correctly and efficiently manage access to shared resources (from multiple
possibly-simultaneous clients).
• Uses synchronization to prevent multiple operations from interleaving in a
way that leads to incorrect results

,Concurrency algorithm example:
• Prevent bad interleaving (correctness).
• But allow some concurrent access (performance).




Checkpoint
Your Java web server needs to keep track of the number of accesses to particular
web pages. As defined in this course, this is a:

A. parallel programming problem
B. concurrent programming problem
C. Both A and B
D. neither A nor B

→C

Concurrency Problems – Race Conditions

• A race condition is an error in a program where the output and/or result of
the process is unexpectedly and critically dependent on the relative sequence
or timing of other events.
• The idea is that the events race each other to influence the output first.

NOTE: Unintended race conditions are incredibly common in concurrent programs.

Example:
Therac-25, a radiation therapy machine for cancer treatment used software safety
systems that had a race condition between operator text input and software
configuring the electron beam. Caused by users hitting the up arrow too quickly,
preventing the system from properly registering their edits.

→ Resulted in an occasional 100X radiation dose, that lead to several deaths.

, Nondeterminism

In sequential programs, instructions are executed in a fixed order determined by the
program and its input. The execution of one procedure does not overlap in time with
another.
→ Deterministic

In concurrent programs, computational activities may overlap in time and the
subprogram executions describing these activities proceed concurrently.
→ Non-deterministic

NOTE: It is not possible to tell, by looking at the program, what will happen when it
executes.

Parallel/Concurrent Complexity

Managing parallel complexity and the principles and techniques necessary for the
construction of well-behaved and efficient parallel and concurrent programs.

NOTE: General rule is to stay sequential if possible.

When parallel programming is necessary

High Performance Computing (HPC):
• Uses cutting-edge parallel computers to solve “grand-challenge” problems.
• Programmers write programs to solve such computationally large problems
that it would take years, or centuries, for one computer to finish it.

NOTE: Parallel programming is essential to use the computing power of multicore
architectures → Most current desktop and laptop computers have multiple cores.

When concurrent programming is necessary

Complex programs like:
• Operating systems, web browsers, real-time systems, event-based
implementations of graphical user interfaces, multiuser games, chats and
ecommerce.
• Handle multiple things happening at once and therefore are multithreaded.
• Many concurrent threads run simultaneously.
R75,00
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
joshbirkholtz

Document also available in package deal

Thumbnail
Package deal
BCom Computer Science + Information Systems | 2nd Semester
-
4 2024
R 225,00 More info

Get to know the seller

Seller avatar
joshbirkholtz University of Cape Town
View profile
Follow You need to be logged in order to follow users or courses
Sold
6
Member since
3 year
Number of followers
0
Documents
4
Last sold
2 months ago

0,0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions