{"id":375,"date":"2025-01-02T20:25:18","date_gmt":"2025-01-02T20:25:18","guid":{"rendered":"https:\/\/www.sqrlab.ca\/csci4060u\/?page_id=375"},"modified":"2025-03-25T03:16:46","modified_gmt":"2025-03-25T03:16:46","slug":"labs","status":"publish","type":"page","link":"http:\/\/www.sqrlab.ca\/csci4060u\/labs\/","title":{"rendered":"Labs"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.sqrlab.ca\/csci4060u\/labs\/#lab01\">Lab 1: Introduction to OpenMP&nbsp;Programming in C<\/a><\/li>\n\n\n\n<li><a href=\"#lab02\">Lab 2: Barriers in OpenMP<\/a><\/li>\n\n\n\n<li><a href=\"#lab03\">Lab 3: Critical Regions in OpenMP<\/a><\/li>\n\n\n\n<li><a href=\"#lab04\">Lab 4: A Fibonacci Number Generator in OpenMP<\/a><\/li>\n\n\n\n<li><a href=\"#lab05\">Lab 5: Threads vs. Process Performance in C<\/a><\/li>\n\n\n\n<li><a href=\"#L6\">Lab 6: Programming with Pthreads in C<\/a><\/li>\n\n\n\n<li><a href=\"#L7\">Lab 7: Simulating a Stock Exchange with Pthreads in C<\/a><\/li>\n\n\n\n<li><a href=\"#L8\">Lab 8: Concurrency Programming Pitfalls in Java<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"lab01\">LAB 1: Introduction to OpenMP Programming in C<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to introduce you to writing, compiling and running OpenMP programs in C.<\/li>\n\n\n\n<li><em>Lab Description:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_01.pdf\">[PDF]<\/a><\/li>\n\n\n\n<li><em>Source File:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/exercises\/pi_serial.c\">[pi_serial.c]<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"lab02\">LAB 2: Barriers in OpenMP<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to explore parallelization in OpenMP using a barrier.<\/li>\n\n\n\n<li><em>Lab Description:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_02.pdf\">[PDF]<\/a><\/li>\n\n\n\n<li><em>Data&nbsp;File:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/exercises\/CSCI_4060U_Lab02_data.zip\">[CSCI_4060U_Lab02_data.zip]<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"lab03\">LAB 3: Critical Regions&nbsp;IN OPENMP<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to implement a parallel program with two queues \u2013 one storing latitudes and one storing longitudes in decimal degrees. You should manage reads\/writes to each queue using independent critical regions.<\/li>\n\n\n\n<li><em>Lab Description:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_03.pdf\">[PDF]<\/a><\/li>\n\n\n\n<li><em>Data Files:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/exercises\/latitude.csv\">[latitude.csv]<\/a>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/exercises\/longitude.csv\">[longitude.csv]<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"lab04\">LAB 4: A Fibonacci Number Generator in OpenMP<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to implement both a sequential and parallel Fibonacci number generator.<\/li>\n\n\n\n<li><em>Lab Description:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_04.pdf\">[PDF]<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"lab05\">Lab 5: Threads vs. Process Performance in C<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to understand the performance difference between creating processes and creating threads in C.<\/li>\n\n\n\n<li><em>Lab Description:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_05.pdf\">[PDF]<\/a><\/li>\n\n\n\n<li><em>Source Files:<\/em>&nbsp;<a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/exercises\/CSCI4060U_lab5_fork.c\">[CSCI4060U_lab5_fork.c]<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"L6\">LAB 6: Programming with Pthreads&nbsp;In C<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to create a program that simulates airline ticket agents. Your program will be written in C and use the pthread.h library (including a mutex to limit access to shared data).<\/li>\n\n\n\n<li><em>Lab Description:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_06.pdf\">[PDF]<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"L7\">Lab 7: Simulating a Stock Exchange with Pthreads in C<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to create a program that simulates a stock exchange system.<\/li>\n\n\n\n<li><em>Lab Description:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_07.pdf\">[PDF]<\/a><\/li>\n\n\n\n<li><em>Source Files:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/exercises\/CSCI4060U_lab7_start.c\">[CSCI4060U_lab7_start.c]<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"L8\">Lab 8: Concurrency Programming Pitfalls in Java<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main purpose of this lab is to learn about common concurrency programming pitfalls including starvation, deadlocks and data races. Furthermore, the lab will involve identifying concurrency programming pitfalls and addressing them in an existing Java program.<\/li>\n\n\n\n<li><em>Lab Description:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/CSCI_4060U_Lab_08.pdf\">[PDF]<\/a><\/li>\n\n\n\n<li><em>Source Files:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/courses\/csci4060u-w25\/exercises\/CSCI4060U_Lab_08_source.zip\">[CSCI4060U_Lab_08_source.zip]<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LAB 1: Introduction to OpenMP Programming in C LAB 2: Barriers in OpenMP LAB 3: Critical Regions&nbsp;IN OPENMP LAB 4: A Fibonacci Number Generator in OpenMP Lab 5: Threads vs. Process Performance in C LAB 6: Programming with Pthreads&nbsp;In C &hellip; <a href=\"http:\/\/www.sqrlab.ca\/csci4060u\/labs\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"sidebar-page.php","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-375","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P739Pv-63","_links":{"self":[{"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/pages\/375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/comments?post=375"}],"version-history":[{"count":14,"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/pages\/375\/revisions"}],"predecessor-version":[{"id":501,"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/pages\/375\/revisions\/501"}],"wp:attachment":[{"href":"http:\/\/www.sqrlab.ca\/csci4060u\/wp-json\/wp\/v2\/media?parent=375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}