CSE506:Opera.ngSystems
WelcometoCSE506Introduc)on&Review
DonPorter
1
CSE506:Opera.ngSystems
WhyGradOS?• PrimaryGoal:Demys)fyhowcomputerswork
2
CSE506:Opera.ngSystems
Anexampleprogression• UndergradOS:– High-levelunderstandingofpaging– Theore)calissueslikefragmenta)on
• GradOS(506):Buildapager– SolidunderstandingofhowpagingSW+HWwork
• AdvancedGradOS(624):Readnovelresearchpapers– Docrea)vethingswithpaging:virtualiza)on,security,etc
3
CSE506:Opera.ngSystems
506:Learnbydoing• YouwillwritemajorchunksofyourownOS– Memorymanagement,contextswitching,scheduler,filesystem,IPC,networkdriver,shell,etc.
– Linuxscheduler:• Difficulttounderstandjustbyreadingsource• Smallmodifica)onsrequirefirstunderstandingthecode• Impossibletoreplace/reimplement
– Nosubs)tuteforbuildingityourself!
4
CSE506:Opera.ngSystems
Alogicalviewofhardware
CPU(s) RAM PCI-XBus
PCIBusSATABIOS
NorthBridge(Fastdevices:e.g.,GPU)
SouthBridge(“Slow”Devices:e.g.,Disk,USB,Mostnetwork)
5
CSE506:Opera.ngSystems
FewerBridges• Newersystemorganiza)onsaremovingmoredevicestotheNorthbridge,andconsolida)ngmorethingsontheCPUitself.
6
CSE506:Opera.ngSystems
AlogicalviewoftheOS
MemoryManagement
CPUScheduler
User
Kernel
Hardware
BinaryFormats
Consistency
SystemCalls
Interrupts Disk Net
RCU FileSystem
DeviceDrivers
Networking Sync
MemoryAllocators Threads
7
CSE506:Opera.ngSystems
Labs,cont.• Thiscourseiscodingintensive– YoushouldknowC,orbepreparedtoremediatequickly– Youwilllearnbasic,inlinex86assembly– Youmustlearnonyourown/withlabpartner
• Thelabisdifficult,butworthwhile– Youwillwanttocommemorate,withaT-shirt,tajoo,etc.
8
CSE506:Opera.ngSystems
JOS• DevelopedatMIT,usedatseveraltopschools– The“J”isforJoshCates,notJava
• InCandAssembly,bootsonrealPChardware– Yougettheskeletoncode,fillininteres)ngpieces
• Buildtherightintui)onsaboutrealOSes– butwithmuchsimplercode
9
CSE506:Opera.ngSystems
JOS64• Youwillactuallyimplementa64-bitvariantofJOS• DevelopedatStonyBrook!– PrimarilybyAmitAryaandAbhinandPalicherla– Contribu)onsalsoby:VivekKulkarni,VarunAgarwal,Chia-CheTsai,TaoZhang,SagarTrehan,JiahongHuang…• Someofthesefinalprojectsorjustcontribu)onsfromaprevious506course
• Seeyournameherenextyearifyouaddapar)cularlyusefulfeature!
10
CSE506:Opera.ngSystems
JOSLabs
MemoryManagement
CPUScheduler
User
Kernel
Hardware
BinaryFormats
Consistency
SystemCalls
Interrupts Disk Net
RCU FileSystem
DeviceDrivers
Networking Sync
MemoryAllocators Threads
2
3
4
5
6
11
CSE506:Opera.ngSystems
Lab6• 3Op)ons
1) Networkdevicedriver(guidedassignment)2) MakeJOSahypervisor(guidedassignment)3) Open-endedproject
• AddasignificantfeaturetoJOS• Aresearchtaskonanothersystem
12
CSE506:Opera.ngSystems
ChallengeProblems• Eachlabincludeschallengeproblems,whichyoumaycompleteforbonuspoints(generally5—10pointsoutof100)– Unwisetoturninalablatetodochallengeproblems– Cancompletechallengeproblemsatanypointinthesemester---evenonoldlabs
• Indicateanychallengeproblemscompletedinchallenge.txtfile
13
CSE506:Opera.ngSystems
CSE522• ThiscoursecanalsocountasyourMSprojectcourse(CSE522)
• Requirements:Sameas506,except:– Youmustdothelabsalone– Youmustcomplete1challengeproblemineachlab
14
CSE506:Opera.ngSystems
NoTextbook• You’rewelcome• Severalrecommendedtexts– SeveralfreeonSBUsafarionlinesite– Othersonreserveatlibrary– Requiredreadingswillmainlybepapersyoucanprintout
15
CSE506:Opera.ngSystems
Lectures• CompareandcontrastJOSwithreal-worldOSes– MostlyLinux,someWindowsorOSX,FreeBSD,etc.
• Supplementbackgroundonhardwareprogramming– Commoneduca)onalgapbetweenOSandarchitecture
16
CSE506:Opera.ngSystems
MyLectureStyle• Ilikepar)cipa)onandques)ons• Icanexplainanyconceptinmanyways,andexplainmissingbackgroundonthefly– …butIcan’treadyourmind---Ineedtoknowifyoudon’tunderstandsomething!
17
CSE506:Opera.ngSystems
SBUCapture• Experiment:TLTwillberecordingtheprojec)onandaudio(novideoofme,sadly)– Recordingswillbeautoma)callypostedtoBlackBoard– Intendedtohelpyoustudy– EspeciallyhelpfulforpeoplewithoutstrongEnglish
• Thisisbesteffort– Noguaranteealllectureswillberecorded
• Thisisnosubs.tuteforlectureaBendance– Can’taskques)ons
• IfaBendancesuffers,Iwillstoprecordinglectures
18
CSE506:Opera.ngSystems
GuestLectures• Seniorgraduatestudentswillgivesomelecturestogainteachingexperience– Includingtoday!
• ProfessorPorterwillreviewandcri)queguestlectures(inpersonorrecorded)withguests
• Please:– Askques)onsifsomethingisunclear:inclassoronpiazza– GiveProf.Portercommentsonguests(andhislectures)---posi)veandnega)ve
19
CSE506:Opera.ngSystems
Prerequisites• UndergradOS– Insomecases,industryexperienceisok– Worthbrushingupifithasbeenawhile– In-classquiz,duebeforeyouleave
• Ifyoucan’tanswer50%oftheseques)ons,considerugradOS
• Cprogramming• BasicUnixcommand-lineproficiency• SeemeifyouhavealreadydonetheJOSlab,orsimilar
20
CSE506:Opera.ngSystems
Piazza• Thisistheprimaryannouncementmedium• Andfordiscussionsaboutcoursework– Donotpostcodehereorothersolu)ons– Goal:Everyonecanlearnfromgeneralques)ons
• Materialdiscussedonpiazzacanbeanexamques)on
• Detailsforpiazzaforumareonthecoursewebsite
21
CSE506:Opera.ngSystems
Otheradministra)venotes• Readsyllabuscompletely• 2examscover:lectures,labs,mailinglist• EverystudentwillgetaVMforlabwork– Youmayuseyourowncomputer,staffcan’tsupportit
• [email protected]– Exceptprivateissuesforinstructoronly
22
CSE506:Opera.ngSystems
VMAssignments• YourVMiscse506-USER,whereUSERisyourne)d• EachVMishostedontheserveresx1sc---esx4sc– Youshouldreceiveanemailwithyourserverandini)alpassword
• Theaccountiscse506• Onceitispoweredon,itwilllistenforsshonport130
• Changethepasswordimmediately• Also,checkpointyourVMbeforeyouchangethings
23
CSE506:Opera.ngSystems
LabPartners• Canworkalone,butbejerwithhelp– SomeexcellentstudentsearnedA’sworkingalone– ManygoodstudentsearnedB’sworkingalone– Noneedtobeahero
• Chooseyourownpartners– Labmailinglistgoodforfindingthem
• Sameforen)recourse– Changesonlywithinstructorpermission
24
CSE506:Opera.ngSystems
ToDo• Emailmeyourpartnerselec)on• Wewillthencreatethegitrepositoryyouwillusetoturninyourassignments
• Inthemean)me,clonetheread-only,hjprepositorytogetstarted
• Pleasedothiswellinadvanceofthedeadline
25
CSE506:Opera.ngSystems
AcademicIntegrity• Itakechea)ngveryseriously.Itcanendyourcareer.• Inagrayarea,itisyourjobtostayonrightsideofline
• Nevershowyourcodetoanyoneexceptyourpartnerandcoursestaff
• Neverlookatanyoneelse’scode(incl.otheruniversi)es)
• Donotdiscusscode;donotdebugeachother’scode• Acknowledgestudentsthatgiveyougoodideas
26
CSE506:Opera.ngSystems
IntegrityHomework• Exercisesapplyingcoursepoliciesandethicstoseveralsitua)ons
• Dueinclass2/11
27
CSE506:Opera.ngSystems
Lateness• Eachgroupgets72latehours– Listhowmanyyouuseinslack.txt– Eachdayaxerthesearegonecostsafulllejergradeontheassignment
• Itisyourresponsibilitytousethesetomanage:– Holidays,weddings,researchdeadlines,conferencetravel,Buffymarathons,releaseofthenextZeldagame,etc.
• 3Excep)ons:illness(needdoctor’snote),deathinimmediatefamily,accommoda)onfordisability
28
CSE506:Opera.ngSystems
Lab1assigned(soon)• DueFriday,2/19at11:59pm,eastern.• Instruc)onsonwebsite• Quickdemo
29
CSE506:Opera.ngSystems
Geznghelp• TA’s(TBD)willkeepofficehours• Instructorkeepsofficehours– Notethat“byappointment”meansmore)meavailableondemand
30
CSE506:Opera.ngSystems
Ques)ons?
31