Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Course Outline
Concurrent Programming:
Processes and threads, process/thread interaction mechanisms; classical problems in concurrent programming; concurrent programming with threads;
Course Outline
Network programming:
TCP and UDP transport, Introduction to software design models:
Client/server, peer-to-peer etc; Server designs; Networking APIs;
Course Outline
Sockets:
introduction to sockets, socket options, socket types, Name and address conversions; Non blocking I/O; Daemons; Broadcasting and multicasting; Network programming with TCP/IP;
Course Outline
Distributed Programming:
Middleware for distributed applications; Remote Procedure Calls(RPC), Distributed programming using RPC;
Course Outline
Distributed Object based systems:
Distributed objects, Architecture; Communication;
Course Outline
Pre-requisites
CSC221 Object-oriented Analysis, Design and Programming CSC223 Operating Systems CSC225 Computer Networks CSC315 Distributed Systems
Course Outline
Delivery
Lectures Tutorials and Lab sessions
Core Texts
UNIX Network Programming Volume 1: The Sockets Networking API by W.R. Stevens UNIX Network Programming Volume 2: Interprocess communication by W.R. Stevens
Course Outline
Assessment
Examination 50% Coursework 50%
Administrative
Collaboration and Cheating
Discussions Hand in only your own work Writeups must be completed independently
Processes
Process concepts
Uniprogramming: Runs only one process at a time Multiprogramming: Multiple processes at a time. Processes share resources. Context switch: Save and restore hardware state. Save the state in PCB (Process Control Block).
Process Creation
Caused by the following events
Initiation of a batch job Execution of a process creation system e.g. System initialization User initiated request to create a new process
Process States
Process Termination
Under the following conditions
Normal exit (e.g. exit(0)) Exit on Error (e.g. exit(1)) Fatal error (e.g. segmentation falt) Killed by another process (kill system call)
Threads
A thread:
A unit of sequential execution. An execution stream in the context of a thread state. Unlike processes, multiple threads share parts of their state. E.g. Multiple threads can read and write the same memory location. Each thread still has its own registers, stack, program counter but other threads can read and write the stack memory. Thread Control Block: Typically Registers owned by a thread.
Threads
Threads
Thread Stack Each thread has its own
Threads Implementation
Three approaches:
User-level managed threads Kernel level managed threads Hybrid management approach
Multiplexing user level threads onto kernel level threads
Threads
User-level threads
Threads
Kernel managed threads
Threads
Hybrid implementation approaches
Semaphores Mutex Locks Monitors Dining Philosphers Readers and Writers Sleeping Barber