DOC PREVIEW
UMD CMSC 412 - Lecture Slides

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CMSC412Project 0Administriviahttp://www.cs.umd.edu/class/fall2009/cmsc412/CSIC 2118, MW 9:00-9:50 / 10:00-10:50John Silberholz ([email protected])Calvin Grunewald ([email protected])TAs−Bo Han ([email protected])−Vasilieos Lekakis ([email protected])Why are we here?To get you started on the project and answer your questionsGive you background materialShow you how the concepts you learn in lecture apply to GeekOSCome with questionsWhy are operating systems such a big deal?Semester ProjectParallel to lectureLots of code−Heavily commented−Read it!Use the forum−Quickest way to get questions answeredCome to recitation with questionsThese projects are challenging, but funBest advice for successStart early−Seriously−No, for realGetting StartedGetting the source−svn co https://svn.cs.umd.edu/repos/geekos/project0−Uname: “sv-geekosro”; passwd: “”Setup instructions are on the website:−QEMU, Compilers, DebuggersLinux, Mac, and LinuxlabCygwin−GeekOS buildGeekOS Emulation EnvironmentGeekOSQEMU (Hardware emulator)Linux/MacReal HardwareProject 0Project requirements−Resource restrictions on GeekOS processes:# of active processes# of syscalls by a single processSystem callsSoftware interrupt−The only interrupt callable from user level: idt.c Init_IDT−SYSCALL_INT: 0x90Operation: syscall.h; syscall.c; libc/process.c−Put args in registers on user side; raise INT−Recover them on kernel side−Call the appropriate Sys_xxxx−Return result/error code in appropriate registerUse g_CurrentThread for information about who raised itThreadsEach thread is a Kernel_Thread object: kthread.hCurrent thread: g_CurrentThread (global)User mode threads−Kernel_Thread with a populated User_ContextTransfer from user to kernel mode: syscallKernel vs. user memory−One from user view and one from kernel−Kernel needs to access user memory (but not vice versa!)−Use Copy_From_User/Copy_To_UserThe system queuesThread_Queue structureRun Queue:−Threads which are ready to run, but not currently running−GeekOS has one run queue (for now.....)Wait Queues:−Threads that are waiting for a specific event or on a specific device (keyboard/network/other threads)−geekos/kthread.c Join()−Follow Get_Key syscall to see how the thread gets in the keyboard wait queueInterruptsTypes:−Illegal operations (result in kills)−Faults (like page faults; not of concern now)−Hardware interrupts−Software interrupts (traps): syscall intInterrupt handlers−geekos/int.c−On completion control returns to the thread that was interruptedInterruptsWhen you don't want them:−When modifying global structures, queues, etc.−When you want an atomic operation−Disable_Interrupts() / Enable_Interrupts()include/geekos/int.hUse caution (interrupt state dependent)Enable_Interrupts() when finishedSee examples: src/geekos/user.c: Attach_User_Context()−Begin_Int_Atomic() / End_Int_AtomicOblivious way of saving and restoring interrupt


View Full Document

UMD CMSC 412 - Lecture Slides

Documents in this Course
Security

Security

65 pages

Deadlocks

Deadlocks

22 pages

Set 2

Set 2

70 pages

Project 2

Project 2

21 pages

Load more
Download Lecture Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?