HOME

CS 2511

CS 3810

CS 4600

CS 5610

 

CS 5610
STUDENT WEBPAGES

CS 5610
ASSIGNMENTS

CS 5610
TEST REVIEW

CS 5610
CLASS NOTES

 

 

UNDER CONSTRUCTION

Summary of class discussion           Date 9-25-03 
 
 General discussion through the semester:
    1. How to implement Round Robin CPU scheduling with priority using Circular
 
       Straight Queue:
          a. static array
          b. dynamic array
          c. linked list
    2. Learn about what to expect from Intelligent (Future) Operating System: 
        a. benchmark
        b. observation
        c. decision making
        d. performance management
    3. Subjects to read (updated 9-30-03):
       a. Evolution of Operating System.
       b. DOS, CP/M, UNIX, (VAX Clusters which uses VMS and UNIX) Operating
Systems.
          Advantages and disadvantages of each Operating System.
       c. batch programming  (.bat ), shell and window programming.
       d. Burst time of job, and slice time of CPU.
       e. Scheduling CPU, Memory Management and Virtual Memory.
       f. Initialize the Queue.
       g. Trap and Interrupt.
       h. Dining philosopher’s problem.
 
 
 
 PROJECT AND DISCUSSION:
 
 PROJECT FOR THE ENTIRE SEMESTER (updated):
 Compare window and command type Operating Systems. 
 
 Select one of the window versions (window XP or NT) and compare it to one of
the command
 versions
 UNIX or LINUX.
 
     Preliminary comparison (update 9-30-03):
      1. Usage and applications.
       2. Features, command and shell programming. 
       3. CPU scheduling and job handling.
      4. Memory management and virtual memory.
       5. Multitasking
       6. Networking.
       7. Speed.
      8. Recovery.
       9. Problems.
       10. How priority is set.
 
 
 
 
 Summary of class discussion          Date 9-30-03 
 
 General discussion:
 
   1. Some algorithm and hints on how to implement Round Robin CPU scheduling :
       a. Initialize the Queue (simple array).
       b. Assign six jobs (for example).
       c. Use random number generator (option).
      d. Set arrival time, waiting time, finish time and turnaround time.
       e. Set priority as follow.
           1. First in first out  (FIFO). Or 
           2. Shortest job first.
       f. Loop until all jobs are complete.
       g. No preemption (means do not enter loop again).
       h. Display and verify result.
 2. Research and find information about the following subjects: 
    a. What CPU scheduling do? For window and Linux.
    b. Get a UNIX account set up, and learn (Ten) commands.
    c. Length of file names (a worm that kept computers on the network busy).
    d. Terms such as:
        1. Starvation (find IBM story). 
        2. Aging (Preventing starvation).
        3. Preemption (stops and takes over other job).
 
 PROJECT AND DISCUSSION
 Material will be covered in Midterm Exam:
      1. Operating System definition.
      2. CPU scheduling.                Understanding and under program.
      3. Memory management.
      4. UNIX and window commands.
      5. Comparison of window and UNIX.
 
 
 
 
 Subject:      Summary of class discussion           Date 10-01-03  
 General discussion:
 1.     Research and find information about the following subjects: 
 a.     What is Kernel?
 b.     What is concurrency?
 Simple definition is performing two jobs at the same time; example Typing and
listing to music.
 c.     What is paging, memory management?
 d.     What is segmentation?
 e.     What is virtual memory?
 f.     What are quanta switch time?
 g.     What is the buffer? 
 h.     What is three-structure file?
 PROJECT AND DISCUSSION
 Material will be covered in Midterm Exam:
 1.     Operating System definition.
 2.     CPU scheduling.                Understanding and under program.
 3.     Memory management.
 4.     UNIX and window commands.
 5.     Comparison of window and UNIX.
 
 
Subject:       Summary of class discussion           Date 10-07-03  
General discussion:
1. Research and find information about the following subjects: 
a. What is Gantt Chart?
b. What is CPU burst?
c. What is preemptive and nonpreempitive?
d. What is starvation?
e. What is aging?
f. What is time quantum?
g. What is semaphore? 
h. What are threads?
i. Any question on Round Robin project should be addressed ASAP.
PROJECT AND DISCUSSION
Material will be covered in Midterm Exam:
1. Operating System definition.
2. CPU scheduling.                Understanding and under program.
3. Memory management.
4. UNIX and window commands.
5. Comparison of window and UNIX.
 
 
 
 
Subject:       Summary of class discussion           Date 10-09-03  
 
Test announcement:
1. A True – False test will be held on October 16th, 2003.
   If any one has question(s), up to three questions, you could be submit it to
both of the     
   following email addresses:
     1. Ebrahimia@Oldwestbury.Edu
     2. ngirgis22@yahoo.com
 
2. Midterm exam will be held on October 23rd, 2003.
Everything we’ve Covered.  1 program will be included.
 
 
General announcement
1. Programming Contest Sunday November 9th.  Three teams. Held at NYIT.
2. Common Hour Wednesday 22nd .
 
 
General discussion:
1. Log in to Unix server and learn some commands (commands will be on test).
   You must have an account to log in, to log in, you need a “user Name” and
“Password”.
   If you do not have an account, please contact professor embrahimi to get one.
   If you have an account follow this procedure to log in from any computer:
1. click on start 
2. select Run
3. type : Telnet 137.139.174.4.  then hit Ok
4. Type user name, hit enter.
5. Type password, hit enter.
 
If you do not have an account, you may be able to log in temporarily using “
student “ as user
name and password.  However, it is not secure because it can allow some one,
accidentally
overwrite your work. Therefore, you need to get an account.
 
 
Unix 
Search the following:
- Pipe
- Redirection
 
Unix Commands:
 
 ls            list directory
 ls –al        the detailed files including the protection mode.
 lsal|more
 cat file.c|lpr
concatenation
 cat file.c file.in file.out > myassign
 lpr myassign
 mv            move file
 cp            copy
 chmod  change mode
 cd            change directory
 mkdir  make directory
 
We can use to compile:
        pico
        emac
        vi
 
 
Put on your resume you have experience with unix.
 
3 or 4 Guys to know:
dijkstra
aho
wirth
kanuth
 
http://www.december.com/unix/tutor/pipesfilters.html
 
Round Robin
-Simple version is array of 5 jobs with burst time.
-Declare a slice time and subtract that from each job
-When the job is finished print out a report
 
 
 
 
Subject:       Summary of class discussion           Date 10-14-03
 
 
1)Test – True False Test October 16th,(Submit your questions to up to 3)
email to ebrahimia@oldwestbury.edu 
and ngirgis22@yahoo.com)
 
2) on Thursday Oct 16 after test
 a. Conference on Round Robin problems, project status will be recorded.
 b. Extra Credit for Round Robin if program can do the following:
       run with different slice times and to calculate:
       average waiting time
       average turn around time
it is recommended to use priority number or shortest job first
 
 
General discussion:
1) Memory management
How a job is assigned a location to memory?
One way is memory partition dynamically of the same size or different size
 
MFT- Multi-programming with Fixed task (Pre-Partition)
MVT- Multi-programming with variable tasks you partition as jobs come
In both cases we have a fixed amount of memory
 
See the following web site for example discussed in the class
http://www.scism.sbu.ac.uk/ccsv/josephmb/CS-L2-OS/oss/week7.html
 
 
If I have a job of 20mb where should I place it in memory?
Answer: None
 
 
MFT disadvantage: 
1. if size of job is larger than the partition than you can’t assign this job to
memory.
2. if you use 1 kb in a 500kb space your wasting 499kbs. Waste of space because
you can’t  compact
data 
 
 
MVT- it has fragmentation 
see picture on website on dynamic algorithm
allows compacting would be grouping process 1 and 3 in picture(e) to create room
for a 250kb job.
 
(Assignment 2) start to work on it, due date will be announced.
Best fit algorithm for memory management 

 

Test info

1)      Understanding of Round Robin Loop, burst time, slice time!!\

2)      Single queue linked list is an advantage because a physical node is being removed.

3)      Paging, segmentation, MVT MFT are management problem

4)      Interrupt

5)      Trap is like divide by zero

6)      Virtual Memory

7)      ALU (Arithmetic Logic Unit)

8)      Secondary Storage (Hard Disk)

9)      CPU consist of RAM, ROM and registers

10)  CPU has clutch cycles

11)   Predecessor of UNIX was   Maltics not LUNIx

12)  Vax is architecture, not Os

13)  Round robin with priority is the same not the same with sjf

14)  To delete a file in unix use mv instead of rm

15)  Starvation and aging

16)   In FIFO there is starvation.

17)  DOS (Disk Operating System

18)  Some of the waiting and burst time = turnaround time

19)  Arrival time is important for waiting

 

11/05/03 Notes

11/5/03

 

LRU – List Recently Used.  It is used for page replacement. 

              

Example – If we trace a particular program we might record the following sequence:

0100

0432

0101

0612

0102

0103

0104

0101

0611

0102

0103

0104

0101

0610

0102

0103

0104

0609

0102

0105

 

which at 100 words per page is reduced to the following reference string

 

1 4 1 6 1 6 1 6 1 6 1

 

Write a program that gets the produced of addresses and

A) page size produces the reference string. 

B) Enter the memory page frame interactively e.g. 4

 

 

6

4

1

 

Pg 336 (OS BOOK)

Page Replacement

Problem 2

7, 0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1

FIFO algorithm used for this.

Should include counter to print the number of page faults

(how many pages were replaced)

 

7 2 3 3

0 0 0 4

1 1 1 1

 

 

2) Assignment 2 is LRU.   Write an algorithm.

11/11/03

Advantages and disadvantage of Paging?

Advantages

  • One address space
  • Can swap out parts of a task
  • A process can thrash at disk speed
  • Security achieved by assigning pages to tasks and comparing
  • Simple bitwise substitution
  • Fixed size simplifies allocation and placement

Disadvantages

Paging Disadvantages

 

FIFO
         + simple
         - no correlation between time in memory and use freq.
         
           3 Frames
           1 2 3 4 1 2 5 1 2 3 4 5
           -----------------------
          *1 1 1*4 4 4*5 5 5 5 5 5 
            *2 2 2*1 1 1 1 1*3 3 3     9 page faults
              *3 3 3*2 2 2 2 2*4 4
 
 
           4 Frames
           1 2 3 4 1 2 5 1 2 3 4 5
           -----------------------
          *1 1 1 1 1 1*5 5 5 5*4 4    10 page faults 
            *2 2 2 2 2 2*1 1 1 1*5
              *3 3 3 3 3 3*2 2 2 2
                *4 4 4 4 4 4*3 3 3

 

 

 

                

 

 

 

    1. FIFO:

w

1

2

3

4

1

5

6

2

1

 

frame 1

1

1

1

1

1

5

5

5

5

 

frame 2

 

2

2

2

2

2

6

6

6

 

frame 3

 

 

3

3

3

3

3

2

2

 

frame 4

 

 

 

4

4

4

4

4

1

 

pf

*

*

*

*

 

*

*

*

*

= 8 page faults

    1. OPT:

w

1

2

3

4

1

5

6

2

1

 

frame 1

1

1

1

1

1

1

1

1

1

 

frame 2

 

2

2

2

2

2

2

2

2

 

frame 3

 

 

3

3

3

3

3

3

3

 

frame 4

 

 

 

4

4

5

6

6

6

 

pf

*

*

*

*

 

*

*

 

 

= 6 page faults

    1. Pages 4, 5, and 6 can overwrite either frame 3 or frame 4. Here, they overwrote frame 4.
    2. LRU:

w

1

2

3

4

1

5

6

2

1

 

frame 1

1

1

1

1

1

1

1

1

1

 

frame 2

 

2

2

2

2

5

5

5

5

 

frame 3

 

 

3

3

3

3

6

6

6

 

frame 4

 

 

 

4

4

4

4

2

2

 

pf

*

*

*

*

 

*

*

*

 

= 7 page faults

 

http://nob.cs.ucdavis.edu/classes/ecs150-1999-spring/ans4.html

 

 

December 2nd Notes

1)   Next Tuesday NO class due to common hour

2)   Two projects that must be done

a)   LRU (page replacement

b)   Round Robin

3)   Optional Projects

a)   Memory Management (dynamic / fixed)

b)   Other page replacement programs

c)   Put CGI program on the network.

4)   Thur will be review for the test.

5)   Final date is dec 16th

6)   Articte by Dr. Ebrahimi.  (google search – Add PBE to Conventional Languages)

7)   cd ~ to get  home

8)   cd .. to get one level up

9)   cd ./ebrahimi

10)   cp index.html./ebrahimi/cgi-bin – to copy html file to the bin

11)    

 

 

Kevins Notes

Oct 2nd

Oct 7th

Oct 16th

Oct 23rd

Nov 20th

Dec 2nd

Dec 4th

OS Terms

OS Review

Luigi - TC

 

 

 

 

 

 

 

 

 

 

 

 

1 1