SlideShare a Scribd company logo
1 of 10
Download to read offline
C-Shell
Mark and Turner
Patterns
• Reactor
• Singleton
• Interpreter
• Factory
• Builder
Shell Reactor
• main function
• while loop, terminates when
user enters “exit”
• Sends user input command to
parser
ShellParser
• Splits up each word in the
passed string based off of “ “
character.
• Pushes into a vector of strings.
• Also controls things such
whether process will run in
background, piping, output.
• Creates a new job from
command.
• T
Job
• Factory
• makeJob() makes a new
process from the commands
• launch() launches the process
in job once they are made
• Job sets up piping for multiple
process
Process
• With each process, a new
process object is created.
• The process is then forked
and exec’ed
• Output is printed to terminal
Shell
• Singleton Pattern- only one
instance
• Holds a lot of the variables we
need to keep global such as
our command vector and
terminal process id
• Mostly consists of accessor
methods
Shell Commands
• ls - lists all files in the directory
• cd - changes directory
• dirs - outputs current directory
path
• exec - execs a process, then
quits
• wait - waits for a process to
finish based off of its pid
• help - displays a small help
menu with valid commands
Some Challenges
• Piping- it took some time to figure out job
management that allowed us to pipe.
• Parsing Special Characters- size_t overflow due
to npos being values as “-1”
• Testing- Finding good use cases to test each
feature as it was implemented.
Demonstration

More Related Content

What's hot

Presentation Lfoppiano Pycon
Presentation Lfoppiano PyconPresentation Lfoppiano Pycon
Presentation Lfoppiano Pycon
Luca Foppiano
 

What's hot (20)

Keynote - Fluentd meetup v14
Keynote - Fluentd meetup v14Keynote - Fluentd meetup v14
Keynote - Fluentd meetup v14
 
Fluentd v0.14 Overview
Fluentd v0.14 OverviewFluentd v0.14 Overview
Fluentd v0.14 Overview
 
NodeJs
NodeJsNodeJs
NodeJs
 
Akmal Khaleeq Waheed - Challenge 3 p2
Akmal Khaleeq Waheed - Challenge 3 p2Akmal Khaleeq Waheed - Challenge 3 p2
Akmal Khaleeq Waheed - Challenge 3 p2
 
Remote iOS Devices Server – Scaling iOS
Remote iOS Devices Server – Scaling iOSRemote iOS Devices Server – Scaling iOS
Remote iOS Devices Server – Scaling iOS
 
SQL debugging
SQL debuggingSQL debugging
SQL debugging
 
OB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
OB1K - New, Better, Faster, Devops Friendly Java container by OutbrainOB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
OB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
 
Presentation Lfoppiano Pycon
Presentation Lfoppiano PyconPresentation Lfoppiano Pycon
Presentation Lfoppiano Pycon
 
Introduction to Reactive Java
Introduction to Reactive JavaIntroduction to Reactive Java
Introduction to Reactive Java
 
Fluentd Meetup 2016 - ServerEngine Integration & Windows support
Fluentd Meetup 2016 - ServerEngine Integration & Windows supportFluentd Meetup 2016 - ServerEngine Integration & Windows support
Fluentd Meetup 2016 - ServerEngine Integration & Windows support
 
rsyslog meets docker
rsyslog meets dockerrsyslog meets docker
rsyslog meets docker
 
Reactive Java (GeeCON 2014)
Reactive Java (GeeCON 2014)Reactive Java (GeeCON 2014)
Reactive Java (GeeCON 2014)
 
Binary Studio Academy: Concurrency in C# 5.0
Binary Studio Academy: Concurrency in C# 5.0Binary Studio Academy: Concurrency in C# 5.0
Binary Studio Academy: Concurrency in C# 5.0
 
Owin
OwinOwin
Owin
 
JActor Cluster Platform
JActor Cluster PlatformJActor Cluster Platform
JActor Cluster Platform
 
EUC2015 - Load testing XMPP servers with Plain Old Erlang
EUC2015 - Load testing XMPP servers with Plain Old ErlangEUC2015 - Load testing XMPP servers with Plain Old Erlang
EUC2015 - Load testing XMPP servers with Plain Old Erlang
 
Inter-process communication on steroids
Inter-process communication on steroidsInter-process communication on steroids
Inter-process communication on steroids
 
Basics of Node.js
Basics of Node.jsBasics of Node.js
Basics of Node.js
 
Democratizing Serverless
Democratizing ServerlessDemocratizing Serverless
Democratizing Serverless
 
Robot Evolution
Robot EvolutionRobot Evolution
Robot Evolution
 

Viewers also liked

1 s2.0-s0016236111006958-main
1 s2.0-s0016236111006958-main1 s2.0-s0016236111006958-main
1 s2.0-s0016236111006958-main
esteban3pp
 
chuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minh
chuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minhchuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minh
chuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minh
darrick325
 
chuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gòn
chuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gònchuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gòn
chuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gòn
sara869
 
GBM--multicentric (1)
GBM--multicentric (1)GBM--multicentric (1)
GBM--multicentric (1)
Amit Ghosh
 
Refleksi etika professioanal
Refleksi etika professioanalRefleksi etika professioanal
Refleksi etika professioanal
yeesan
 
Paediatric medicine opd workflow(1)
Paediatric medicine opd workflow(1)Paediatric medicine opd workflow(1)
Paediatric medicine opd workflow(1)
nisaiims
 
chuyên dịch vụ giúp việc theo tháng cao cấp sài gòn
chuyên dịch vụ giúp việc theo tháng cao cấp sài gònchuyên dịch vụ giúp việc theo tháng cao cấp sài gòn
chuyên dịch vụ giúp việc theo tháng cao cấp sài gòn
arnulfo238
 
chuyên dịch vụ giúp việc quận phú nhuận tại tphcm
chuyên dịch vụ giúp việc quận phú nhuận tại tphcmchuyên dịch vụ giúp việc quận phú nhuận tại tphcm
chuyên dịch vụ giúp việc quận phú nhuận tại tphcm
kristle864
 
Akuntansi usaha mikro (2013 trw+or)
Akuntansi usaha mikro (2013 trw+or)Akuntansi usaha mikro (2013 trw+or)
Akuntansi usaha mikro (2013 trw+or)
Mila Masduki Masduki
 

Viewers also liked (20)

Gastro intestinal surgery opd
Gastro intestinal surgery opdGastro intestinal surgery opd
Gastro intestinal surgery opd
 
Communication Skills in High-Stake Environment
Communication Skills in High-Stake EnvironmentCommunication Skills in High-Stake Environment
Communication Skills in High-Stake Environment
 
Property Times May 2015
Property Times May 2015Property Times May 2015
Property Times May 2015
 
Property Times eMagazine July 2014
Property Times eMagazine July 2014Property Times eMagazine July 2014
Property Times eMagazine July 2014
 
Emergency sonography. Empowering resuscitation
Emergency sonography. Empowering resuscitation   Emergency sonography. Empowering resuscitation
Emergency sonography. Empowering resuscitation
 
Property Times eMagazine February 2015
Property Times eMagazine February 2015Property Times eMagazine February 2015
Property Times eMagazine February 2015
 
1 s2.0-s0016236111006958-main
1 s2.0-s0016236111006958-main1 s2.0-s0016236111006958-main
1 s2.0-s0016236111006958-main
 
chuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minh
chuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minhchuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minh
chuyên dịch vụ giúp việc văn phòng cao cấp ở hồ chí minh
 
chuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gòn
chuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gònchuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gòn
chuyên dịch vụ giúp việc gia đình chuyên nghiệp sài gòn
 
GBM--multicentric (1)
GBM--multicentric (1)GBM--multicentric (1)
GBM--multicentric (1)
 
Property Times eMagazine march 2015
Property Times eMagazine march 2015Property Times eMagazine march 2015
Property Times eMagazine march 2015
 
Rencontres de Biarritz 2016 - Le Programme
Rencontres de Biarritz 2016 - Le ProgrammeRencontres de Biarritz 2016 - Le Programme
Rencontres de Biarritz 2016 - Le Programme
 
CREATING AN ULTRASOUND TEAM
CREATING AN ULTRASOUND TEAMCREATING AN ULTRASOUND TEAM
CREATING AN ULTRASOUND TEAM
 
Refleksi etika professioanal
Refleksi etika professioanalRefleksi etika professioanal
Refleksi etika professioanal
 
Paediatric medicine opd workflow(1)
Paediatric medicine opd workflow(1)Paediatric medicine opd workflow(1)
Paediatric medicine opd workflow(1)
 
Heiko___Conrad
Heiko___ConradHeiko___Conrad
Heiko___Conrad
 
chuyên dịch vụ giúp việc theo tháng cao cấp sài gòn
chuyên dịch vụ giúp việc theo tháng cao cấp sài gònchuyên dịch vụ giúp việc theo tháng cao cấp sài gòn
chuyên dịch vụ giúp việc theo tháng cao cấp sài gòn
 
chuyên dịch vụ giúp việc quận phú nhuận tại tphcm
chuyên dịch vụ giúp việc quận phú nhuận tại tphcmchuyên dịch vụ giúp việc quận phú nhuận tại tphcm
chuyên dịch vụ giúp việc quận phú nhuận tại tphcm
 
Akuntansi usaha mikro (2013 trw+or)
Akuntansi usaha mikro (2013 trw+or)Akuntansi usaha mikro (2013 trw+or)
Akuntansi usaha mikro (2013 trw+or)
 
Property Times eMagazine January2015
Property Times eMagazine January2015 Property Times eMagazine January2015
Property Times eMagazine January2015
 

Similar to Os final project

Building Images
Building ImagesBuilding Images
Building Images
Dawood M.S
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
QUONTRASOLUTIONS
 

Similar to Os final project (20)

How we use Twisted in Launchpad
How we use Twisted in LaunchpadHow we use Twisted in Launchpad
How we use Twisted in Launchpad
 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons Learned
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
 
Rethinking the debugger
Rethinking the debuggerRethinking the debugger
Rethinking the debugger
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Building Images
Building ImagesBuilding Images
Building Images
 
Inside the Chef Push Jobs Service - ChefConf 2015
Inside the Chef Push Jobs Service - ChefConf 2015 Inside the Chef Push Jobs Service - ChefConf 2015
Inside the Chef Push Jobs Service - ChefConf 2015
 
Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015
 
Training Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a ProTraining Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a Pro
 
MULTI-THREADING in python appalication.pptx
MULTI-THREADING in python appalication.pptxMULTI-THREADING in python appalication.pptx
MULTI-THREADING in python appalication.pptx
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
 
A Peek into TFRT
A Peek into TFRTA Peek into TFRT
A Peek into TFRT
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Redis Day Keynote Salvatore Sanfillipo Redis Labs
Redis Day Keynote Salvatore Sanfillipo Redis LabsRedis Day Keynote Salvatore Sanfillipo Redis Labs
Redis Day Keynote Salvatore Sanfillipo Redis Labs
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
Queick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for PythonQueick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for Python
 

Recently uploaded

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Recently uploaded (20)

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 

Os final project

  • 2. Patterns • Reactor • Singleton • Interpreter • Factory • Builder
  • 3. Shell Reactor • main function • while loop, terminates when user enters “exit” • Sends user input command to parser
  • 4. ShellParser • Splits up each word in the passed string based off of “ “ character. • Pushes into a vector of strings. • Also controls things such whether process will run in background, piping, output. • Creates a new job from command. • T
  • 5. Job • Factory • makeJob() makes a new process from the commands • launch() launches the process in job once they are made • Job sets up piping for multiple process
  • 6. Process • With each process, a new process object is created. • The process is then forked and exec’ed • Output is printed to terminal
  • 7. Shell • Singleton Pattern- only one instance • Holds a lot of the variables we need to keep global such as our command vector and terminal process id • Mostly consists of accessor methods
  • 8. Shell Commands • ls - lists all files in the directory • cd - changes directory • dirs - outputs current directory path • exec - execs a process, then quits • wait - waits for a process to finish based off of its pid • help - displays a small help menu with valid commands
  • 9. Some Challenges • Piping- it took some time to figure out job management that allowed us to pipe. • Parsing Special Characters- size_t overflow due to npos being values as “-1” • Testing- Finding good use cases to test each feature as it was implemented.