CS 4504 Lecture Notes - Lecture 2: Code Segment, Race Condition, Child Process

20 views2 pages
2 Sep 2016
School
Course
Distributed Computing Chapter 1
Dr. Bobbie
August 17, 2016
Lecture Notes
Basics of Operating Systems
When a program is “run” or executed on a computer it is represented as a process.
A process consists of an executing program, its current values, state information, and resources
used by the operating system.
Life of a process – program starts at the execution and is send to the ready queue. When
necessary resources are available (such as CPU) the process is dispatched (enters running
state). It continues to execute till I/O operation is required (called blocked state). After blocked
state is removed process is back to the ready que. When the process finishes its job the
process will be terminated.
Three types of java programs: applications, applets, and servlets.
Application – has a main method and it is run independent (stand-alone).
Applet – does not have a main method and it is run using a browser or the appletviever.
Servlet – does not have a main method and it is run in the context of a web browser.
Java program is compiled to bytecode. Bytecode is an intermediate code which is the same
regardless the machine. So java programs are platform-independent.
Concurrent programming – execution of a processes simultaneously.
3 types of concurrent programming:
1. Concurrent processes executed on multiple computers – separate processes are
running concurrently on separate machines connected via network. The processes
interact with each other by exchanging data. E.G accessing a web page using a browser
(process on the machine) interacts with a process on the server.
Note: this type of programming involving multiple machines requires programming
support in the software. Program must be written to include logic support for the
interaction between the processes.
2. Concurrent processes executed on a single computer – modern operating software
support multitasking which allows multiple processes to be executed simultaneously on
many cores.
Note: concurrency maybe real (pc has multiple cores) or virtual (machine uses
timesharing/time-slicing to swap in/out processes to create illusion that they are being
executed in parallel. Also, no special programming needed for this method.
3. Concurrent programming in a process – a process may require to execute other things
while waiting for user input or a response or some other task.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Notes+

Unlimited access to class notes and textbook notes.

YearlyBest Value
75% OFF
$8 USD/m
Monthly
$30 USD/m
You will be charged $96 USD upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.