18CSL66 System Software Laboratory syllabus for CS



A d v e r t i s e m e n t

Module-1 Lab 8 hours

Course Learning Objectives:

This course (18CSL66) will enable students to:

  • To make students familiar with Lexical Analysis and Syntax Analysis phases of Compiler Design and implement programs on these phases using LEX & YACC tools and/or C/C++/Java
  • To enable students to learn different types of CPU scheduling algorithms used in operating system.
  • To make students able to implement memory management - page replacement and deadlock handling algorithms

 

Descriptions (if any):

Exercises to be prepared with minimum three files (Where ever necessary):

1. Header file.

2. Implementation file.

3. Application file where main function will be present.

The idea behind using three files is to differentiate between the developer and user sides. In the developer side, all the three files could be made visible. For the user side only header file and application files could be made visible, which means that the object code of the implementation file could be given to the user along with the interface given in the header file, hiding the source file, if required. Avoid I/O operations (printf/scanf) and use data input file where ever it is possible.

 

Programs List:

Installation procedure of the required software must be demonstrated, carried out in groups and documented in the journal.

1. a. Write a LEX program to recognize valid arithmetic expression. Identifiers in the expression could be only integers and operators could be + and *. Count the identifiers & operators present and print them separately.

b. Write YACC program to evaluate arithmetic expression involving operators: +, -, *, and /

2. Develop, Implement and Execute a program using YACC tool to recognize all strings ending with b preceded by n a’s using the grammar a n b (note: input n value)

3. Design, develop and implement YACC/C program to construct Predictive / LL(1) Parsing Table for the grammar rules: A→aBa , B→bB |ε . Use this table to parse the sentence: abba$.

4. Design, develop and implement YACC/C program to demonstrate Shift Reduce Parsing technique for the grammar rules: E→E+T | T, T→T*F | F, F→(E) | id and parse the sentence: id + id * id.

5. Design, develop and implement a C/Java program to generate the machine code using Triples for the statement A = -B * (C +D) whose intermediate code in three-address form:

T1 = -B

T2 = C + D

T3 = T1 + T2

A = T3

6. a. Write a LEX program to eliminate comment lines in a C program and copy the resulting program into a separate file.

b. Write YACC program to recognize valid identifier, operators and keywords in the given text (C program) file.

7. Design, develop and implement a C/C++/Java program to simulate the working of Shortest remaining time and Round Robin (RR) scheduling algorithms. Experiment with different quantum sizes for RR algorithm.

8. Design, develop and implement a C/C++/Java program to implement Banker‟s algorithm. Assume suitable input required to demonstrate the results

9. Design, develop and implement a C/C++/Java program to implement page replacement algorithms LRU and FIFO. Assume suitable input required to demonstrate the results.

 

Laboratory Outcomes:

The student should be able to:

  • Implement and demonstrate Lexer‟s and Parser‟s
  • Evaluate different algorithms required for management, scheduling, allocation and communication used in operating system.

 

Conduct of Practical Examination:

  • Experiment distribution
  • For laboratories having only one part: Students are allowed to pick one experiment from the lot with equal opportunity.
  • For laboratories having PART A and PART B: Students are allowed to pick one experiment from PART A and one experiment from PART B, with equal opportunity.
  • Change of experiment is allowed only once and marks allotted for procedure to be made zero of the changed part only.
  • Marks Distribution (Courseed to change in accoradance with university regulations)
  • m) For laboratories having only one part – Procedure + Execution + Viva-Voce: 15+70+15 = 100 Marks
  • n) For laboratories having PART A and PART B
  • i. Part A – Procedure + Execution + Viva = 6 + 28 + 6 = 40 Marks
  • ii. Part B – Procedure + Execution + Viva = 9 + 42 + 9 = 60 Marks

A d v e r t i s e m e n t

Module-1 Lab 8 hours

Course Learning Objectives:

This course (18CSL66) will enable students to:

  • To make students familiar with Lexical Analysis and Syntax Analysis phases of Compiler Design and implement programs on these phases using LEX & YACC tools and/or C/C++/Java
  • To enable students to learn different types of CPU scheduling algorithms used in operating system.
  • To make students able to implement memory management - page replacement and deadlock handling algorithms

 

Descriptions (if any):

Exercises to be prepared with minimum three files (Where ever necessary):

1. Header file.

2. Implementation file.

3. Application file where main function will be present.

The idea behind using three files is to differentiate between the developer and user sides. In the developer side, all the three files could be made visible. For the user side only header file and application files could be made visible, which means that the object code of the implementation file could be given to the user along with the interface given in the header file, hiding the source file, if required. Avoid I/O operations (printf/scanf) and use data input file where ever it is possible.

 

Programs List:

Installation procedure of the required software must be demonstrated, carried out in groups and documented in the journal.

1. a. Write a LEX program to recognize valid arithmetic expression. Identifiers in the expression could be only integers and operators could be + and *. Count the identifiers & operators present and print them separately.

b. Write YACC program to evaluate arithmetic expression involving operators: +, -, *, and /

2. Develop, Implement and Execute a program using YACC tool to recognize all strings ending with b preceded by n a’s using the grammar a n b (note: input n value)

3. Design, develop and implement YACC/C program to construct Predictive / LL(1) Parsing Table for the grammar rules: A→aBa , B→bB |ε . Use this table to parse the sentence: abba$.

4. Design, develop and implement YACC/C program to demonstrate Shift Reduce Parsing technique for the grammar rules: E→E+T | T, T→T*F | F, F→(E) | id and parse the sentence: id + id * id.

5. Design, develop and implement a C/Java program to generate the machine code using Triples for the statement A = -B * (C +D) whose intermediate code in three-address form:

T1 = -B

T2 = C + D

T3 = T1 + T2

A = T3

6. a. Write a LEX program to eliminate comment lines in a C program and copy the resulting program into a separate file.

b. Write YACC program to recognize valid identifier, operators and keywords in the given text (C program) file.

7. Design, develop and implement a C/C++/Java program to simulate the working of Shortest remaining time and Round Robin (RR) scheduling algorithms. Experiment with different quantum sizes for RR algorithm.

8. Design, develop and implement a C/C++/Java program to implement Banker‟s algorithm. Assume suitable input required to demonstrate the results

9. Design, develop and implement a C/C++/Java program to implement page replacement algorithms LRU and FIFO. Assume suitable input required to demonstrate the results.

 

Laboratory Outcomes:

The student should be able to:

  • Implement and demonstrate Lexer‟s and Parser‟s
  • Evaluate different algorithms required for management, scheduling, allocation and communication used in operating system.

 

Conduct of Practical Examination:

  • Experiment distribution
  • For laboratories having only one part: Students are allowed to pick one experiment from the lot with equal opportunity.
  • For laboratories having PART A and PART B: Students are allowed to pick one experiment from PART A and one experiment from PART B, with equal opportunity.
  • Change of experiment is allowed only once and marks allotted for procedure to be made zero of the changed part only.
  • Marks Distribution (Courseed to change in accoradance with university regulations)
  • m) For laboratories having only one part – Procedure + Execution + Viva-Voce: 15+70+15 = 100 Marks
  • n) For laboratories having PART A and PART B
  • i. Part A – Procedure + Execution + Viva = 6 + 28 + 6 = 40 Marks
  • ii. Part B – Procedure + Execution + Viva = 9 + 42 + 9 = 60 Marks
Last Updated: Tuesday, January 24, 2023