Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 3305 Course Overview. Introduction r Instructor: Dr Hanan Lutfiyya r Office: MC 355 r Email: hanan at csd dot uwo ca r Office Hours: m Drop-by m Appointment.

Similar presentations


Presentation on theme: "CS 3305 Course Overview. Introduction r Instructor: Dr Hanan Lutfiyya r Office: MC 355 r Email: hanan at csd dot uwo ca r Office Hours: m Drop-by m Appointment."— Presentation transcript:

1 CS 3305 Course Overview

2 Introduction r Instructor: Dr Hanan Lutfiyya r Office: MC 355 r Email: hanan at csd dot uwo ca r Office Hours: m Drop-by m Appointment m Specific office hours will be posted the week that an assignment is due

3 Course Topics r Course is about what lies under the command line prompts in Linix or the GUI in Windows/MAC. r We will discuss: m Operating systems organized m Process scheduling m Process coordination m Memory management m File systems m “hot topics” (time permitting)

4 Course Logistics r CS3305 Textbook: Operating System Concepts – 8th Edition Silberschatz, Galvin, and Cagne, Addison-Wesley Inc. (5 th -7 th editions, 9 edition and Java Versions are fine as well). r Lectures Notes m Made available on the course website

5 Course Evaluation r Evaluation m 1 midterm, 1 final m 4 assignments r There is a heavy programming component based on C/C++ language r Grading is results based i.e., Evaluation is based on an “acceptance test”.

6 Late Policies and Coupons r Late Penalties m 5 marks a day m Saturday and Sunday count as one day m Assignments more than 5 days will not be accepted r Late Coupons m Three “late coupons” m A coupon gives you a one-day assignment extension m Cannot be used for bonus marks or used retroactively

7 Assignment Overview (Tentative) r Shell r Linux – add a system call r Threading r Memory Management

8 Why Study Operating Systems? r I probably will not write one from scratch r I have been writing Java (or C or Python) programs and I didn’t need to know anything about how the OS works r All I need to know are the commands I should submit to the OS to get my program to run or to store my data in a file.

9 Why Study Operating Systems? r Understanding how operating systems manage CPU, memory can help you be a better programmer. r Example m Structuring a loop m Web servers

10 OS and Loops Consider the following code segments: int data[128][128]; for (j = 0; j <128; j++) for (i = 0; i < 128;i++) data[i,j] = 0; Does it matter which you use? int data[128][128]; for (i = 0; i <128; i++) for (j = 0; j < 128;j++) data[i,j] = 0;

11 OS and Loops r Reasoning for answer No? The code segments execute the same number of instructions. r The correct answer: Yes it does matter m One will give you much faster results. m The reason has to do with the way the OS manages its memory

12 OS and Request Processing r Application: Withdraw money from a bank account r Two requests for withdrawal from the same account comes to a bank from two different ATMs r A thread for each request is created m A thread is a unit of execution m The same program (on the next page is executed)

13 OS and Request Processing int withdraw(account, amount) { balance = get_balance(account); balance = balance – amount; put_balance(account, balance) return balance } What happens if both requests request that $1000 be withdrawn from the same account? Assume that the account currently has $1000

14 OS and Request Processing r Both threads will read a balance of $1000 r Both threads will allow for $1000 to be withdrawn balance = get_balance(account) balance = balance – amount 1; balance=get_balance(account); balance = balance – amount; put_balance(account,balance) put_balance(account,balance); Execution sequence ss seen by CPU Thread 1 Thread 2 Thread 1 Switch to Thread 2 Switch to Thread 1

15 Why Study Operating Systems? r You may object to this example m Why are two requests taking turns using the CPU? m A request comes in, should get executed before the next request r If you did this it would very slow r Why? Well you have to wait until you learn more about operating systems

16 Why Study Operating Systems? r The example just presented is an example of concurrency r Concurrency leads to interesting programming challenges that were first addressed in operating systems r Today the ability to understand concurrency is important in developing efficient software applications for today’s multi-core machines

17 Why Study Operating Systems? r The OS code is really large m Windows 8 is rumoured to be between 30 and 80 million lines of code m MAC OS is close to 90 millions lines of code m Linux Debian Release 5 (with all packages) is about 325 million lines of code m Thus the study of OS design is a study of the design of large software systems r Understanding operating systems gives you a leg up in understanding system security

18 Why Study Operating Systems? r Ok – I’m still never going to write one from scratch. r Probably true r But.. Studying operating systems gives you insight into other areas of computer science m Data structures, concurrency, synchronization, resource management, distributed systems, networks


Download ppt "CS 3305 Course Overview. Introduction r Instructor: Dr Hanan Lutfiyya r Office: MC 355 r Email: hanan at csd dot uwo ca r Office Hours: m Drop-by m Appointment."

Similar presentations


Ads by Google