cis 552 advanced unix programming

6
CIS 552 Advanced Unix Programming Professor Spiegel Kutztown University

Upload: shay-young

Post on 30-Dec-2015

35 views

Category:

Documents


3 download

DESCRIPTION

CIS 552 Advanced Unix Programming. Professor Spiegel Kutztown University. Topics: Concurrency Unix Internals pipe, fork, exec, wait, signals, etc; Interprocess Communication Shared Memory, Semaphores, Message Queues? Threads? (maybe) Process Coordination Critical Sections Deadlock. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CIS 552 Advanced Unix Programming

CIS 552 Advanced Unix Programming

Professor Spiegel

Kutztown University

Page 2: CIS 552 Advanced Unix Programming

Topics:

ConcurrencyUnix Internals

•pipe, fork, exec, wait, signals, etc;Interprocess Communication

•Shared Memory, Semaphores, Message Queues?Threads? (maybe)Process Coordination

•Critical Sections

Deadlock

Page 3: CIS 552 Advanced Unix Programming

Here’s where we start

Time – used to order events

Event – A (potentially) sensed change

Process – An executing program

Is a program an executing process?

No. A program can, when executed, cause the occurrence of multiple processes

Page 4: CIS 552 Advanced Unix Programming

A Couple of Definitions

Concurrent – adj. acting in conjunction; agreeing; taking place at the same time; accompanying; n. a joint or contributory cause

Concurrently – adv. to run together

Parallel – adv. continuously at equal distance apart; precisely corresponding; similar; n. a line equidistant from another at all points; a thing exactly like another

n. union; concurrence of events

Page 5: CIS 552 Advanced Unix Programming

Precedence GraphsDirected Edge – Arrow from one node to another

e.g. A BAssume A & B are processesA occurs before (precedes) B,OR, B occurs after (follows) A

A B C D Sequential

A

B

C

D

Facts:• A precedes B• A precedes C• A precedes D• B precedes D• C precedes D

Question: What is B’s relationship to C?

Page 6: CIS 552 Advanced Unix Programming

Compiling & DebuggingRun gdb under emacs to debug your programs

Manual is available at URL:http://faculty.kutztown.edu/spiegel/Debugging/DebugPrimer.htmYou must also be able to write makefiles on your own

Manual is available at URL:

http://faculty.kutztown.edu/spiegel/Makefile/Makefile.htmThere is a link to each of these on my faculty

home page