P. 1
RTS

RTS

|Views: 144|Likes:
Published by api-19990211

More info:

Published by: api-19990211 on Dec 03, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Real Time Scheduling System 30306104305

REAL TIME SCHEDULING SYSTEM AIM:
To develop software for Real time scheduling system with various functional and non functional part of design namely,
• • • • PROBLEM ANALYSIS USE CASE DOCUMENTATION UML DIAGRAMS TEST PLAN

PROBLEM DEFINITION
The Real Time Scheduler is defined as the technique used for synchronization of execution of events with real time. There are two types of scheduling. They are preemptive scheduling and non- preemptive scheduling. In preemptive scheduling the execution of a process can be suspended and resumed at a later time, after meeting a condition. In non– preemptive the execution of a process will not be suspended and other processes will wait till the current process finishes executing.

OBJECTIVE OF THE APPLICATION
The ultimate goal of this project is to develop database software that enables enterprise user to schedule the process according their priority given to them.

Real Time Scheduling System 30306104305

SIGNIFICANCE OF THE APPLICATION
The significance of the project includes the following key features • • • •

The user can search all the scheduling details The user can select the scheduling techniques. The manager maintaining all scheduling details in the database The manager maintaining all the process details in the database Add process and remove a process.

Access to database can be setup on username / password basis with multiple users and privileges

FUNCTIONAL

REQUIREMENTS:
The manager adds the details of user to be added in the database. The manager searches the user to be deleted and removes the information from the database. The user select for the particular processing to view the list of details. The user selects the particular scheduling techniques and to view its details The user selects the priority algorithm name to view details The user can view the details based on selection.

Add user Cancel user

Select processing select scheduling technique

find priority view information

Real Time Scheduling System 30306104305

USE

CASE DOCUMENTATION:

Use Case ID: Use Case Name: Created By: Date Created: Actors: Description:

1 Use case input Kumarasamy.K September 21, 2009 Processor The user can search for their scheduling types for which the process is available or not available Processor want to schedule the process In this case there is no precondition. Last Updated By: Date Last Updated: Kumarasamy.K September 21, 2009

Trigger Preconditions: Post conditions:

• •

The scheduling system menu will be displayed. The details about the scheduling types will be displayed. .

Normal Flow

• •
Alternative Flows: Exceptions: None

The user wants to view menu for process The System displays the list of available process Then Passenger selects one scheduling technique from list

1.0 Invalid search
If the scheduling name is invalid name, system displays error message. None High Processor None Processor can able to view all the priority details of the scheduled process None None

Includes: Priority: Frequency of Use: Business Rules: Special Requirements: Assumptions: Notes and Issues:

Real Time Scheduling System 30306104305

Use Case ID: Use Case Name: Created By: Date Created: Actors: Description:

2 Selection of Scheduling techniques Kumarasamy.K September 21, 2009 Processor The Processor can search for their process and via online catalog, whether the scheduling technique is available or not available To choose the appropriate scheduling technique based on the priority. Check whether The Scheduling technique is available or not available Last Updated By: Date Last Updated: Kumarasamy.K September 21, 2009

Trigger Preconditions: Post conditions:

• •

The Scheduling system menu will be displayed. The details about the scheduling will be displayed. Processors ask to view menu for scheduling. The system displays menu of available scheduling. Then the passenger selects scheduling from list.

Normal Flow

• • •
None

Alternative Flows: Exceptions:

1.0 Invalid search
If the scheduling name is invalid name, system displays error message. None High Approximately 400 users, average of one usage per day None

Includes: Priority: Frequency of Use: Business Rules:

Special Requirements: Assumptions: Notes and Issues:

Processor can able to view the scheduling details, which he needs to select. None None

Real Time Scheduling System 30306104305
Use Case ID: Use Case Name: Created By: Date Created: Actors: Description: 3 First Come First Serve Kumarasamy.K September 21, 2009 Processor, Manager The Processor can search for their process and via online catalog, whether the scheduling technique is available or not available To select the first come first serve scheduling technique. Check whether The technique is available or not available Last Updated By: Date Last Updated: Kumarasamy.K September 21, 2009

Trigger Preconditions: Post conditions:

• •

The scheduling system menu will be displayed. The details about the scheduling will be displayed. Processor asks to view menu for options. The system displays menu of available scheduling techniques. Then the processor selects the appropriate technique.

Normal Flow

• • •
None

Alternative Flows:

Exceptions:

2.0 Invalid search
If the scheduling name is invalid name, system displays error message.

Includes: Priority: Frequency of Use: Business Rules: Special Requirements: Assumptions: Notes and Issues:

None High Approximately 400 users, average of one usage per day None None None None

Real Time Scheduling System 30306104305

Use Case ID: Use Case Name: Created By: Date Created: Actors: Description:

4 Shortest Job First Kumarasamy.K September 21, 2009 Processor, manager The Processor can search for their process and via online catalog, whether the scheduling technique is available or not available To select the scheduling technique. Check whether The Scheduling technique is available or not available. Last Updated By: Date Last Updated: Kumarasamy.K September 21, 2009

Trigger Preconditions: Post conditions:



Normal Flow

The processor can select this scheduling technique. The system display pay details System displays available scheduling name details. Processor asks to view menu for options. The system displays menu of available scheduling techniques. Then the processor selects the appropriate technique.

• • •
None

Alternative Flows: Exceptions: Includes: Priority: Frequency of Use: Business Rules: Special Requirements: Assumptions: Notes and Issues:

4.0 Invalid search: If the scheduling name is invalid name, system displays error message. None High Approximately 100 users, average of one usage per day None Processor shall be able to view the scheduling details, which he had selected None None

Real Time Scheduling System 30306104305

Use Case ID: Use Case Name: Created By: Date Created: Actors: Description:

5 Round Robin Kumarasamy.K September 21, 2009 Processor, Manager The Processor can search for their process and via online catalog, whether the scheduling technique is available or not available .To selects the scheduling technique. No preconditions Last Updated By: Date Last Updated: Kumarasamy.K September 21, 2009

Trigger Preconditions: Post conditions:


The processor can select this scheduling technique. The system display pay details System displays available scheduling name details.

Normal Flow

• • •
None

Processor asks to view menu for options. The system displays menu of available scheduling techniques. Then the processor selects the appropriate technique.

Alternative Flows: Exceptions: Includes: Priority: Frequency of Use: Business Rules: Special Requirements: Assumptions: Notes and Issues:

5.0 Invalid search If the scheduling name is invalid name, system displays error message.
None High Approximately 100 processors, average of one usage per day None Processor shall be able to view the scheduling details, which he had selected none None

Real Time Scheduling System 30306104305

Use Case ID: Use Case Name: Created By: Date Created: Actors: Description:

6 Priority Scheduling Kumarasamy.K Septemer 21, 2009 Processor, manager The Processor can search for their process and via online catalog, whether the scheduling technique is available or not available To select the scheduling technique. No preconditions Last Updated By: Date Last Updated: Kumarasamy.K Septemer 21, 2009

Trigger Preconditions: Post conditions:


The processor can select this scheduling technique. The system display pay details System displays available scheduling name details.

Normal Flow



Alternative Flows: Exceptions: Includes: Priority: Frequency of use Business Rules: Special Requirements: Assumptions: Notes and Issues: None

Processor asks to view menu for options. The system displays menu of available scheduling techniques. Then the processor selects the appropriate technique.

6.0 Invalid search If the scheduling name is invalid name, system displays error message.
None High Approximately 100 processors, average of one usage per day None Processor shall be able to view the scheduling details, which he had selected none None

Real Time Scheduling System 30306104305

1. USE CASE DIAGRAM:

get no of processes

get the burst time

input

user

get the waiting time

FCFS

calculate the burst time

SJFS

calculate the waiting time Priority

Db Administrator

Scheduler calculate turnaround time Round Robin

Real Time Scheduling System 30306104305

STATE CHART DIAGRAM FOR FCFS:

Start s tate

Login

Give information

Get the process

Calculate the time

Calculate the burst time and turn around time

Select the detail and algorithm

FCFS algorithm

Schedule the process

Send res ult

Update the information

NewState2

Real Time Scheduling System 30306104305

STATE CHART DIAGRAM FOR SJF:

Start s tate

Login

Give information

Get the process

Calculate the time

Calculate the burst time and turn around time

Select the detail and algorithm

SJF algorithm

Schedule the process

Send res ult

Update the information

NewState2

Real Time Scheduling System 30306104305

STATE CHART DIAGRAM FOR PRIORITY:

Start s tate

Login

Give information

Get the process

Calculate the time

Calculate the burst time and turn around time

Select the detail and algorithm

priority algorithm

Schedule the process

Send result

Update the information

NewState2

Real Time Scheduling System 30306104305

STATE CHART DIAGRAM FOR ROUND ROBIN:

Start s tate

Login

Give information

Get the process

Calculate the time

Calculate the burst time and turn around time

Select the detail and algorithm

Roundrobin algorithm

Schedule the process

Send res ult

Update the information

NewState2

Real Time Scheduling System 30306104305

ACTIVITY DIAGRAM FOR FCFS:

User

Scheduler

DB Administrator

start

Login

Get the process details

Calculate the burst time and turn around time

Select the detail and algorithm

No FCFS

yes

switch to the next algorithm

Schedule the process

Update Database

Stop

Real Time Scheduling System 30306104305

ACTIVITY DIAGRAM FOR SJFS:

User

Scheduler

DB Administrator

start

Login

Get the process details

Calculate the burst time and turn around time

Select the detail and algorithm

SJFS

No

switch to the next algorithm
yes

Schedule the process

Update Database

Stop

Real Time Scheduling System 30306104305

ACTIVITY DIAGRAM FOR PRIORITY SCHEDULING:

User

Scheduler

DB Administrator

start

Login

Get the process details

Calculate the burst time and turn around time

Select the detail and algorithm

No Priority Scheduling

yes

switch to the next algorithm

Schedule the process

Update Database

Stop

Real Time Scheduling System 30306104305

ACTIVITY DIAGRAM FOR ROUND ROBIN:

User

Scheduler

DB Administrator

start

Login

Get the process details

Calculate the burst time and turn around time

Select the detail and algorithm

No Round Robin scheduling switch to the next algorithm

yes

Schedule the process

Update Database

Stop

Real Time Scheduling System 30306104305

SEQUENCE DIAGRAM FOR FCFS:
:User 1:Login :Scheduler :DB Administrator

2:Get process details

3:Calculate burst time and turn around time

4:Process the details and select the algorithm

5:FCFS Scheduling

7:Schedule the process

8:Send Information

9:Update Information

10:Successfully scheduled

Real Time Scheduling System 30306104305

SEQUENCE DIAGRAM FOR SJFS:
:User 1:Login :Scheduler :DB Administrator

2:Get process details

3:Calculate burst time and turn around time

4:Process the details and select the algorithm

5:SJFS Scheduling

7:Schedule the process

8:Send Information

9:Update Information

10:Successfully scheduled

Real Time Scheduling System 30306104305

SEQUENCE DIAGRAM FOR PRIORITY SCHEDULING:
:User 1:Login :Scheduler :DB Administrator

2:Get process details

3:Calculate burst tim e and turn around tim e

4:Proces s the details and s elect the algorithm

5:Priority Scheduling

7:Schedule the process

8:Send Information

9:Update Inform ation

10:Successfully scheduled

Real Time Scheduling System 30306104305

SEQUENCE DIAGRAM ROUND ROBIN:

:User 1:Login

:Scheduler

:DB Administrator

2:Get process details

3:Calculate burst tim e and turn around tim e

4:Proces s the details and s elect the algorithm

5:Round Robin Scheduling

7:Schedule the process

8:Send Information

9:Update Inform ation

10:Successfully scheduled

Real Time Scheduling System 30306104305

COLLABORATION DIAGRAM FOR FCFS:

1 : 1:Login 2: 2:Get proces s details

:Us er

:Scheduler

9 : 10:Succes s fully s ched uled

8: 9 :U pd ate In form ation

3: 3 :C alcu late burs t tim e and turn a round tim e 4: 4:Proces s the deta ils and s elect the algorithm 5: 5:FC FS Scheduling 6: 7:Schedule the pro ces s 7: 8:Send Inform ation

:DB A dministrator

Real Time Scheduling System 30306104305

COLLABORATION DIAGRAM FOR SJFS:

1: 1:Login 2: 2:Get proces s details

:User

:Sc heduler

9: 10:Succes s fully s cheduled

8: 9:Update Inform ation

3: 3:Calculate burs t tim e and turn around tim e 4: 4:Proces s the details and s elect the algorithm 5: 5:SJFS Scheduling 6: 7:Schedule the proces s 7: 8:Send Inform ation

:DB Adm inis trator

Real Time Scheduling System 30306104305

COLLABORATION DIAGRAM FOR PRIORITY SCHEDULING:

1 : 1 :L o g in 2 : 2 :G e t p ro c e s s d e ta ils

: U s er

:S c he d u le r

9 : 1 0 :S u cc e s s fu ll y s ch e d u le d

8 : 9 :U p d a te In fo rm a tio n

3 : 3 :C a lc u la te b u rs t tim e a n d tu rn a ro u n d tim e 4 : 4 :P ro c e s s th e d e ta ils a n d s e l e ct th e a lg o rith m 5 : 5 :P rio ri ty S c h e d u l in g 6 : 7 :S c h e d u le th e p ro ce s s 7 : 8 :S e n d In fo rm a tio n

:DB A d m in is tra to r

Real Time Scheduling System 30306104305

COLLABORATION DIAGRAM ROUND ROBIN SCHEDULING:

1 : 1 :L o g in 2 : 2 :Ge t p ro ce s s d eta ils

:Us er

:S c heduler

9 : 1 0:S u cce s s fu lly s che d u le d

8 : 9 :U p d a te In fo rm a tio n 3 : 3 :C a lcu la te b u rs t tim e a n d turn a rou n d tim e 4 : 4 :P ro ce s s th e d e ta ils a nd s ele ct the a lg o rith m 5 : 5 :R o u n d R o b in S ch e d u ling 6 : 7 :S ch ed u le th e p ro ce s s 7 : 8 :S e n d In form a tio n

:DB A dm inis trator

Real Time Scheduling System 30306104305

CLASS DIAGRAM:

proc es s Details
pro ces s types burs t tim e waiting tim e Get waiting tim e () 1..* Get b urs t Tim e()

1..*

s c heduler 1 * us er us er id pas sword A dd User()* print() 1 DB adminis trator
us er 1 proces s type algorithm s ele cted s ave inform a tion() us er nam e proces s deta ils algorith m ad d proces s () s e lect alg orithm ()

1

FCFS
Waiting tim e Bu rs t tim e Schedu led p roces s ()

S JF
Waiting tim e b urs t tim e s cheduled proce s s ()

Priority
wa iting tim e burs t tim e s ch edule proces s ()

Round Robin
waiting tim e burs t tim e s chedule the proces s ()

Real Time Scheduling System 30306104305 COMPONENT DIAGRAM:

D B s e rver. h

D B s e rve r.ja va D B s e rve r.e xe

p ro c e s s or. h pro c e s s or.d ll

u s e r. h us er.java

s c h edu ler.h s c he du le r.dll

Real Time Scheduling System 30306104305

DEPLOYMENT DIAGRAM:

DataBase Server

Processor Server

Scheduler Server

Display Device

Client 1

Processor

Real Time Scheduling System 30306104305

CODE
DB Administrator.h:

#ifndef DBAdministrator_h #define DBAdministrator_h 1 #include "scheduler.h" #include "user.h" class DBAdministrator : public scheduler public: DBAdministrator(); DBAdministrator(const DBAdministrator &right); ~DBAdministrator(); DBAdministrator & operator=(const DBAdministrator &right); int operator==(const DBAdministrator &right) const; int operator!=(const DBAdministrator &right) const; void saveInformation (); const UnboundedSetByReference<user> get_the_user () const; void set_the_user (UnboundedSetByReference<user> value); protected: private: const void get_user () const; void set_user (void value); const void get_processType () const; void set_processType (void value); const void get_algorithmSelected () const; void set_algorithmSelected (void value); private: void user; void {U} void processType; private: void {U} void algorithmSelected; UnboundedSetByReference<user> the_user; }; inline const void DBAdministrator::get_user () const { return user; } inline void DBAdministrator::set_user (void value) { user = value; } inline const void DBAdministrator::get_processType () const { return processType; } inline void DBAdministrator::set_processType (void value)

Real Time Scheduling System 30306104305 { processType = value; } inline const void DBAdministrator::get_algorithmSelected () const { return algorithmSelected; } inline void DBAdministrator::set_algorithmSelected (void value) { algorithmSelected = value; } inline const UnboundedSetByReference<user> DBAdministrator::get_the_user () const { return the_user; } inline void DBAdministrator::set_the_user (UnboundedSetByReference<user> value) { the_user = value; } #endif

Real Time Scheduling System 30306104305 FCFS.h: #ifndef FCFS_h #define FCFS_h 1 #include "DB administrator.h" class FCFS : public DB_administrator { public: FCFS(); FCFS(const FCFS &right); ~FCFS(); FCFS & operator=(const FCFS &right); int operator==(const FCFS &right) const; int operator!=(const FCFS &right) const; void Scheduled_process (); protected: private: const void get_Waiting_time () const; void set_Waiting_time (void value); const void get_Burst_time () const; void set_Burst_time (void value); private: void Waiting_time; void Burst_time; }; inline const void FCFS::get_Waiting_time () const { return Waiting_time; } inline void FCFS::set_Waiting_time (void value) { Waiting_time = value; } inline const void FCFS::get_Burst_time () const { return Burst_time; } inline void FCFS::set_Burst_time (void value) { Burst_time = value; } #endif

Real Time Scheduling System 30306104305 SJF.h: #ifndef SJF_h #define SJF_h 1 #include "DB administrator.h" class SJF : public DB_administrator { public: SJF(); SJF(const SJF &right); ~SJF(); SJF & operator=(const SJF &right); int operator==(const SJF &right) const; int operator!=(const SJF &right) const; void scheduled_process (); protected: private: const void get_Waiting_time () const; void set_Waiting_time (void value); const void get_burst_time () const; void set_burst_time (void value); private: void Waiting_time; void burst_time; }; inline const void SJF::get_Waiting_time () const { return Waiting_time; } inline void SJF::set_Waiting_time (void value) { Waiting_time = value; } inline const void SJF::get_burst_time () const { return burst_time; } inline void SJF::set_burst_time (void value) { burst_time = value; } #endif

Real Time Scheduling System 30306104305 Priority.h: #ifndef Priority_h #define Priority_h 1 #include "DB administrator.h" class Priority : public DB_administrator { public: Priority(); Priority(const Priority &right); ~Priority(); Priority & operator=(const Priority &right); int operator==(const Priority &right) const; int operator!=(const Priority &right) const; void schedule_process (); protected: private: const void get_waiting_time () const; void set_waiting_time (void value); const void get_burst_time () const; void set_burst_time (void value); private: void waiting_time; void burst_time; }; inline const void Priority::get_waiting_time () const { return waiting_time; } inline void Priority::set_waiting_time (void value) { waiting_time = value; } inline const void Priority::get_burst_time () const { return burst_time; } inline void Priority::set_burst_time (void value) { burst_time = value; } #endif

Real Time Scheduling System 30306104305 Round Robin.h: #ifndef Round_Robin_h #define Round_Robin_h 1 #include "DB administrator.h" class Round_Robin : public DB_administrator { public: Round_Robin(); Round_Robin(const Round_Robin &right); ~Round_Robin(); Round_Robin & operator=(const Round_Robin &right); int operator==(const Round_Robin &right) const; int operator!=(const Round_Robin &right) const; void schedule_the_process (); protected: private: const void get_waiting_time () const; void set_waiting_time (void value); const void get_burst_time () const; void set_burst_time (void value); private: void waiting_time; void burst_time; };

inline const void Round_Robin::get_waiting_time () const { return waiting_time; } inline void Round_Robin::set_waiting_time (void value) { waiting_time = value; } inline const void Round_Robin::get_burst_time () const { return burst_time; } inline void Round_Robin::set_burst_time (void value) { burst_time = value; } #endif

Real Time Scheduling System 30306104305

Test Plan

Overview To ensure that the Real Time Scheduling System will: - Function consistently and reliably in accordance with current business Test plan Objectives operations. - Meet or exceed user requirements and technical specifications. - Not adversely impact other systems or the existing technology environment. - Real time scheduling system which is used to manage the scheduling details are already implemented and tested. It is assumed that User can Testing Assumptions process with the help of processor and schedule the jobs according to their priorities. - These scheduling algorithm information are only used by real time scheduler system. The following risks apply to the testing process and may impact either the proposed date of readiness for the deployment of real time scheduling system, Risks & Contingencies or the comprehensive level of testing that can be performed in each of the Functional Units: - The actual deployment of real time scheduling system may take longer to perform than anticipated, is also using the same database.

Real Time Scheduling System 30306104305

RESULT:
Thus the Problem analysis & Requirement Analysis and various Use case scenarios ,UML diagrams, Test plans has been studied successfully.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->