1 / 17

Last Lab

CSCI 156. Last Lab. Project 5. Not nearly as easy as it looks (esp. part B) A small problem can require reboot Backup your source! Plan extensively: not just write, test, write, test Cannot just use a while loop, as stated in proj. description

caelan
Download Presentation

Last Lab

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCI 156 Last Lab

  2. Project 5 • Not nearly as easy as it looks (esp. part B) • A small problem can require reboot • Backup your source! • Plan extensively: not just write, test, write, test • Cannot just use a while loop, as stated in proj. description • Must use a wait-queue and kernel functions to manage it: • 2 queues: 1 for processes waiting to write, 1 waiting to read • 2 static globals: 1 “okToRead”, 1 “okToWrite” • 1 static global: currentBufLen • When using cat, it will call “read” until “read” returns 0

  3. Project 5 int i, is_sig; while (Already_Open) { is_sig = 0; wait_event_interruptible(WaitQ, !Already_Open); for (i = 0; i < _NSIG_WORDS && !is_sig; i++) { is_sig = current->pending.signal.sig[i] & ~current->blocked.sig[i]; } if (is_sig) { module_put(THIS_MODULE); return -EINTR; } }

  4. Project 5 //global, at the top: DECLARE_WAIT_QUEUE_HEAD(WaitQ); //in a function: wake_up(&WaitQ);

  5. Quiz! • Oh, how underhanded of me.

  6. Overview • What did we learn? • Linux filesystem: navigation, structure • C programming language: memory allocation, structures, networking, input routines, IPC • Multiple Processes, Multiple Threads • Security: Buffer Overflows • Linux kernel: configuring, building, module creation, device driver

  7. Beer • Beer quotes: • "Beer is proof that God loves us and wants us to be happy.“ - Benjamin Franklin • "He was a wise man who invented beer.“ – Plato • "All right, brain, I don't like you and you don't like me - so let's just do this and I'll get back to killing you with beer.“ - Homer Simpson • "Give me a woman who loves beer and I will conquer the world.“ - Kaiser Welhelm • "24 hours in a day, 24 beers in a case. Coincidence? I think not.“ - Paul Newman • “Without question, the greatest invention in the history of mankind is beer. Oh, I grant you the wheel was also a fine invention, but the wheel does not go nearly as well with pizza.” - Dave Barry

  8. Brewing Process • Malt the grains (done by malting company, not brewer) • Mill the grains (crush them so water can get in) • Mash and sparge the grains to extract the wort • Boil the wort (60 minutes+), add hops during • Chill the boiled wort to ~65-75 degrees • Add yeast, ferment for 1-2 weeks • Add priming sugar, bottle, wait 1-2 weeks to carbonate • Enjoy!

  9. Mashing • Used in all-grain brewing (as opposed to extract) • Mix grist (milled/crushed grains) with hot water • Tricks the grains into converting starch to sugar • Breaks down proteins: less haze • Different mash methods • Infusion: single temperature (145-158), rest for 1-2 hours • Step: several “steps” of increasing temp to get enzyme action • Decoction: old-world style, has steps by removing and boiling • Infusion is easy and quick, Step and Decoction are slower and harder, but give better starch conversion rates (enzymes’ optimal temperature). Decoction better for some darker styles: gives deeper color, richer caramel flavor.

  10. Sparging • Rinsing the draff (spent grains) to extract all residual sugars • Wort becomes clearer, less cloudy, more concentrated

  11. The Boil • Has many functions: • Destroy enzymes in the wort • Sterilize the wort • Allows bad chemical compounds to precipitate (DiMethylSulfide) • Hop flavor and aroma are extracted • Concentrates the wort by reducing volume • Clarfiy the wort by coagulating proteins

  12. Hops • In the past, many herbs were used to help preserve beer: hops became the eventual standard. In large amounts, was used to preserve beer to be sent to English troops in India (IPA). • Only the female plant is used: cones/flowers of the plant contain alpha acids (humulone) that isomerize during the boil: bitter resins and aromatic oil are extracted • Noble (aromatic) – Hallertau, Saaz, Golding, Fuggle • High Alpha (bittering) – Chinook, Nugget • Whole Leaves – bulky, instable, but best for aroma • Or Pellets – smaller, keep longer • Or Extract Oil – used mainly by big breweries • AAU – units of bitterness, used in recipes

  13. Yeast • Yeast strains contribute greatly to the character of the finished beer: hundreds of choices • Ale Yeast (top-fermenting, generally best at 65-75 degrees) • Lager Yeast (bottom-fermenting, best at 40-55) • Spontaneous Fermentation (Lambic) • Many belgian breweries fiercely guard their yeast strain (Rodenbach vs De Dolle) • Advanced homebrewers often experiment with cultivating their own yeast strains or harvesting yeasts from commercial brands • Overall process: respiration, fermentation (tons o' chemistry) • Yeast + Sugar + Oxygen -> CO2 + alcohol • Need an airlock!

  14. Water • Brewing water can affect flavor, yeast health, and malt extraction • Ions in water are good (distilled water = bad), but in controlled amounts • Chlorine causes chlorophenols that give off-flavors • Many metallic ions are good for yeast health in very small amts, but can kill the yeast if too much • Get tap water analyzed, or ask municipal water supplier • Many methods to control ions: • 30 min boil – kills bacteria, removes chlorine, most carbonates, etc • Ion supplements – add salts/acids to adjust pH • Carbon filter (e.g. Brita) – removes chlorine, leaves other ions alone

  15. Styles • American Lager - piss-beer • Pilsener - light color, dry lager with pungent hoppy aroma – Saaz • Pale Ale - amber/copper color, medium bitterness, lower carbonation • IPA - higher alcohol (6+?), very bitter hop character • Oktoberfest (Marzen) - malty amber ale, around 6% alc, low hop • Weisse/Wheat - mild color, usually cloudy and moderate alc • Bock - strong german style (>6%), usually dark and malty • Doppelbock - “Double” bock, richer, maltier, and usually 8+%. -ator • Rauchbier - smoked beer (tastes bacon-y), normal alc, brownish color • Porter - English dark, but lighter body than stout, usually sweeter. ~5% • Stout - English sweet stout - ~4% alc, Irish dry stout, ~5% • Imperial Stout - dry, very high alc (8+%). Sent to Ruskies • Scotch Ale - very malty, roasted flavor, around 5-7% • Barley Wine - huge malty, fruity flavor and aroma, typically ~10% • Reinheitsgebot, German Purity Law of 1516. Barley, Hops, H20, Yeast

  16. Belgian Styles • Belgian beer is the bomb • Trappists (Westmalle, Westvleteren, Chimay, Rochefort, Orval, Achel) • Tripel - Strongest (8+%), usually pale and spicy • Dubbel - usually dark brown, 6-8%, very malty and floral • Brown/Red Ales - very sour, from Flanders, some are old/new blends • Witbier - citrusy, spicy, white belgian style • Saison - farmhouse brewing, typically spicy and a little tart • Lambic - Spontaneously fermented, sour, low bitter • Gueuze is usually a mix of old/young lambic: champagne-ish carbonation • Kriek (cherry), Framboise (raspberry), Peche (peach), Cassis (blackcurrant) • Belgian Glassware - each beer has its own distinct glass (kwak, etc) to give optimal aroma for the style (and, of course, for marketing) • Each style has own pouring guidelines, amount of head

  17. Whew • Go forth and have a good beer

More Related