Homework 1: Processes

 


1. (5pts) What is the difference between symmetric and asymmetric multiprocessing?

2. (5pts) What is the difference between a loosely coupled system and a tightly coupled system? Give examples

3. (5pts) What is a context switch, what actions are taken in the kernel, and how much time it takes in today's systems?

4. (5pts) What are the main types of system calls? Describe their purpose.

5. (30pts) Develop a small program in C (or Java) using system calls (e.g. fork(), waitpid(), exit(), kill(), ..)
that does the following:

(A sample program written in C is provided in Figure 4.8. For detailed information about the calls use the Internet (e.g., http://www.softpanorama.org/Internals/unix_system_calls_links.shtml))

 

Additional exercise (not required):

6. Develop an execution driven simulator (C or Java) for a multiprocessor following these steps:

 

Resources:

  1. Text book
  2. Java tutorial
  3. List of system Calls in Unix for a C implementation - see below for an overview
  4. Java implementation - see http://java.sun.com/products/jdk/1.2/docs/api/index.html
    select class java.lang and look especially to the class java.class.Process

    java.lang
    Class Process

    java.lang.Object
      |
      +--java.lang.Process
    

 

Process related Calls in Unix Systems
Process Creation and Termination exec()

fork()

wait()

exit()

Process Owner and Group getuid()

geteuid()

getgid()

getgid()

Process Identity getpid()

getppid()

Process Control signal()

kill()

alarm()

Change Working Directory chdir()