6 Pages

The Open File Table

Course: CS 252, Fall 2011
School: Purdue
Rating:
 
 
 
 
 

Word Count: 308

Document Preview

Open The File Table The process table also has a list with all the files that are opened Each open file descriptor entry contain a pointer to an open file object that contains all the information about the open file. Both the Open File Table and the Open File Objects are stored in the kernel. The Open File Table The system calls like write/read refer to the open files with an integer value called file...

Register Now

Unformatted Document Excerpt

Coursehero >> Indiana >> Purdue >> CS 252

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Open The File Table The process table also has a list with all the files that are opened Each open file descriptor entry contain a pointer to an open file object that contains all the information about the open file. Both the Open File Table and the Open File Objects are stored in the kernel. The Open File Table The system calls like write/read refer to the open files with an integer value called file descriptor or fd that is an index into the table. The maximum number of files descriptor per process is 32 by default but but it can be changed with the command ulimit up to 1024. The Open File Table Open File Table 0 1 2 3 4 . . 31 Open File Object I-NODE Open Mode Offset Reference Count Open File Object An Open File Object contains the state of an open file. I-Node Major number Determines the devices It uniquely identifies a file in the computer. An I-nodes is made of two parts: Minor number determines It what file it refers to inside the device. Open Mode How the file was opened: Read Only Read Write Append Open File Object Offset The next read or write operation will start at this offset in the file. Each read/write operation increases the offset by the number of bytes read/written. Reference Count It is increased by the number of file descriptors that point to this Open File Object. When the reference count reaches 0 the Open File Object is removed. The reference count is initially 1 and it is increased after fork() or calls like dup and dup2. Default Open Files When a process is created, there are three files opened by default: 0 Default Standard Input 1 Default Standard Output 2 Default Standard Error Write(1, Hello, 5) Sends Hello to stdout Write(2, Hello, 5) Sends Hello to stderr Stdin, stdout, and stderr are inherited from the parent process.
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Purdue - CS - 252
The open() system callint open(filename, mode, [permissions]),It opens the file in filename using the permissionsin mode.Mode:O_RDONLY, O_WRONLY, O_RDWR, O_CREAT,O_APPEND, O_TRUNCO_CREAT If the file does not exist, the file iscreated.Use the permi
Purdue - CS - 252
The UNIX File SystemUNIX File SystemUNIX has a hierarchical File SystemImportant directories/ - Root Directory/etc OS Configuration files/etc/passwd User information/etc/groups Group information/etc/inetd.conf Configuration of Internet(deamons)S
Purdue - CS - 252
The UNIX Operating SystemWhat is an Operating SystemAn Operating System (OS) is a program that sitsin between the hardware and the user programs.It provides:Multitasking - Multiple processes running in the samecomputerMultiuser - Multiple users usi
Purdue - CS - 252
Threads and ForkThe behavior of fork() changesdepending on the flavor of threads youuse.When fork() is called, threads createdwith pthread_create() are not duplicatedexcept if it is the thread calling fork().In Solaris threads created withthr_crea
Purdue - CS - 252
Threads and ThreadSynchronizationIntroduction to ThreadsA thread is a path executionBy default, a C/C+ program has one threadcalled "main thread" that starts the main()function.main()-printf( "hello\n" );-Introduction to ThreadsYou can create m
Purdue - CS - 252
Types of Server ConcurrencyIterative ServerFork Process After RequestCreate New Thread After RequestPool of ThreadsPool of ProcessesIterative Servervoid iterativeServer( int masterSocket) cfw_while (1) cfw_int slaveSocket =accept(masterSocket,&s
Purdue - CS - 252
User and System Time in MTprogramsCommand time givesSystem Time = Time spent in Kernel modeUser Time = Time spent in user modeReal Time = wall clock time.In a single processor machineUser time + system time < Real timeWhy? Overhead of other progra
Purdue - CS - 252
User Mode, Kernel Mode,Iterrupts and System CallsComputer Architecture ReviewMost modern computers use the VonNewman Architecture where bothprograms and data are stored in RAM.A computer has an address bus and adata bus that are used to transfer da
Purdue - CS - 252
Using a DebuggerWhat is GDBGDB is a debugger that helps you debugyour program.The time you spend now learning gdb willsave you days of debugging time.A debugger will make a good programmera better programmer.Compiling a program for gdbYou need to
Purdue - CS - 252
Using an IDE for DevelopmentUnix System Programmingand The Shell ProjectUNIX OrganizationUNIX has multiple componentsScheduler Schedules processesFile System Provides storageVirtual Memory - Allows each process to haveits own address spaceNetwork
Purdue - CS - 252
Virtual Machines (VM)A VM is a virtual machine running in aphysical computer.More than one VM can run simultaneously inthe same machine.VMs work well because machines are nowtoo fast and underused.It allows to snapshot in a file of an OStogether w
Purdue - CS - 252
Wildcards and Hidden FilesIn UNIX invisible files start with . like .login,.bashrc etc.In these files that start with ., the . should notbe matched with a wildcard.For example echo * will not display . and .To do this, you will add a filename that s
Miami University - COM - 354*
Ch 3: Politics Influence on MediaRegulationsBroadcast liscenseHow long advertisments areDay time/prime timeDistributionProductionLabor lawsFin-syn (1970-1993)Regulted ownership issuesNetworks that distributed TV werent allowed to produce alsoGo
Miami University - COM - 339
Ch 3: Four Perspectives on Organizations & CommunicationTheory can be anything from simple ideas to formal systems of hypotheses that aim toexplain, predict, and controlHistorical: product of time in which it emerged, reflecting the cultureMetaphotica
Miami University - COM - 437*
Propaganda TechniquesWord gamesName-callingsneaky Japscowardsbreeders/homosderogatory slanghatersbaby killersLabelingLabeling people, groups, institutions, in a negative mannerAxis of EvilRight wing (Republican) or left wing (Democrat)Sociali
Miami University - FIN - 301
Chapter6InterestRates15:35Nominal(QuotedorStatedInterestRates)INomthecontracted/statedrate;theratethatcreditcardcompanies,studentloan officers,autodealerstellyoutheyarechargingonloansnotthetrueratethatrequires monthlypaymentsandotherquarterlypayments
University of Florida - ANT - 2410
19:058/24/11CulturalAnthro:Lecture1WhatisAnthropology?HowdoAnthropologistsdowhattheydo?HowdoesAnthropologycomparetootherdisciplines?MakingSenseofBeingHumanWheredowecomefrom?Whyarewesoradicallydifferentfromsomeanimalsandsosurprisinglysimilarto oth
University of Florida - FOS 2001 - 2001
Mans FoodLesson 1:Objectives:Examine the leading causes of illness and death in the United States.Explore how habits affect health.Review the quantitative aspect of nutrition.Discover nutritional status terminology and food labelingrecommendations.
University of Florida - FOS 2001 - 2001
Mans Food Module 2Lesson 6Water TerminologyIntracellular Fluid Compartment- fluid located inside your cellsExtracellular Fluid Compartment- fluid located outside your cellsInterstitial Fluid- fluid located between your cellsElectrolytes- Charged ion
University of Florida - FOS 2001 - 2001
Mans Food Module 3- The micronutrientsLesson 10- VitaminsWhat are Vitamins?Tasteless organic compounds. Non-caloric. Body cannot make themso we get them from our diet Called micronutrients because they perform their functions in verysmall amounts 1
University of Florida - LIN 2000 - 2000
1. Exposure Problem- Contributes to language death. If one is not exposed to alanguage they will not absorb it.Reasons of Language Death: Death of all speakers, changes in ecology oflanguage, culture contact and clash, economic influence. Languages can
University of Florida - LIN 2000 - 2000
Key TermsThe quiz includes material from in-class lecture, R&H textbook readings: 52, 3, 8, 56,41, 55, 18, 16; the Aitcheson course pack reading; and the supplemental audiointerview on linguistic relativity and the basic phonetics lesson (supplemental
University of Florida - LIN 2000 - 2000
Term 4 (Quiz #3)Key Terms1. *Influences (British, African, French, Yiddish, etc.) on and examples of variousAmerican dialects that were studied- British: English, Also contributed to SouthernDialect due to Southern Children going to boarding school in
Miami University - MKT - 291
NIKEnergySamantha Zid & Yang YangMKT 291 Section MAThursdays 7:15-91It seems like Nike cant do anything wrong in this day and age. When looking atsporting products its impossible not to figure Nike into the mix. The company hasendorsed the best of
Miami University - MKT - 291
Nikes next big move into thesporting worldNIKEnergyNikes Next Big Thing Nike= Gold Majorsporting good company Everybodyneeds to be hydrated Nike is stepping up to the plate NIKEnergyis THE next big thingCompany Background "Tobring inspirati
Miami University - MKT - 291
IMPORTANT COPYRIGHT NOTICEThe material in each Study.Net TEXTPAK is produced for the sole use of a unique,authorized student user. All content in this Study.Net TEXTPAK corresponds to materialassociated with a specific identified Study.Net course at a
Miami University - MKT - 291
Samantha ZidMKT 291, Ms. Cynthia Walsh11/4/2010Case AnalysisTwitter, Tweeting, TweetsIts hard to imagine a world without google, Facebook, and Twitter. Today we arewired so that we can be in constant communication with anyone we want to be across th
Miami University - MGT - 415
"When all think alike, then no one is thinking." Walter LippmanIntroductionThroughout the fall semester of my senior year at Miami University I havecontinuously been encouraged to think outside of the regular parameters of a typicaleducation frame of
Miami University - MGT - 415
India:HinduismAnaZ,ElleR,BobbyF,TimelinenIndusValleyCivilization(2500BC1500BC)nReligionoftheVedas(1500BCto500BC)nClassicalHinduism(500BC800CE)nMedievalHinduism(800CEto1900CE)nHinduismintheModernWorld(1900CEToday)OverviewnMultiplicityofGods,
Miami University - MGT - 415
"While strategy and tactics change all the time, the fundamentals of leadership do not.Leadership is a matter of how to be, not how to do." (Leader-to-Leader Institute, 2004, p. 25).MGT415: LEADERSHIP & LEARNINGDr. David Cowan 3067 FSB 529-3689 Office
Miami University - MGT - 415
PART 1Medina: structure and employment of attentionWithout attention, a leader cannot lead. The firststep that must be taken to gain attention is there must be an emotional catch; leaders have to draw theiraudience in to be effective. One must also es
Miami University - MGT - 415
Leader-to-leader Institute: beyond doing & knowing to being There are threecomponents to being a leader and can be summer up in in three simple words: be, know,and do. Leaders are people who are honest, competent, forward-looking, and inspiring.Interpe
Miami University - MGT - 415
Chrissy Berdelle, Ana Zawacki, & Samantha ZidMGT 415, Dr. CowanFall 2011TORY BURCH1. Backgrounda. Forbes video: clip about Tory Burchs fast growth and success in the retailindustryb. Tory Burch was born in Valley Forge, PA and attended school at th
Miami University - MGT - 415
Tory BurchThere are no rules aboutwhat you can and cant doanymore. Its aboutBackgroundhttp:/video.forbes.com/fvn/forbeswoman/tory-burchfoundationTory Burch was born in Valley Forge, PA and attendedschool at the University of PennsylvaniaMoved to N
Miami University - PSY - 410f
Samantha ZidPSY 410F, Dr. PalladinoSpring 2012Perspectives on humor: Disabilities and Humor1. Kathy Buckley: Kathy was my favorite comedian we watched in class. I am notthe biggest fan of stand up comedy and whenever she was on she had me laughingun
Miami University - PSY - 410f
Samantha ZidPSY 410F, Dr. PalladinoSpring Semester 2012The Funnies of my Weekend1. On Saturday morning I woke up to loud noises. Some of our guy friends came overdressed up in weird outfits (one in a clown suit) and woke us up at 9:30am byscreaming
Miami University - PSY - 410f
Samantha ZidPSY 410F1/15/20126 Examples that humor is Still Important to Mankind1. Rebecca Black: About 6 months ago a video hit youtube that made RebeccaBlack internationally known. The video was emailed, facebooked, and tweetedaround the world as
Miami University - PSY - 410f
Samantha ZidPSY 410F, Dr. Palladino1/10/2012No Humor, No FunWhen we first got the assignment to write about someone who doesnt have asense of humor it was hard for me to think of anyone. I like to think that the people Isurround myself with all have
Miami University - PSY - 410f
16:47YouknowyourefromEvansvilleYourfavoritebeerissteerlingYoustilllivethereYouknowhowtoavoidtheLloydYouhaveeatenpigbrainandknucklesandwichesYoureoverwhelmedbyRobertsstadiumFamilyreunionisduringthefallfestivalYouknowYourhousehasbeenrockedbymorecry
Miami University - BWS - 151
BWS 151: Introduction to Black World StudiesProf. Tammy L. BrownFINAL EXAM ESSAYDUE on Thursday, December 16, 2010 by 11:59PM via Turnitin on BlackboardPlease answer the following essay question. You should fully answer each part of the question inth
Miami University - BWS - 151
Samantha ZidBWS 151, Dr. BrownFinal Exam EssayTuesday, December 14, 2010Cultural BackgroundsDiversity within blackness has come to shape cultures around the world. Thedifferences in backgrounds, cultures and identities of displaced Africans around t
Miami University - BWS - 151
United States Civil Rights MovementJames Farmer of CORE (Congress of Racial Equality)ON THE FREEDOM RIDESI had not dreamed that in a few short weeks a new kind of civil war would rock the nationa war not withoutviolence, but with violence on only one
Miami University - COM - 135
11/8Culture is tied to power and privilegeHistory v. Histories: hidden/lost (losers/were persecuted and stories werent recounted)-Absent: native American groups (languages are dying off)-Hidden: recorded, hidden by dominant society threat-Free Inform
Miami University - COM - 135
How do family relationships, friendships, and romantic relationships affect Organizational Culture? Do theyhelp or harm it?I think that personal relationships are harmful to Organizational Culture. There is no wayto be impartial to those who you know p
Miami University - COM - 135
The secret society of Skulls and Bones dates back to 1832 when a group of menfrom the Phi Beta Kappa fraternity created it to promote a more elite feeling. The grouphas gained wide popularity and national attention but continues to guard its secrets and
Miami University - COM - 135
Introduction to Speech CommunicationUnit 3: Communication in ContextsExam 3 Review Sheet: Chapters 8, 10-12Chapter 10: Communication in Personal Relationships How are relationships of circumstance and relationships of choice different? Circumstance:
Miami University - COM - 135
Introduction to Speech CommunicationUnit 3: Communication in ContextsExam 3 Review Sheet: Part 2Strategic Communication Article, Persuasion Lecture and Chapter 15Strategic Communication (Public Relations) What is strategic communication? A communica
Miami University - COM - 143
Chapter 7: 1, 9, 11-14, 161. How did film go from the novelty stage to the mass medium stage? Thomas Edison developed new technology that enabled films to be seenon big screens Narrative films: movies that tell stories moved films to mass mediumstage
Miami University - COM - 143
1Samantha ZidCom 143, Dr. BeckerMeredith TAdvertisement Analysis10/25/10The Dodge Ram has Supermodels in its BedHow do you get six swimsuit models into your bed? That is a question that every guywho is reading Sports Illustrateds February 2010 swi
Miami University - COM - 143
Blockbusters and Indie FilmsNovember 11, 2010I. The Industry Responds to the CrisisA. DownsizingB. Competing with Television1. Emphasizing Spectacle (Color, 3-D, CinemaScope, Stereo)2. Drive-insC. The Rise of Art House Theaters (Ingmar Bergman, Ken
Miami University - COM - 143
Copyright Control Vs. Free CultureDecember 7, 2010I. Government Control of MediaA. Standard models1. Authoritarian model: those in government create a system of control and censorship2. State model (Pravda): if your going to print media you must get
Miami University - COM - 143
The Art of Making MoviesNovember 3, 2010I. Analyzing the Film IndustryII. Early Development of Film Narrative and TechniquesA. Peep Show Novelties and the Cinema of Attractions1. Kinetoscope parlours2. Examples: The Kiss, Serpentine Dance, Sandow (1
Miami University - COM - 143
Media EconomicsDecember 2, 2010I. Media as a Culture IndustryA. Media as Our Culture:1. Moral beliefs2. Tradition3. National identity4. Social uplift5. Democratic valueB. Media as an Industry (in the U.S.)1. Private: only a few people decide wha
Miami University - COM - 143
COM 143 Group Evaluation SheetUndergraduate Assistant: _Write the name of each group member in a separate column. Rate how each group member complied with the guidelines in the left hand column whileusing a scale of 1-4 (1=strongly disagree; 2=disagree
Miami University - COM - 143
Guest Speaker for Politics in the MediaCNN losing money, even though it is the one news station that is unbiased toliberal or conservative viewsMost people think that the news media tends to be more liberal, but liberals thinkthat there is a rise of c
Miami University - COM - 143
Politics of RepresentationNovember 16, 2011I. Defining Key TermsA. Representation: how does some element of our world get turned into a form of media All representation is relative, but it seems realB. Politicsbattle over the uneven distribution of1
Miami University - COM - 143
PRs PR ProblemsNovember 30, 2011I. Problematic RootsA. Corporate self-interest In order for railroad companies to build their railroads, they had to shape the public opinionB. World War I propaganda Many of the practices and types of PR used today w
Miami University - COM - 143
The Business of Making Movies ThanI. The Studio SystemA. Importance in Film HistoryA. Oligopoly controlB. Vertical integrationII. Productionfactory-like systemA. Centralized locationB. Employment practices1. Division of labor2. Long-term contract
Miami University - COM - 259
Definitions . . .How would you define culture?Culture the total way of life of a group ofpeople, including their beliefs, institutions,and technology.The Center for Public HealthEducation1Definitions . . . Culture- a system of shared values, beli
Miami University - COM - 259
What insight did you gain from the test and what might be the organizational/societal implicationsof these attitudes and/or privileges.I chose to fill out the gender-career IAT survey and my results showed me that Iwas more likely to associate women wi
Miami University - COM - 259
External Media and Media RelationsControlled media include those in whichpractitioners have the say over what is said, how it issaid, when it is said, andto some extentto whom itis said.Uncontrolled media are those over whichpractitioners have no di