cAMP-PKA-Creb signal pathway

cAMP-PKA-Creb signal pathway
cAMP-PKA-Creb signal pathway

The cAMP signalling pathway activates CREB through PKA,

p38and MSK1in NIH 3T3cells

Marit Pedersen Delghandi,Mona Johannessen,Ugo Moens *

Department of Biochemistry,Institute of Medical Biology,University of Troms ?,N-9037Troms ?,Norway

Received 14January 2005;accepted 9February 2005

Available online 16March 2005

Abstract

Cyclic adenosine 3V ,5V -monophosphate (cAMP)was originally shown to induce gene transcription through activation of cAMP-dependent protein kinase (PKA),and subsequent phosphorylation of the transcription factor cAMP response element-binding protein,CREB,at serine-133.However,elevated cAMP levels may activate multiple signalling pathways with protein kinases that can phosphorylate CREB at serine-133.We analysed the pathways involved in CREB phosphorylation and activation in NIH 3T3cells exposed to the cAMP elevating agent forskolin.PKA represented the predominant pathway during the burst phase,while the mitogen-activated protein kinase p38pathway became activated in a PKA-dependent fashion in forskolin treated cells.The phosphorylation kinetics of p38was delayed compared to PKA activation.Activated p38stimulated CREB-mediated transcription and potentiated the transcriptional strength of CREB provoked by forskolin.The p38-mediated activation of CREB was inhibited by dominant negative mutants of MSK-1and by the PKA/MSK-1inhibitor H89,but not by dominant negative mutants of MSK-2/RSK-B and MAPKAPK2.Our results suggest that forskolin-induced CREB phosphorylation and activation in NIH 3T3cells is mediated directly by PKA and by a time-delayed PKA-dependent p38/MSK-1pathway.This bifurcation and time-dependent regulation of the cAMP-responsive signalling pathways may enable the cell to endure and/or enforce a cellular response provoked by a cAMP-elevating stimulus.D 2005Published by Elsevier Inc.

Keywords:CREB;PKA;p38;MSK1;Forskolin;NIH 3T3cells

1.Introduction

It is generally accepted that cyclic adenosine 3V ,5V -mono-phosphate (cAMP)-induced gene transcription is mediated through activation of cAMP-dependent protein kinase or protein kinase A (PKA),and subsequent phosphorylation of the transcription factor cAMP response element-binding protein,CREB.CREB binds the conserved cAMP response element TGACGTCA typically found in the promoter of many cAMP-responsive genes.The bipartite transactivator domain of CREB is involved in basal and signal-inducible transcription activation by CREB.The glutamine-rich,constitutive activation domain (Q2or CAD)interacts with the general transcription factor TAF4(formerly known as TAF II 130/135)and allows recruitment of the RNA polymer-ase II initiation complex.The activity of the kinase-inducible domain (KID)of CREB’s transactivation domain was found to be regulated by PKA,thus forming the missing link in a linear signalling cAMP–PKA–CREB pathway.It was shown that serine residue 133in KID was a unique phosphoacceptor site for PKA in vitro and in vivo,and that phosphorylation of CREB at this residue promotes recruitment of the general co-activator CBP and its paralogue p300.CBP and p300stimulate CREB-mediated transcription through their inter-action with the RNA polymerase II complex and through their intrinsic histon acetyltransferase activity [1–4].

Although correct,cAMP/PKA-dependent phosphorylation of CREB at Ser-133is not the only mechanism that activates CREB-mediated transcription.Ramification of the cAMP pathway contributes to the diversity of signalling pathways that can modulate CREB activity.Indeed,it was originally believed that PKA was the only target for cAMP .However,cAMP was also found to bind and activate the guanine

0898-6568/$-see front matter D 2005Published by Elsevier Inc.doi:10.1016/j.cellsig.2005.02.003

T Corresponding author.Tel.:+4777644622;fax:+4777645350.E-mail address:ugom@fagmed.uit.no (U.Moens).

Cellular Signalling 17(2005)

1343–1351

https://www.360docs.net/doc/149120346.html,/locate/cellsig

nucleotide-exchange factors Epac1and Epac2.These proteins can activate the GTPase Rap1,which in turn binds B-Raf. cAMP-induced activation of Rap1through Epac is clearly independent of PKA[5,6].The B-Raf–Rap1complex has been shown to promote activation of the mitogen-activated protein kinases(MAPK)ERK1/2in different cells and to regulate CREB-dependent gene expression[7–10].ERK1/2can activate mitogen-activated protein kinase activated protein kinases.Some of these,including mitogen and stress-activated kinase1(MSK1),RSK2(also called MAPKAPK1b),and MSK2(=RSK-B)have been shown to phosphorylate CREB at serine133[11–13].Elevated cAMP levels can also activate the p38and the MEK5/ERK5MAPK pathways and CREB has been shown to be a substrate for the p38-regulated MAP-KAPK2and MAPKAPK3[14–16].Although ERK5has been shown to be involved in neurotrophin-induced CREB phos-phorylation[17],a role for MEK5/ERK5in cAMP-induced CREB phosphorylation is missing.Serine133turned out to be a target for protein kinase B(PKB),but the exact signalling pathway that leads to PKB-induced CREB phosphorylation remains unclear[18].Interestingly,cAMP activates PKB through a PI3-K dependent mechanism in a cell-type-specific manner[19–21],opening for an alternative pathway for cAMP-induced CREB phosphorylation.Another target for cAMP are the cyclic-nucleotide-gated ion channels[22].They conduct the release of Ca2+,which may result in stimulation of calmodulin-dependent protein kinases(CaMK)and conven-tional protein kinases C(PKC).Both CaMK and PKC can modulate CREB phosphorylation at ser-133and enhance CREB-mediated transcription,although the exact role of these kinases in CREB phosphorylation remains elusive[1].

The adenylyl cyclase activator forskolin is an extremely valuable tool to study cellular processes in response to increased intracellular cAMP levels[23].Hence,forskolin has often been employed in studies with CREB.Because of the ramification of the cAMP signalling pathway,we wanted to identity which of the cAMP transduction pathways that could mediate forskolin-induced CREB phosphorylation in NIH3T3cells.Our results show that cAMP/PKA is the major pathway explored in forskolin-treated NIH3T3cells,but that PKA may also activate p38,which in turn can phosphorylate and activate CREB through the MAPKAPK MSK1.The PKA-induced activation of the p38-MSK1is delayed compared to the cAMP–PKA activation,suggesting that the former pathway may be used when the cAMP–PKA pathway is attenuated.The cross talk between PKA and p38may allow the cells to prolong the effect of an incoming signal.

2.Material and methods

2.1.Reagents

Forskolin was purchased from Sigma(MO,USA),and newborn Calf Serum(NCS)was from Bio Whittaker (Verviers,Belgium).Cell culture medium was obtained from Gibco/BRL(MD,USA).CDP-Star and MagicMark Western Standard were from Applied Biosystems(CA, USA)and Invitrogen(Oslo,Norway),respectively.Anti-bodies against CREB,phospho-CREB,p38MAPK, phospho-p38MAPK,and the monoclonal antibody phospho-p44/42MAPK were all obtained from Cell Signaling Technology(CA,USA).Luciferase assay kit was from Perkin-Elmer-Tropix(MA,USA).H89and phospho-ERK5/BMK1antibody were purchased from Biosource International(Belgium).LY294002,SB203580 and KN-62were obtained from Alexis Biochemicals (Lausen,Switzerland).Alkaline phosphate conjugated anti-rabbit and anti-mouse antibodies were purchased from DAKO(Denmark)and Sigma-Aldrich(MO,USA), respectively.The specific Epac activator8-pMeOPT-2V-O-Me-cAMP was obtained from Biolog Life Science Institute (Bremen,Germany).

2.2.Cells

NIH3T3cells(ATCC CRL1658)were maintained in Dulbecco’s modified Eagle’s medium supplemented with 10%(v/v)NCS,penicillin(100U/ml),and100A g/ml streptomycin(Gibco/BRL)in a CO2incubator(5%CO2) at378C.All experiments with NIH3T3cells were performed with cell passages between130and140.

2.3.Plasmids

The GAL4–CREB expression plasmid was kindly provided by Dr.R.A.Maurer[24].The coding sequence of CREB was subcloned in the GAL4–DBD expression vector pM(Clontech)and subsequently verified by sequencing.The luciferase reporter plasmid pG5E1bLuc, which contains five binding sites for the yeast tran-scription factor GAL4upstream of an Adenovirus E1b TATA-box and a luciferase gene,was obtained from Dr. R.J.Davis[25].The dominant negative mutants of MSK1,N-terminal kinase dead MSK1and C-terminal kinase dead MSK1,were kindly provided by Dr.M.Deak [26].The empty expression vector pSR and the plasmid pSR C a,containing the catalytic C a subunit from PKA, were a kind gift from Dr.T.Jahnsen and Dr.K.Taske′n [27].Wild type p38in the pcDNA3-HA vector was kindly provided by Dr. A.Brunet[28],and the constitutively active MKK6,MKK6E/E,was obtained from Dr. D. Zechner[29].The plasmid pcDNA3.1was purchased from Invitrogen,while pCMV5was kindly provided by Dr.E.Sontag[30].

2.4.Sequencing

Cycle sequencing was performed using the Big Dye sequencing kit(Perkin-Elmer-Tropix).Sequencing reac-tions were analysed on an ABI377Prism Sequencer (Perkin-Elmer).

M.P.Delghandi et al./Cellular Signalling17(2005)1343–1351 1344

2.5.Transient transfection and luciferase assay

Transfection of NIH3T3cells and luciferase assays were as previously described[31].

2.6.Immunoblot analysis

All immunoblot analyses were performed on extracts derived from cell grown in6-welled trays.Cells were washed twice in PBS,harvested in80A l lysis buffer(0.25 M DTT,and1:1NuPAGE LDS Sample Buffer(4?)and ddH2O),heated to708C for10min and sonicated for4s. Samples were analysed by sodium dodecyl sulphate-polyacrylamide gel electrophoresis(SDS-PAGE)(4–12% NU-PAGE;Invitrogen)and transferred to0.45-A m-pore-size polyvinylidene difluoride membrane(Millipore).The blots were blocked with5%non-fat dry milk(Nestleˉ)/ 0.1%Tween-20(blocking buffer)for1h at room temperature and incubated with primary antibodies (1:1000)overnight at48C in blocking buffer.The blots were subsequently incubated for1h in room temperature with alkaline phosphate conjugated anti-rabbit antibodies (DAKO,Denmark)in blocking buffer before exposure to chemiluminescence’s substrate CDP-Star.To verify equal protein loading,some of the membranes were stripped for 5min in0.2M NaOH,washed three times in PBS with 0.1%Tween-20(PBST),blocked and reprobed with anti-CREB antibody.Densitometry quantification of the hybrid-ization signals was performed with a Lumi-Imager F1k using LumiAnalyst k Software(Boehringer Mannheim, Germany).

2.7.Statistics

Statistical significance of results was determined by Student’s t-test with p b0.05as a significant difference. 2.8.Densitometry

The densitometric analysis was performed with the BIO-RAD Model GS-700Imaging densitometer,using the program Multi-Analyst/PC(BIO-RAD Laboratories, USA).

3.Results

3.1.Specific inhibition of cAMP-regulated signalling path-ways indicates that PKA is the major pathway that mediates forskolin-induced CREB phosphorylation in NIH3T3cells The adenylate cyclase activator forskolin(FSK)is generally applied as a cAMP-elevating agent to induce cAMP-dependent protein kinase or PKA[23].However, cAMP has been demonstrated to activate also the MAP kinase p38,MEK1/2-ERK1/2and MEK5-ERK5modules,and the PI3K-PKB/Akt1pathway[32–35].Moreover, cAMP-induced release of Ca2+from cyclic-nucleotide-gated ion channels may stimulate CaMK and conventional PKC[36,37].We first set out to determine which signalling pathways can mediate forskolin-induced phos-phorylation of CREB at serine residue133in NIH3T3 cells.For this purpose,we monitored the levels of phosphoserine-133-CREB in extracts of FSK-stimulated NIH3T3cells in the absence or presence of one of the following protein kinase inhibitors H89(PKA),LY294002 (Akt/PKB),SB203580(p38a/h)or KN-62(CaMKII). Previously,we have showed that forskolin fails to activate the MEK1/2-ERK1/2pathway in NIH3T3cells and that neither the MEK inhibitor,PD98059,nor the PKC inhibitor,GF109203X,were able to influence FSK-provoked CREB phosphorylation at Ser-133in these cells [38,39].H89completely abrogated FSK-induced CREB phosphorylation,while the other inhibitors did not signifi-cantly influence the phosphorylation status of CREB(Fig. 1A).Similar results were obtained in an independent experiment.Densitometric analysis of the relative phos-phoCREB levels were done and the result is presented in a bar chart(Fig.1A).To ensure that these chemical inhibitors on their own did not influence CREB phosphorylation,cells were also treated with the inhibitors in the absence of FSK and phosphoserine-133CREB levels were monitored.None of the inhibitors affected the basal phosphoCREB levels in the absence of FSK(results not shown).Taken together, these results indicate that PKA mediates forskolin-induced CREB phosphorylation in NIH3T3cells.

Several studies have shown that distinct stimuli may provoke CREB phosphorylation with the same stoichiometry and kinetics,yet their ability to stimulate CREB-mediated transcription may differ considerably.However,substitution of serine-133into non-phosphorable alanine completely abolishes signal-induced activation of CREB.Hence,phos-phorylation of serine-133is necessary,but not sufficient for stimulus-induced activation of CREB-dependent transcrip-tion(reviewed in Ref.[40]).This prompted us to test whether specific inhibitors of signalling pathways known to convert to CREB affected GAL4–CREB dependent transcription in forskolin treated cells.H89,the only inhibitor that prevented forskolin-induced CREB phosphorylation,also completely abrogated CREB activation by FSK(Fig.1B),but had no influence on GAL4-mediated transcription(results not shown).As expected,the specific inhibitors for PKB,p38 or CaMKII signalling pathways did not affect forskolin-induced CREB-dependent transcription(Fig.1B and results not shown).

Until recently,PKA was thought to be the main target of cAMP in eukaryotic cells.However,Epac(exchange factor directly activated by cAMP),a widely expressed exchange factor for the small GTPases Rap1and Rap2,has been shown to be a receptor for cAMP as well[5,6].Because specific Epac inhibitors are lacking so far,we investigated the putative role of Epac in mediating forskolin-induced

M.P.Delghandi et al./Cellular Signalling17(2005)1343–13511345

CREB phosphorylation by monitoring whether a specific Epac-activator,8-pMeOPT-2V -O -Me-cAMP,could provoke CREB phosphorylation in NIH 3T3cells [41].The Epac activator failed to induce CREB phosphorylation and to stimulate GAL4–CREB-mediated transcription (Fig.2A

and B),arguing against a role for Epac in mediating phosphorylation and transactivation of CREB in forskolin-treated NIH 3T3cells.

3.2.Activated MAPK p38stimulates CREB-mediated tran-scription and potentiates forskolin-induced CREB activity The activity of several protein kinases involved in cAMP-induced signalling transduction is regulated by phosphorylation [42].Therefore,we compared the phos-phorylation profile of different protein kinases in non-stimulated and forskolin-treated cells by immunoblot studies with phosphospecific antibodies.We found that neither MAP kinases ERK1/2nor ERK5were activated by forskolin treatment of NIH 3T3cells (Fig.3A).Forskolin also failed to provoke phosphorylation of the upstream regulators of ERK1/2,Raf-1and MEK1/2,and to induce phosphorylation of the ERK1/2substrate Elk-1(results not shown and Ref.[39]).These findings confirm that the Raf-MEK1/2-ERK1/2pathway is not involved in FSK-induced CREB phosphorylation in NIH 3T3cells.Neither Akt1/PKB,PKC,nor CaMK became phosphorylated after forskolin stimulation (results not shown).The MAPK p38,however,was clearly phosphorylated upon forskolin stimuli,and this FSK-induced phosphorylation of p38MAP kinase is mediated by PKA,since the presence of H89clearly diminished the activation of p38(Fig.3

B).

Fig.1.Forskolin-induced phosphorylation and activation of CREB are mediated by PKA in NIH 3T3cells.(A)Serum-starved cells were incubated with the different inhibitors;H89(10A M),LY294002(50A M),SB203580(10A M),and KN-62(10A M)for 1h,and then treated with 10A M forskolin (FSK)for 30min.Each experiment was performed in duplicate,except for the control cells where only one extract was analysed.PhosphoCREB levels were determined by Western blot analysis using phospho-specific anti-bodies that recognize phosphoser-133CREB (top panel).The arrowhead indicates the position of phosphoCREB,while the lower band is phosphoATF-1.To verify equal loading and blotting of the samples,the membrane was stripped and re-incubated with anti-CREB antibodies (middle panel).The ration of phosphoCREB:CREB in each was determined by densitometry and the average of the duplicate samples was calculated.The ratio in untreated control cells was arbitrary set as 1and the values obtained for the treated cells were expressed as fold induction.The asterisk (*)indicates a significant difference (p b 0.05).(B)Cells were transfected with G5-E1b-LUC reporter plasmid (1A g)and expression plasmid for chimeric GAL4–CREB (0.5A g).The chimeric protein contains the DNA binding domain of GAL4(residues 1–147)fused to full-length CREB.Serum-starved cells were either untreated (unstimulated)or pretreated with the PKA inhibitor H89(10A M),the CaMKII inhibitor KN-62(10A M)or the p38(a /h )inhibitor SB203580(10A M)for 1h,and then treated with FSK (10A M).The luciferase activity in cell extracts was determined 3h after FSK-stimulation.The luciferase activity in untreated control cells was arbitrary set as 1and the luciferase activities in treated cells are represented as fold induction.The results are the average of three independent parallels F S.D.The experiment was performed in triplicate and the results of a single representative experiment are

shown.

Fig.2.Epac is not an activator of CREB in NIH 3T3cells.(A)The specific Epac-activator,8-pMeOPT-2V -O -Me-cAMP failed to induce phosphoryla-tion and activation of CREB.Serum-starved cells were either untreated or stimulated with forskolin (FSK)(10A M),or the specific Epac-activator (0.1or 0.3mM)for 30min.PhosphoCREB levels was determined by Western blot analysis using phosphoserine-133CREB antibodies.To verify equal loading and blotting of the samples,the membrane was stripped and re-incubated with anti-CREB antibodies (lower panel).(B)The cells were transfected as described in the legend of Fig.1,and untreated or stimulated with FSK (10A M,3h),or the Epac-activator (0.1or 0.3mM,1h).Luciferase activities were determined as described in the legend of Fig.1.The results are the average of three independent parallels F S.D.

M.P .Delghandi et al./Cellular Signalling 17(2005)1343–1351

1346

These results suggest that p38MAPK may mediate forskolin-induced activation of CREB.We therefore tested whether ectopic expression of p38could stimulate GAL4–CREB-mediated transcription.Thereto,NIH 3T3cells were co-transfected with p38and with a constitutive active form of its upstream activator,MKK6E/E.Co-expression of MKK6E/E plus p38strongly enhanced CREB-dependent transcription,while ectopically expressed p38alone failed to stimulate CREB-driven transcription (Fig.4A and B).Moreover,p38potentiated forskolin-,as well as PKA-induced GAL4–CREB driven transcription,(Fig.4B and C,respectively).This suggests that additional stimulation of PKA-induced CREB transcriptional activity by p38requires a PKA-dependent activation of p38.

3.3.MSK1mediates increased CREB-dependent transcrip-tion by activated MAPK p38

The mitogen-activated protein kinase-activated protein kinase MSK1has been shown to be a genuine CREB kinase and can be activated by the MAPK p38[11].Hence,we wanted to investigate whether MSK1was involved in mediating p38-induced CREB activation.Overexpression of dominant negative mutants of MSK1(C-terminal kinase dead MSK1(dnMSK1-CT)or/and N-terminal kinase dead MSK1(dnMSK1-NT))strongly reduced MAPK p38-induced stimulation of CREB-directed transcription (Fig.5A).Concentrations of H89that inhibit PKA,have also been reported to inhibit the kinase activity of MSK1[43].To confirm a role for MSK1in p38-induced activation of CREB,we assayed the effect of H89on the transcriptional

potency of GAL4–CREB in the presence of activated MKK6plus p38.As shown in Fig.5B,addition of H89significantly (p b 0.01)reduced the p38-induced transcrip-tional activity of CREB.MAPKAPK2and RSK-B

(also

Fig.4.Activated p38strongly enhanced CREB-dependent transcription and enhances forskolin-and PKA-induced CREB-driven transcription.(A)Cells were co-transfected with the reporter plasmid G5-E1b-LUC (1A g),the empty GAL4expression vector (0.5A g)or GAL4–CREB expression plasmid (0.5A g)and either 2A g empty control vector or 1A g p38-and 1A g MKK6E/E expression plasmid.(B)Serum-starved cells were co-transfected with the reporter plasmid G5-E1b-LUC (1A g),the empty GAL4expression vector (0.5A g)or GAL4–CREB expression plasmid (0.5A g)and either 1A g empty control vector or 1A g p38-expression plasmid.Where indicated,cells were stimulated with forskolin (FSK)(10A M)for 3h.(C)The cells were co-transfected with the reporter plasmid G5-E1b-LUC (1A g),the GAL4–CREB expression plasmid (0.5A g),the constitutive active subunit of PKA (C a )(1A g),and empty control plasmids (1A g)or p38-expression plasmid (1A g).Luciferase activities were determined as described in the legend of Fig.1.Statistical significance was calculated by Student’s t -test,*p b 0.05.The results are the average of three independent parallels F S.D.Similar results were obtained in corresponding

experiments.

Fig.3.Forskolin provoked phosphorylation of p38MAPK in NIH 3T3cells depends on PKA.(A)Serum-starved cells were incubated with either forskolin (FSK)(10A M)or newborn calf serum (NCS)(10%)for 30min.Each experiment was performed in duplicate.PhosphoERK1/2(top panel)and phosphoERK5(lower panel)levels were determined by Western blot analysis using phospho-specific antibodies.(B)Pre-treatment of serum-starved cells with H89(10A M)prevents FSK-induced https://www.360docs.net/doc/149120346.html,ne 1:control cells;lane 2:cells treated with FSK (10A M)for 30min;lane 3:cell pretreated for 1h with H89(10A M)and then stimulated with FSK for 30min;lane 4:cells exposed to NCS (10%)for 30min.To verify equal loading and blotting,the membrane was stripped and re-incubated with anti-CREB antibodies (lower panel).

M.P .Delghandi et al./Cellular Signalling 17(2005)1343–13511347

referred to as MSK-2),two other p38-regulated protein kinases,have also been shown to phosphorylate CREB at serine-133[13,44].However,overexpression of dominant negative mutants of these kinases did not interfere with forskolin-induced activation of GAL4–CREB-mediated transcription(results not shown).In conclusion,our results show that CREB phosphorylation and activation in for-skolin-treated NIH3T3cells is mediated by PKA and by PKA-dependent activation of the p38-MSK1pathway.

3.4.Forskolin-induced activation of p38MAPK is delayed compared to PKA activation

Activation of the cAMP/PKA-signalling pathway follows the characteristic b burst–attenuation–refractory Q phases. During the burst phase,PKA becomes activated and the kinetics of PKA activation and CREB phosphorylation are remarkably similar[45].However,our time-dependent studies of forskolin-treated NIH3T3cells demonstrated that deterioration of PKA activity during the attenuation phase occurred much faster than CREB phosphorylation.Indeed, while forskolin-induced PKA activity rapidly decreased after30min[39],phosphoCREB levels remained elevated for at least2h[31].These observations made us speculate that the activated p38-MSK1pathway could be involved in enduring the phosphorylation profile of CREB during attenuation of PKA.Therefore,we examined the kinetics of p38phosphorylation in forskolin exposed NIH3T3cells. Increased phospho-p38levels were detected30min after FSK-stimulation and remained elevated for up to120min (Fig.6).These findings suggest that the activated p38-MSK1pathway may sustain CREB phosphorylation even when PKA enters the refractory phase.

4.Discussion

The adenylate cyclase activator forskolin is commonly used to increase intracellular cAMP levels and is generally applied as a specific activator of the PKA pathway[23]. However,other pathways such as the PI3K Y PKB,the Epac Y B-Raf Y MEK1/2Y ERK1/2,the MEK5Y ERK5,the c-Raf Y MEK1/2Y ERK1/2,and the p38pathways can also be induced by cAMP in a cell-specific fashion[5–21,32–35].Moreover,cAMP-induced release of Ca2+from cyclic-nucleotide-gated ion channels may stimulate CaMK and conventional PKC[36,37].As some of these pathways can converge to the transcription factor CREB,we wanted to identify which of them are involved in forskolin-induced CREB phosphorylation and activation in NIH3T3cells. Our results showed that of the known cAMP-regulated pathways,PKA and p38MAP kinase were the only kinases that became activated upon forskolin treatment.No increase in phosphorylation levels of PKB,CaMKII,ERK5,or ERK1/2were observed after forskolin treatment,and in agreement with the group of Enserink et al.Epac was not found to be activated upon forskolin stimulation of NIH3T3 cells[41].The failure of forskolin to induced phosphor-ylation of ERK1/2in NIH3T3cells is in accordance with the observations of several other groups[46–48].In contrast,two other groups found that ERK1/2became activated in forskolin stimulated NIH3T3cells[32,49].

The Fig.6.Kinetics of forskolin-induced p38phosphorylation in NIH3T3cells. Serum-starved cells were either untreated(lane1)or treated with forskolin (10A M)for5,15,30,60,120,180,240,or300min(lanes2–8, respectively).The level of phospho-p38was determined by using the phospho-specific antibody.The membrane was stripped and re-incubated with anti-CREB antibodies to assure equal loading and blotting of the individual samples(lower

panel). Fig.5.MSK1can mediate p38induced GAL4–CREB mediated tran-

scription in NIH3T3cells.(A)The cells were co-transfected with the

reporter plasmid G5-E1b-LUC(1A g),the GAL4–CREB expression

plasmid(0.5A g)and either empty control vector(1A g),p38-,MKK6E/E-

expression plasmids(1A g)or dominant negative MSK1mutants(1A g)as

indicated.(B)The cells were co-transfected with the reporter plasmid G5-

E1b-LUC(1A g),the empty GAL4expression vector(0.5A g)or the

GAL4–CREB expression plasmid(0.5A g),and either empty control

vector(1A g)or MKK6E/E expression plasmid(1A g).Serum-starved

cells were untreated or treated with the chemical inhibitor H89(10A M)

for3h.Luciferase activities were determined as described in the legend

of Fig.1.Statistical significance was calculated by Student’s t-test,

*p b0.01compared with untreated cells.The results are the average of

three independent parallels F S.D.

M.P.Delghandi et al./Cellular Signalling17(2005)1343–1351 1348

authors explain the discrepancies between the different groups by subtle variations in cell lines used in different laboratories.Forskolin has been shown to induce ERK5 activation in both NIH3T3cells and C2C12myoblasts[32], but we were not able to reproduce these results,again maybe due to subtle variations in cell lines.cAMP has also been implicated in modulating PKB activity and forskolin was shown to provoke phosphorylation of PKB in hepatocytes,EBNA-transformed HEK293cells,and immor-talized Schwann cells[34,50–52].We did not,however, observe any forskolin-induced PKB phosphorylation in our NIH3T3cells,which is in accordance with the findings of the group of Fang et al.[53].The group of Makhinson reported that forskolin-induced phosphorylation of CaMKII in the CA1region of the hippocampus.Increased phospho-CaMKII levels resulted from PKA-dependent inactivation of protein phosphatase1[54].We did not observe any forskolin-induced CaMKII phosphorylation in our NIH3T3 cells,and previously we have failed to find a role for PKC in forskolin-induced CREB phosphorylation and activation [38].

Previous studies have shown that forskolin can induce phosphorylation of the p38MAP kinase in a PKA-depend-ent mode in a variety of cells,including macrophages,SK-N-MC,PC12,MC3T3-E1,Chinese hamster ovary cells, colon cancer cells,adipocytes and adult mouse cardiomyo-cytes[33,55–62].However,forskolin has also been shown to inhibit p38MAP kinase phosphorylation in HUVEC cells and in thyrocytes[63,64].We demonstrated that p38was phosphorylated in a time-dependent manner in NIH3T3cells exposed to forskolin.Forskolin-induced p38phosphor-ylation was PKA-dependent since the chemical inhibitor of PKA,H89,prevented this phosphorylation.In agreement with our findings,Schulte and colleagues demonstrated that cAMP-induced phosphorylation of p38in Chinese hamster ovary cells(CHO)required PKA[56].However,Nishihara et al.reported PKA-independent activation of p38in colon cancer cells.They found that cAMP-induced phosphoryla-tion of CREB was mediated by activation of p90RSK and MSK1,which followed the PKA-independent ERK1/2and p38activation[57].Our study shows that ectopic expression of p38alone was not sufficient to stimulate GAL4–CREB-driven transcription in serum-starved cells.However, activation of endogenous or ectopic expressed p38by a constitutive active MKK mutant(MKK6E/E)stimulated CREB-dependent transcription,while p38potentiated both forskolin-and PKA-induced CREB activity.Of the known CREB kinases that are activated by p38,MAPKAPK2, RSK-B,and MSK-1,we found that only MSK-1was involved in mediating p38-induced CREB activation.H89, a specific inhibitor of both PKA and MSK1,completely abrogated forskolin-induced CREB phosphorylation and activation.On the other hand,specific inhibition of p38by SB203580,which will also affect its downstream targets such as MSK1and hence CREB phosphorylation,had no measurable effect on forskolin-induced CREB phosphory-lation and CREB-directed transcription.These results indicate that activation of p38,either through MKK6or through a PKA-dependent mechanism,can stimulate CREB-mediated transcription,but that this pathway is

not Fig.7.A schematic overview of the described cAMP-signalling pathways in mammalian cells.The continuous lines indicate the signalling pathways operational in NIH3T3cells as identified in this study.The dashed lines indicate signalling pathways functional in other mammalian cell lines.The predominance of the PKA pathway in NIH3T3cells is shown by the bold arrows.

M.P.Delghandi et al./Cellular Signalling17(2005)1343–13511349

the major pathway applied in forskolin-treated NIH3T3 cells.Activation of the p38-MSK1pathway occurs after the burst phase of PKA activation and may represent a relay mechanism where PKA passes the signal onto a new signalling pathway that converge to a common substrate (i.e.CREB).

The mechanism by which PKA activates p38in NIH3T3 cells remains elusive.Studies with T lymphocytes have shown that PKA phosphorylates the haematopoietic protein tyrosine phosphatase(HePTP)at serine23.HePTP is a negative regulator of the MAP kinase p38,and it binds to p38through a kinase-interaction motif(KIM)[65].A similar mechanism seems to be operational in COS-7cells where the protein tyrosine phosphatase PTP-SL can be phosphorylated by PKA at serine residue231,resulting in impaired binding of the protein phosphatase to the MAP kinase p38.The authors suggest a mechanism by which PKA can regulate the activity of p38and its translocation to the nucleus.Such a mechanism would involve the existence, in certain cell types,of a pool of inactive MAP kinases outside of the nucleus,which would be complexed with PTP-SL or the other KIM-containing PTPs.The dissociation equilibrium of the stimulus-specific conditions of PKA activity,and the lack of association would be favoured by the PKA-mediated phosphorylation of the KIM regulatory residue on the PTP.Thus upon conditions of PKA activation,both the tyrosine phosphorylation and the entry into the nucleus of the MAP kinase would be prevalent[66]. It is tempting to speculate that a similar mechanism is operational in NIH3T3cells,and obviously the identifica-tion of a putative p38-interacting tyrosine phosphatase in NIH3T3cells would support this hypothesis.

5.Conclusions

The second messenger cAMP can activate multiple signalling pathways that can converge to CREB.The aim of this study was to identify the cAMP signalling pathways involved in forskolin-induced CREB activation in NIH3T3 cells.Our findings,which are summarized in Fig.7, demonstrate that PKA is the major CREB kinase exploited by NIH3T3cells after forskolin treatment.Forskolin also induces phosphorylation of p38in a PKA-dependent way, and the forskolin-induced p38phosphorylation kinetics is delayed compared to PKA activation.Maximum phos-phorylation levels of p38occurred at time points when activated PKA levels are gradually ebbing.Moreover,we showed that activated p38stimulates CREB-mediated tran-scription through MSK1.

Our results suggest that the lagging activation of p38 may ensure the cell that the stimulus converging to CREB is transmitted by another pathway even when the original activated transduction pathway enters the refractory state. The transcriptional activity of CREB seems to depend on the duration of CREB phosphorylation[40].Cell-specific cross talk between distinct pathways may therefore form a mechanism to prolong the phosphorylation of CREB and to ensure a cellular response by activated CREB. Acknowledgements

The authors thank Dr.R.A.Maurer,Dr.R.J.Davis,Dr. M.Deak,Dr.T.Jahnsen,Dr.K.Taske′n,Dr.A.Brunet,Dr.

D.Zechner,and Dr.

E.Sontag for kindly providing plasmids used in this study.

This work was supported by grants from the Norwegian Cancer Society(Kreftforeningen,project A01037/004),the Norwegian Research Council(NFR projects S5168and S5228),and the Olav and Aakre foundation(A5048). References

[1]A.J.Shaywitz,M.E.Greenberg,Annu.Rev.Biochem.68(1999)821.

[2]B.Mayr,M.Montminy,Nat.Rev.,Mol.Cell Biol.2(2001)599.

[3]D.De Cesare,P.Sassone-Corsi,Prog.Nucleic Acid Res.Mol.Biol.

64(2000)343.

[4]P.G.Quinn,Prog.Nucleic Acid Res.Mol.Biol.72(2002)269.

[5]H.Kawasaki,G.M.Springett,N.Mochizuki,S.Toki,M.Nakaya,M.

Matsuda,D.E.Housman,A.M.Graybiel,Science282(1998)2275.

[6]J.de Rooij,F.J.Zwartkruis,M.H.Verheijen,R.H.Cool,S.M.Nijman,

A.Wittinghofer,J.L.Bos,Nature396(1998)474.

[7]S.S.Grewal,D.M.Fass,H.Yao,C.L.Ellig,R.H.Goodman,P.J.

Stork,J.Biol.Chem.275(2000)34433.

[8]T.Fujita,T.Meguro,R.Fukuyama,H.Nakamuta,M.Koida,J.Biol.

Chem.277(2002)22191.

[9]L.Iacovelli,L.Capobianco,L.Salvatore,M.Sallese,G.M.

D V Ancona,B.A.De,Mol.Pharmacol.60(2001)924.

[10]H.Takahashi,M.Honma,Y.Miyauchi,S.Nakamura,A.Ishida-

Yamamoto,H.Iizuka,Arch.Dermatol.Res.296(2004)74.

[11]J.S.Arthur,P.Cohen,FEBS Lett.482(2000)44.

[12]J.Xing,D.D.Ginty,M.E.Greenberg,Science273(1996)959.

[13]G.R.Wiggin,A.Soloaga,J.M.Foster,V.Murray-Tait,P.Cohen,J.S.

Arthur,Mol.Cell.Biol.22(2002)2871.

[14]Y.Tan,J.Rouse, A.Zhang,S.Cariati,P.Cohen,https://www.360docs.net/doc/149120346.html,b,

EMBO J.15(1996)4629.

[15]S.Pugazhenthi,T.Boras, D.O V Connor,M.K.Meintzer,K.A.

Heidenreich,J.E.Reusch,J.Biol.Chem.274(1999)2829.

[16]E.T.Maizels,A.Mukherjee,G.Sithanandam,C.A.Peters,J.Cottom,

K.E.Mayo,M.Hunzicker-Dunn,Mol.Endocrinol.15(2001)716.

[17]F.L.Watson,H.M.Heerssen,A.Bhattacharyya,L.Klesse,M.Z.Lin,

R.A.Segal,Nat.Neurosci.4(2001)981.

[18]K.Du,M.Montminy,J.Biol.Chem.273(1998)32377.

[19]L.A.Cass,S.A.Summers,G.V.Prendergast,J.M.Backer,M.J.

Birnbaum,J.L.Meinkoth,Mol.Cell.Biol.19(1999)5882.

[20]N.Iida,K.Namikawa,H.Kiyama,H.Ueno,S.Nakamura,S.Hattori,

J.Neurosci.21(2001)6459.

[21]I.J.Gonzalez-Robayna,A.E.Falender,S.Ochsner,G.L.Firestone,

J.S.Richards,Mol.Endocrinol.14(2000)1283.

[22]U.B.Kaupp,R.Seifert,Physiol.Rev.82(2002)769.

[23]P.A.Insel,R.S.Ostrom,Cell.Mol.Neurobiol.23(2003)305.

[24]P.Sun,H.Enslen,P.S.Myung,R.A.Maurer,Genes Dev.8(1994)

2527.

[25]A.Seth,E.Alvarez,S.Gupta,R.J.Davis,J.Biol.Chem.266(1991)

23521.

[26]M.Deak,A.D.Clifton,L.M.Lucocq,D.R.Alessi,EMBO J.17

(1998)4426.

M.P.Delghandi et al./Cellular Signalling17(2005)1343–1351 1350

[27]K.B.Foss,https://www.360docs.net/doc/149120346.html,ndmark,B.S.Skalhegg,K.Tasken,E.Jellum,V.

Hansson,T.Jahnsen,Eur.J.Biochem.220(1994)217.

[28]A.Brunet,J.Pouyssegur,Science272(1996)1652.

[29]D.Zechner,R.Craig, D.S.Hanford,P.M.McDonough,R.A.

Sabbadini,C.C.Glembotski,J.Biol.Chem.273(1998)8232. [30]E.Sontag,S.Fedorov,C.Kamibayashi,D.Robbins,M.Cobb,M.

Mumby,Cell75(1993)887.

[31]M.Johannessen,M.P.Delghandi,O.M.Seternes,B.Johansen,U.

Moens,Cell.Signal.16(2004)1187.

[32]G.W.Pearson,M.H.Cobb,J.Biol.Chem.277(2002)48094.

[33]T.V.Hansen,J.F.Rehfeld,F.C.Nielsen,S.Nagano,M.Takeda,L.Ma,

B.Soliven,S.Tiwari,K.Felekkis,E.Y.Moon,A.Flies,D.H.Sherr,

A.Lerner,G.Schulte,

B.B.Fredholm,Mol.Endocrinol.13(1999)

466.

[34]S.Nagano,M.Takeda,L.Ma,B.Soliven,S.Tiwari,K.Felekkis,

E.Y.Moon, A.Flies, D.H.Sherr, A.Lerner,G.Schulte, B.B.

Fredholm,J.Neurochem.77(2001)1486.

[35]M.Frodin,P.Peraldi,E.Van Obberghen,J.Biol.Chem.269(1994)

6207.

[36]M.Sheng,G.McFadden,M.E.Greenberg,Neuron4(1990)571.

[37]M.Antoine,C.Gaiddon,J.P.Loeffler,Mol.Cell.Endocrinol.120

(1996)1.

[38]O.M.Seternes,B.Johansen,U.Moens,Mol.Endocrinol.13(1999)

1071.

[39]O.M.Seternes,R.Sorensen, B.Johansen,T.Loennechen,J.

Aarbakke,U.Moens,Biochim.Biophys.Acta1395(1998)345. [40]M.Johannessen,M.P.Delghandi,U.Moens,Cell.Signal.16(2004)

1211.

[41]J.M.Enserink, A.E.Christensen,J.de Rooij,M.van Triest, F.

Schwede,H.G.Genieser,S.O.Doskeland,J.L.Blank,J.L.Bos,Nat.

Cell Biol.4(2002)901.

[42]B.Nolen,S.Taylor,G.Ghosh,Mol.Cell15(2004)661.

[43]S.Thomson,A.L.Clayton,C.A.Hazzalin,S.Rose,M.J.Barratt,L.C.

Mahadevan,EMBO J.18(1999)4779.

[44]M.Iordanov,K.Bender,T.Ade,W.Schmid,C.Sachsenmaier,K.

Engel,M.Gaestel,H.J.Rahmsdorf,P.Herrlich,EMBO J.16(1997) 1009.

[45]M.Montminy,Annu.Rev.Biochem.66(1997)807.

[46]J.M.Schmitt,P.J.Stork,Mol.Cell.Biol.21(2001)3671.[47]B.M.Burgering,G.J.Pronk,P.C.van Weeren,P.Chardin,J.L.Bos,

EMBO J.12(1993)4211.

[48]V.Calleja, E.P.Ruiz, C.Filloux,P.Peraldi,V.Baron, E.Van

Obberghen,Endocrinology138(1997)1111.

[49]M.Klinger,O.Kudlacek,M.G.Seidel,M.Freissmuth,V.Sexl,

J.Biol.Chem.277(2002)32490.

[50]N.Filippa,C.L.Sable,C.Filloux,B.Hemmings,E.Van Obberghen,

Mol.Cell.Biol.19(1999)4989.

[51]C.L.Sable,N.Filippa,B.Hemmings,E.Van Obberghen,FEBS Lett.

409(1997)253.

[52]C.R.Webster,M.S.Anwer,Am.J.Physiol.277(1999)G1165.

[53]X.Fang,S.X.Yu,Y.Lu,R.C.Bast Jr.,J.R.Woodgett,https://www.360docs.net/doc/149120346.html,ls,

Proc.Natl.Acad.Sci.U.S.A.97(2000)11960.

[54]M.Makhinson,J.K.Chotiner,J.B.Watson,T.J.O V Dell,J.Neurosci.

19(1999)2500.

[55]M.Zheng,S.J.Zhang,W.Z.Zhu,B.Ziman,B.K.Kobilka,R.P.Xiao,

J.Biol.Chem.275(2000)40635.

[56]G.Schulte,B.B.Fredholm,Exp.Cell Res.290(2003)168.

[57]H.Nishihara,M.Hwang,S.Kizaka-Kondoh,L.Eckmann,P.A.Insel,

J.Biol.Chem.279(2004)26176.

[58]X.Mao,I.G.Bravo,H.Cheng,A.Alonso,Exp.Cell Res.292(2004)

304.

[59]T.O.Hansen,J.F.Rehfeld,F.C.Nielsen,J.Neurochem.75(2000)

1870.

[60]A.Kakita, A.Suzuki,Y.Ono,Y.Miura,M.Itoh,Y.Oiso,

Prostaglandins Leukot.Essent.Fat.Acids70(2004)469.

[61]W.Cao,A.V.Medvedev,K.W.Daniel,S.Collins,J.Biol.Chem.276

(2001)27077.

[62]C.C.Chio,Y.H.Chang,Y.W.Hsu,K.H.Chi,W.W.Lin,Cell.Signal.

16(2004)565.

[63]A.Rahman,K.N.Anwar,M.Minhajuddin,K.M.Bijli,K.Javaid,A.L.

True,A.B.Malik,Am.J.Physiol.,Lung Cell.Mol.Physiol.287 (2004)L1017.

[64]F.Vandeput,S.Perpete,K.Coulonval, https://www.360docs.net/doc/149120346.html,my,J.E.Dumont,

Endocrinology144(2003)1341.

[65]M.Saxena,S.Williams,K.Tasken,T.Mustelin,Nat.Cell Biol.1

(1999)305.

[66]C.Blanco-Aparicio,J.Torres,R.Pulido,J.Cell.Biol.147(1999)

1129.

M.P.Delghandi et al./Cellular Signalling17(2005)1343–13511351

LINUX 内核的几种锁介绍

spinlock(自旋锁)、 mutex(互斥量)、 semaphore(信号量)、 critical section(临界区) 的作用与区别 Mutex是一把钥匙,一个人拿了就可进入一个房间,出来的时候把钥匙交给队列的第一个。一般的用法是用于串行化对critical section代码的访问,保证这段代码不会被并行的运行。 Semaphore是一件可以容纳N人的房间,如果人不满就可以进去,如果人满了,就要等待有人出来。对于N=1的情况,称为binary semaphore。一般的用法是,用于限制对于某一资源的同时访问。 Binary semaphore与Mutex的差异: 在有的系统中Binary semaphore与Mutex是没有差异的。在有的系统上,主要的差异是mutex一定要由获得锁的进程来释放。而semaphore可以由其它进程释放(这时的semaphore实际就是个原子的变量,大家可以加或减),因此semaphore 可以用于进程间同步。Semaphore的同步功能是所有系统都支持的,而Mutex能否由其他进程释放则未定,因此建议mutex只用于保护critical section。而semaphore则用于保护某变量,或者同步。 另一个概念是spin lock,这是一个内核态概念。spin lock与semaphore的主要区别是spin lock是busy waiting,而semaphore是sleep。对于可以sleep 的进程来说,busy waiting当然没有意义。对于单CPU的系统,busy waiting 当然更没意义(没有CPU可以释放锁)。因此,只有多CPU的内核态非进程空间,

【IT专家】linux多线程及信号处理

本文由我司收集整编,推荐下载,如有疑问,请与我司联系 linux多线程及信号处理 linux多线程及信号处理Linux 多线程应用中如何编写安全的信号处理函数hi.baidu/yelangdefendou/blog/item/827984efd3af7cd9b21cb1df.html Signal Handling Use reentrant functions for safer signal handling linux信号种类1、可靠信号和不可靠信号“不可靠信号” Linux信号机制基本上是从Unix系统中继承过来的。早期Unix系统中的信号机制比较简单和原始,后来在实践中暴露出一些问题,因此,把那些建立在早期机制上的信号叫做”不可靠信号”,信号值小于SIGRTMIN(Red hat 7.2中,SIGRTMIN=32,SIGRTMAX=63)的信号都是不可靠信号。这就是”不可靠信号”的来源。他的主要问题是:? 进程每次处理信号后,就将对信号的响应配置为默认动作。在某些情况下,将导致对信号的错误处理;因此,用户假如不希望这样的操作,那么就要在信号处理函数结尾再一次调用signal(),重新安装该信号。? 信号可能丢失,后面将对此周详阐述。因此,早期unix下的不可靠信号主要指的是进程可能对信号做出错误的反应连同信号可能丢失。Linux支持不可靠信号,但是对不可靠信号机制做了改进:在调用完信号处理函数后,不必重新调用该信号的安装函数(信号安装函数是在可靠机制上的实现)。因此,Linux下的不可靠信号问题主要指的是信号可能丢失。“可靠信号” 随着时间的发展,实践证实了有必要对信号的原始机制加以改进和扩充。因此,后来出现的各种Unix版本分别在这方面进行了研究,力图实现”可靠信号”。由于原来定义的信号已有许多应用,不好再做改变,最终只好又新增加了一些信号,并在一开始就把他们定义为可靠信号,这些信号支持排队,不会丢失。同时,信号的发送和安装也出现了新版本:信号发送函数sigqueue()及信号安装函数sigaction()。POSIX.4对可靠信号机制做了标准化。但是,POSIX只对可靠信号机制应具备的功能连同信号机制的对外接口做了标准化,对信号机制的实现没有作具体的规定。信号值位于SIGRTMIN和SIGRTMAX之间的信号都是可靠信号,可靠信号克服了信号可能丢失的问题。Linux在支持新版本的信号安装函数sigation()连同信号发送函数sigqueue()的同时,仍然支持早期的signal()信号安装函数,支持信号发送函数kill()。注:不

linux signal()函数

当服务器close一个连接时,若client端接着发数据。根据TCP协议的规定,会收到一个RST响应,client再往这个服务器发送数据时,系统会发出一个SIGPIPE信号给进程,告诉进程这个连接已经断开了,不要再写了。根据信号的默认处理规则SIGPIPE信号的默认执行动作是terminate(终止、退出), 所以client会退出。 若不想客户端退出可以把SIGPIPE设为SIG_IGN 如: signal(SIGPIPE,SIG_IGN); 这时SIGPIPE交给了系统处理。 服务器采用了fork的话,要收集垃圾进程,防止僵死进程的产生,可以这样处理: signal(SIGCHLD,SIG_IGN);交给系统init去回收。 这里子进程就不会产生僵死进程了。 signal(SIGHUP, SIG_IGN); signal信号函数,第一个参数表示需要处理的信号值(SIGHUP),第二个参数为处理函数或者是一个表示,这里,SIG_IGN表示忽略SIGHUP那个注册的信号。 SIGHUP和控制台操作有关,当控制台被关闭时系统会向拥有控制台sessionID的所有进程发送HUP信号,默认HUP信号的action是exit,如果远程登陆启动某个服务进程并在程序运行时关闭连接的话会导致服务进程退出,所以一般服务进程都会用nohup工具启动或写成一个daemon。 unix中进程组织结构为session 包含一个前台进程组及一个或多个后台进程组,一个进程组包含多个进程。 一个session可能会有一个session首进程,而一个session首进程可能会有一个控制终端。 一个进程组可能会有一个进程组首进程。进程组首进程的进程ID与该进程组ID相等。 这儿是可能会有,在一定情况之下是没有的。 与终端交互的进程是前台进程,否则便是后台进程 SIGHUP会在以下3种情况下被发送给相应的进程: 1、终端关闭时,该信号被发送到session首进程以及作为job提交的进程(即用&符号提交的进程)

Linux中直接IO机制的介绍

Linux 中直接 I/O 机制的介绍https://www.360docs.net/doc/149120346.html,/developerworks/cn/linux/l-cn-...

https://www.360docs.net/doc/149120346.html,/developerworks/cn/linux/l-cn-...

当应用程序需要直接访问文件而不经过操作系统页高速缓冲存储器的时候,它打开文件的时候需要指定 O_DIRECT 标识符。 操作系统内核中处理 open() 系统调用的内核函数是 sys_open(),sys_open() 会调用 do_sys_open() 去处理主要的打开操作。它主要做了三件事情:首先,它调用 getname() 从进程地址空间中读取文件的路径名;接着,do_sys_open() 调用 get_unused_fd() 从进程的文件表中找到一个空闲的文件表指针,相应的新文件描述符就存放在本地变量 fd 中;之后,函数 do_?lp_open() 会根据传入的参数去执行相应的打开操作。清单 1 列出了操作系统内核中处理 open() 系统调用的一个主要函数关系图。 清单 1. 主要调用函数关系图 sys_open() |-----do_sys_open() |---------getname() |---------get_unused_fd() |---------do_filp_open() |--------nameidata_to_filp() |----------__dentry_open() 函数 do_?ip_open() 在执行的过程中会调用函数 nameidata_to_?lp(),而 nameidata_to_?lp() 最终会调用 __dentry_open()函数,若进程指定了 O_DIRECT 标识符,则该函数会检查直接 I./O 操作是否可以作用于该文件。清单 2 列出了 __dentry_open()函数中与直接 I/O 操作相关的代码。 清单 2. 函数 dentry_open() 中与直接 I/O 相关的代码 if (f->f_flags & O_DIRECT) { if (!f->f_mapping->a_ops || ((!f->f_mapping->a_ops->direct_IO) && (!f->f_mapping->a_ops->get_xip_page))) { fput(f); f = ERR_PTR(-EINVAL); } } 当文件打开时指定了 O_DIRECT 标识符,那么操作系统就会知道接下来对文件的读或者写操作都是要使用直接 I/O 方式的。 下边我们来看一下当进程通过 read() 系统调用读取一个已经设置了 O_DIRECT 标识符的文件的时候,系统都做了哪些处理。函数read() 的原型如下所示: ssize_t read(int feledes, void *buff, size_t nbytes) ; 操作系统中处理 read() 函数的入口函数是 sys_read(),其主要的调用函数关系图如下清单 3 所示: 清单 3. 主调用函数关系图 sys_read() |-----vfs_read() |----generic_file_read() |----generic_file_aio_read() |--------- generic_file_direct_IO()

实验四 Linux进程互斥

实验四 Linux进程互斥 一、实验目的 熟悉Linux下信号量机制,能够使用信号量实现在并发进程间的互斥和同步。 二、实验题目 使用共享存储区机制,使多个并发进程分别模拟生产者-消费者模式同步关系、临界资源的互斥访问关系,使用信号量机制实现相应的同步和互斥。 三、背景材料 (一)需要用到的系统调用 实验可能需要用到的主要系统调用和库函数在下面列出,详细的使用方法说明通过“man 2 系统调用名”或者“man 3 函数名”命令获取。 fork() 创建一个子进程,通过返回值区分是在父进程还是子进程中执行; wait() 等待子进程执行完成; shmget() 建立一个共享存储区; shmctl() 操纵一个共享存储区; s hmat() 把一个共享存储区附接到进程内存空间; shmdt() 把一个已经附接的共享存储区从进程内存空间断开; semget() 建立一个信号量集; semctl() 操纵一个信号量集,包括赋初值; semop() 对信号量集进行wait和signal操作; signal() 设置对信号的处理方式或处理过程。 (二)模拟生产者-消费者的示例程序 本示例主要体现进程间的直接制约关系,由于使用共享存储区,也存在间接制约关系。进程分为服务进程和客户进程,服务进程只有一个,作为消费者,在每次客户进程改变共享存储区内容时显示其数值。各客户进程作为生产者,如果共享存储区内容已经显示(被消费),可以接收用户从键盘输入的整数,放在共享存储区。 编译后执行,第一个进程实例将作为服务进程,提示: ACT CONSUMER!!! To end, try Ctrl+C or use kill. 服务进程一直循环执行,直到用户按Ctrl+C终止执行,或使用kill命令杀死服务进程。 其他进程实例作为客户进程,提示: Act as producer. To end, input 0 when prompted. 客户进程一直循环执行,直到用户输入0。 示例程序代码如下: #include #include #include #include #include #include #include #include

linux通讯

线程+定时实现linux下的Qt串口编程 2010-06-26 10:49 转: 线程+定时实现linux下的Qt串口编程 作者:lizzy115 时间:2010,5,14 说明:本设计采用的是线程+定时实现linux下的Qt串口编程,而非网上资料非常多的Qt编写串口通信程序全程图文讲解系列,因为Qt编写串口通信程序全程图文讲解系列是很好实现,那只是在windows下面的,可是在linux 下面实现串口的通信并非如此,原因在于QextSerialBase::EventDriven跟QextSerialBase::Polling这两个事件的区别,EventDriven属于异步,Polling 属于同步,在windows下面使用的是EventDriven很容易实现,只要有数据就会触发一个串口事件,网上说linux下面需要的是Polling,可是还是不行的,只要串口有数据的时候他会在QByteArray temp = myCom->readAll(); 这句一直读取数据,没能退出,直到断掉串口的时候才能把接受到的串口数据通过 ui->textBrowser->insertPlainText(temp);打印在界面上,一直没能解决这个问题,所以只好采用线程+定时实现linux下的Qt串口编程进行设计。 一、安装环境: 系统平台:Ubuntu-8.04,内核2.6.24-27-generic,图形界面 二、软件需求及下地地址: Qt版本 qt-linux-SDK-4.6.2 注意:此处使用的是qt-linux-SDK-4.6.2版本,编译通过了,之后需要把他移植到qt-embedded-linux-opensource-src-4.5.3.tar.gz,通过qte编译后移植到开发板中,采用的测试开发板为Micro2440, 下载地址:略 三、程序编写过程 程序编程流程: 先新建一个工程空白工程,再建立Ui文件,通过designer进行Ui 界面设计,设计完保存,编译生成ui_mainwindow.h头文件,编写线程头文件及线程处理.cpp文件,建立串口处理头文件及 .cpp文件,最后完成main.cpp 文件。

linux基础操作

玩过Linux的人都会知道,Linux中的命令的确是非常多,但是玩过Linux的人也从来不会因为Linux的命令如此之多而烦恼,因为我们只需要掌握我们最常用的命令就可以了。当然你也可以在使用时去找一下man,他会帮你解决不少的问题。然而每个人玩Linux的目的都不同,所以他们常用的命令也就差异非常大,而我主要是用Linux进行C/C++和shell程序编写的,所以常用到的命令可以就会跟一个管理Linux系统的人有所不同。因为不想在使用是总是东查西找,所以在此总结一下,方便一下以后的查看。不多说,下面就说说我最常用的Linux 命令。 1、cd命令 这是一个非常基本,也是大家经常需要使用的命令,它用于切换当前目录,它的参数是要切换到的目录的路径,可以是绝对路径,也可以是相对路径。如: [plain]view plain copy print? 1.cd /root/Docements # 切换到目录/root/Docements 2.cd ./path # 切换到当前目录下的path目录中,?.?表示当前目录 3.cd ../path # 切换到上层目录中的path目录中,?..?表示上一层目录 2、ls命令 这是一个非常有用的查看文件与目录的命令,list之意,它的参数非常多,下面就列出一些我常用的参数吧,如下: [plain]view plain copy print? 1.-l :列出长数据串,包含文件的属性与权限数据等 2.-a :列出全部的文件,连同隐藏文件(开头为.的文件)一起列出来(常用) 3.-d :仅列出目录本身,而不是列出目录的文件数据 4.-h :将文件容量以较易读的方式(GB,kB等)列出来 5.-R :连同子目录的内容一起列出(递归列出),等于该目录下的所有文件都会显示出来 注:这些参数也可以组合使用,下面举两个例子: [plain]view plain copy print? 1.ls -l #以长数据串的形式列出当前目录下的数据文件和目录 2.ls -lR #以长数据串的形式列出当前目录下的所有文件 3、grep命令 该命令常用于分析一行的信息,若当中有我们所需要的信息,就将该行显示出来,该命令通常与管道命令一起使用,用于对一些命令的输出进行筛选加工等等,它的简单语法为 [plain]view plain copy print? 1.grep [-acinv] [--color=auto] '查找字符串' filename 它的常用参数如下: [plain]view plain copy print?

操作系统课内实验大纲(2014)

操作系统原理课内实验大纲(2014版) 实验一:用户接口实验 实验目的 1)理解面向操作命令的接口Shell。 2)学会简单的shell编码。 3)理解操作系统调用的运行机制。 4)掌握创建系统调用的方法。 操作系统给用户提供了命令接口和程序接口(系统调用)两种操作方式。用户接口实验也因此而分为两大部分。首先要熟悉Linux的基本操作命令,并在此基础上学会简单的shell 编程方法。然后通过想Linux内核添加一个自己设计的系统调用,来理解系统调用的实现方法和运行机制。在本次实验中,最具有吸引力的地方是:通过内核编译,将一组源代码变成操作系统的内核,并由此重新引导系统,这对我们初步了解操作系统的生成过程极为有利。 实验内容 1)控制台命令接口实验 该实验是通过“几种操作系统的控制台命令”、“终端处理程序”、“命令解释程序”和“Linux操作系统的bash”来让实验者理解面向操作命令的接口shell和进行简单的shell 编程。 查看bash版本。 编写bash脚本,统计/my目录下c语言文件的个数 2)系统调用实验 该实验是通过实验者对“Linux操作系统的系统调用机制”的进一步了解来理解操作系统调用的运行机制;同时通过“自己创建一个系统调用mycall()”和“编程调用自己创建的系统调用”进一步掌握创建和调用系统调用的方法。 编程调用一个系统调用fork(),观察结果。

编程调用创建的系统调用foo(),观察结果。 自己创建一个系统调用mycall(),实现功能:显示字符串到屏幕上。 编程调用自己创建的系统调用。 实验要求 1)按照实验内容,认真完成各项实验,并完成实验报告。 2)实验报告必须包括:程序清单(含注释)、实验结果、实验中出现的问题、观察到 的现象的解释和说明,以及实验体会。

Linux操作系统构建原理与应用

【154】 第34卷 第2期 2012-2(下) 0 引言 Linux 是一种自由和开放源码的类Unix 操作系统。目前存在着许多不同的Linux ,但它们都使用了Linux 内核。Linux 可安装在各种计算机硬件设备中,从手机、平板电脑、路由器和视频游戏控制台,到台式计算机、大型机和超级计算机。Linux 是一个领先的操作系统,世界上运算最快的10台超级计算机运行的都是Linux 操作系统[1]。Linux 一词的诞生之初仅仅代表的是Linux 操作系统的内核,但是,随着Linux 操作系统内核的不断发展,Linux 一词代表的是Linux 操作系统,并不仅仅局限于内核。Linux 得名于计算机业余爱好者Linus Torvalds 。 Linux 操作系统诞生与1981年,同一年,IBM 公司推出享誉全球的微型计算机IBM PC 。到1991年,GNU 计划已经开发出了许多工具软件,其中包括有名的emacs 编辑系统、bash shell 程序、gcc 系列编译程序、gdb 调试程序等等。这些软件为Linux 操作系统的开发创造了一个合适的环境,是Linux 能够诞生的基础之一。GNU 计划旨在开发一个类似Unix 的操作系统,并且该操作系统是完全免费的、开源的。但是Linux 内核的发展并不是很顺利,Gnu C 编译器的诞生也没有加快免费的GNU 操作系统的诞生,MINIX 操作系统在发展的过程中已经有了版权,但是这种操作系统是有偿的,并不是免费的。对于Linux 操作系统而言,已经发展到关键阶段,自1991年以来,Linus Torvalds 便着手编制属于自己的操作系统,随着研 Linux 操作系统构建原理与应用 Theory and application of Linux operating system 张 君 ZHANG Jun (呼伦贝尔学院,呼伦贝尔 021000) 摘 要: 随着计算机科学与技术的飞速发展,Linux操作系统以其开源、模块化程度高、硬件支持多等 特点获得了前所未有的发展,本课题皆在通过详细介绍Linux操作系统的起源,内核架构原理等基础知识,为广大读者提供全面的专业知识,课题的最后介绍了Linux操作系统目前的应用现状。 关键词: Linux;原理;调度;GNU 中图分类号:TP316 文献标识码:A 文章编号:1009-0134(2012)2(下)-0154-03Doi: 10.3969/j.issn.1009-0134.2012.2(下).48 收稿日期:2011-10-30 作者简介:张君(1978-),女,辽宁义县人,讲师,研究方向为计算方法理论。究的深入,Linux 操作系统不仅改变了传统的操作系统的编程模式,还成为了目前微软操作系统的最强大的竞争对手。 1 Linux 内核 操作系统的诞生是围绕着计算机的软件以及硬件而发展的,Linux 操作系统的诞生的目的便是用于和硬件进行通信,并为使用者提供服务的最底层的支撑软件,计算机的软件以及硬件是相互关联的,绝不能分割开。一个完整的计算机是由许多个硬件部件组成的,比如,处理器、内存、外围输入输出设备、硬盘等一些列电子设备。但是,这些硬件没有得到软件的支撑,硬件是毫无意义的。使得这些硬件能够投入工作的软件便是操作系统,操作系统也可以理解为硬件使能的软件,Linux 操作系统中的操作系统指的是“内核”或者“核心”,一个完整的Linux 内核主要有以下几个主要部分组成:文件系统、网络通信、存储管理系统、系统调用、CPU 和进程管理以系统初始化引导等。 操作系统的分析需要明确操作系统的体系架构,因此,分析操作系统不能仅仅局限于某一个角度、分析操作系统的其中的一个目标便是能够使得我们能够更加清晰理解操作系统的源码。Linux 内核从架构上得到创新,实现了技术性比较强的体系架构属性。一方面,Linux 内核是由很多个子系统组成的,另外一个方面,Linux 操作系统将所有的服务集成与内核一体中,因此,Linux 内核又是一个完整的整体。这些与微内核的体系架

Linux 线程实现机制分析

Linux 线程实现机制分析 杨沙洲 国防科技大学计算机学院 2003 年 5 月 19 日 自从多线程编程的概念出现在 Linux 中以来,Linux 多线应用的发展总是与两个问题脱不开干系:兼容性、 效率。本文从线程模型入手,通过分析目前 Linux 平台上最流行的 LinuxThreads 线程库的实现及其不足,描述了 Linux 社区是如何看待和解决兼容性和效率这两个问题的。 一 .基础知识:线程和进程 按照教科书上的定义,进程是资源管理的最小单位,线程是程序执行的最小单位。在操作系统设计上,从进程演化出线程,最主要的目的就是更好的支持 SMP 以及减小(进程/线程)上下文切换开销。 无论按照怎样的分法,一个进程至少需要一个线程作为它的指令执行体,进程管理着资源(比如cpu 、内存、 文件等等),而将线程分配到某个cpu 上执行。一个进程当然可以拥有多个线程,此时,如果进程运行在SMP 机器上,它就可以同时使用多个cpu 来执行各个线程,达到最大程度的并行,以提高效率;同时,即使是在单cpu 的机器上,采用多线程模型来设计程序,正如当年采用多进程模型代替单进程模型一样,使设计更简 洁、功能更完备,程序的执行效率也更高,例如采用多个线程响应多个输入,而此时多线程模型所实现的功能实际上也可以用多进程模型来实现,而与后者相比,线程的上下文切换开销就比进程要小多了,从语义上 来说,同时响应多个输入这样的功能,实际上就是共享了除cpu 以外的所有资源的。 针对线程模型的两大意义,分别开发出了核心级线程和用户级线程两种线程模型,分类的标准主要是线程的调度者在核内还是在核外。前者更利于并发使用多处理器的资源,而后者则更多考虑的是上下文切换开销。在目前的商用系统中,通常都将两者结合起来使用,既提供核心线程以满足smp 系统的需要,也支持用线程 库的方式在用户态实现另一套线程机制,此时一个核心线程同时成为多个用户态线程的调度者。正如很多技 术一样,"混合"通常都能带来更高的效率,但同时也带来更大的实现难度,出于"简单"的设计思路,Linux 从 一开始就没有实现混合模型的计划,但它在实现上采用了另一种思路的"混合"。 在线程机制的具体实现上,可以在操作系统内核上实现线程,也可以在核外实现,后者显然要求核内至少实现了进程,而前者则一般要求在核内同时也支持进程。核心级线程模型显然要求前者的支持,而用户级线程模型则不一定基于后者实现。这种差异,正如前所述,是两种分类方式的标准不同带来的。 当核内既支持进程也支持线程时,就可以实现线程-进程的"多对多"模型,即一个进程的某个线程由核内调度,而同时它也可以作为用户级线程池的调度者,选择合适的用户级线程在其空间中运行。这就是前面提到的"混合"线程模型,既可满足多处理机系统的需要,也可以最大限度的减小调度开销。绝大多数商业操作系统(如Digital Unix 、Solaris 、Irix )都采用的这种能够完全实现POSIX1003.1c 标准的线程模型。在核外实现的线程又可以分为"一对一"、"多对一"两种模型,前者用一个核心进程(也许是轻量进程)对应一个线程,将线程调度等同于进程调度,交给核心完成,而后者则完全在核外实现多线程,调度也在用户态完成。后者就是前面提到的单纯的用户级线程模型的实现方式,显然,这种核外的线程调度器实际上只需要完成线程运行栈的切换,调度开销非常小,但同时因为核心信号(无论是同步的还是异步的)都是以进程为单位的,因而无法定位到线程,所以这种实现方式不能用于多处理器系统,而这个需求正变得越来 内容: 一.基础知识:线程和进程 二.Linux 2.4内核中的轻量进程实现 三.LinuxThread 的线程机制 四.其他的线程实现机制 参考资料 关于作者 对本文的评价 订阅: developerWorks 时事通讯

Step by Step:Linux C多线程编程入门(基本API及多线程的同步与互斥)

介绍:什么是线程,线程的优点是什么 线程在Unix系统下,通常被称为轻量级的进程,线程虽然不是进程,但却可以看作是Unix进程的表亲,同一进程中的多条线程将共享该进程中的全部系统资源,如虚拟地址空间,文件描述符和信号处理等等。但同一进程中的多个线程有各自的调用栈(call stack),自己的寄存器环境(register context),自己的线程本地存储(thread-local storage)。 一个进程可以有很多线程,每条线程并行执行不同的任务。 线程可以提高应用程序在多核环境下处理诸如文件I/O或者socket I/O等会产生堵塞的情况的表现性能。在Unix系统中,一个进程包含很多东西,包括可执行程序以及一大堆的诸如文件描述符地址空间等资源。在很多情况下,完成相关任务的不同代码间需要交换数据。如果采用多进程的方式,那么通信就需要在用户空间和内核空间进行频繁的切换,开销很大。但是如果使用多线程的方式,因为可以使用共享的全局变量,所以线程间的通信(数据交换)变得非常高效。 Hello World(线程创建、结束、等待) 创建线程 pthread_create 线程创建函数包含四个变量,分别为: 1. 一个线程变量名,被创建线程的标识 2. 线程的属性指针,缺省为NULL即可 3. 被创建线程的程序代码 4. 程序代码的参数 For example: - pthread_t thrd1? - pthread_attr_t attr? - void thread_function(void argument)? - char *some_argument? pthread_create(&thrd1, NULL, (void *)&thread_function, (void *) &some_argument); 结束线程 pthread_exit 线程结束调用实例:pthread_exit(void *retval); //retval用于存放线程结束的退出状态 线程等待 pthread_join pthread_create调用成功以后,新线程和老线程谁先执行,谁后执行用户是不知道的,这一块取决与操作系统对线程的调度,如果我们需要等待指定线程结束,需要使用pthread_join函数,这个函数实际上类似与多进程编程中的waitpid。 举个例子,以下假设 A 线程调用 pthread_join 试图去操作B线程,该函数将A线程阻塞,直到B线程退出,当B线程退出以后,A线程会收集B线程的返回码。 该函数包含两个参数:pthread_t th //th是要等待结束的线程的标识 void **thread_return //指针thread_return指向的位置存放的是终止线程的返回状态。 调用实例:pthread_join(thrd1, NULL); example1: 1 /************************************************************************* 2 > F i l e N a m e: t h r e a d_h e l l o_w o r l d.c 3 > A u t h o r: c o u l d t t(f y b y) 4 > M a i l: f u y u n b i y i@g m a i l.c o m 5 > C r e a t e d T i m e: 2013年12月14日 星期六 11时48分50秒 6 ************************************************************************/ 7 8 #i n c l u d e 9 #i n c l u d e 10 #i n c l u d e

11 12 v o i d p r i n t_m e s s a g e_f u n c t i o n (v o i d *p t r)? 13 14 i n t m a i n() 15 { 16 i n t t m p1, t m p2?

linux中用信号进行进程时延控制

Linux下使用信号进行进程的运行控制 1linux的信号 信号全称为软中断信号,也有人称作软中断,是Linux系统中的最古老的进程间通讯方式。它们用来向一个或多个进程发送异步事件信号。信号可以从键盘中断中产生,另外进程对虚拟内存的非法存取等系统错误环境下也会有信号产生。信号还被shell程序用来向其子进程发送任务控制命令。 2系统调用介绍 2.1 alarm系统调用 #include unsigned int alarm(unsigned int seconds); alarm()用来设置信号SIGALRM在经过参数seconds指定的秒数后传送给目前的进程。如果参数seconds为0,则之前设置的闹钟会被取消,并将剩下的时间返回。返回之前闹钟的剩余秒数,如果之前未设闹钟则返回0。 2.2Signal #include typedef void (*sighandler_t)(int); sighandler_t signal(int signum, sighandler_t handler); signal系统调用用来说明对信号的处理方法。Signum参数用来指定信号,handler可以 如果是信号处理函数,则signal会在收到信号后调用该函数,我们可以形象的称为信号注册处理函数。 2.3kill系统调用 #include #include int kill(pid_t pid,int sig); kill函数用于给进程组或进程发送信号。pid为目标进程号,sig为要被发送的信号。发送信号的进程必须和目标进程在同一个进程组,或者发送i信号的进程的拥有者是一个超级用户,另外,进程可以向自己发送信号。 2.4pause系统调用 #include int pause(void); pause函数使调用进程挂起直到有信号递达。如果信号的处理动作是终止进程,则进程终止,pause函数没有机会返回;如果信号的处理动作是忽略,则进程继续处于挂起状态,pause不返回;如果信号的处理动作是捕捉,则调用了信号处理函数之后pause返回-1,errno设置为EINTR,所以pause只有出错的返回值。错误码EINTR表示“被信号中断”。 3进程自身时延控制 进程可以利用信号机制来实现对自身运行状态的控制。以下示例程序就是利用alarm()系统调用来时间程序对自身运行时间的控制。 #include #include #include

linux驱动工程师面试题整理

1、字符型驱动设备你是怎么创建设备文件的,就是/dev/下面的设备文件,供上层应用程序打开使用的文件? 答:mknod命令结合设备的主设备号和次设备号,可创建一个设备文件。 评:这只是其中一种方式,也叫手动创建设备文件。还有UDEV/MDEV自动创建设备文件的方式,UDEV/MDEV是运行在用户态的程序,可以动态管理设备文件,包括创建和删除设备文件,运行在用户态意味着系统要运行之后。那么在系统启动期间还有devfs创建了设备文件。一共有三种方式可以创建设备文件。 2、写一个中断服务需要注意哪些?如果中断产生之后要做比较多的事情你是怎么做的?答:中断处理例程应该尽量短,把能放在后半段(tasklet,等待队列等)的任务尽量放在后半段。 评:写一个中断服务程序要注意快进快出,在中断服务程序里面尽量快速采集信息,包括硬件信息,然后推出中断,要做其它事情可以使用工作队列或者tasklet方式。也就是中断上半部和下半部。 第二:中断服务程序中不能有阻塞操作。为什么?大家可以讨论。 第三:中断服务程序注意返回值,要用操作系统定义的宏做为返回值,而不是自己定义的OK,FAIL之类的。 3、自旋锁和信号量在互斥使用时需要注意哪些?在中断服务程序里面的互斥是使用自旋锁还是信号量?还是两者都能用?为什么? 答:使用自旋锁的进程不能睡眠,使用信号量的进程可以睡眠。中断服务例程中的互斥使用的是自旋锁,原因是在中断处理例程中,硬中断是关闭的,这样会丢失可能到来的中断。 4、原子操作你怎么理解?为了实现一个互斥,自己定义一个变量作为标记来作为一个资源只有一个使用者行不行? 答:原子操作指的是无法被打断的操作。我没懂第二句是什么意思,自己定义一个变量怎么可能标记资源的使用情况?其他进程又看不见这个变量 评:第二句话的意思是: 定义一个变量,比如int flag =0; if(flag == 0) { flag = 1; 操作临界区; flag = 0;

LINUX内核经典面试题.docx

LINUX内核经典面试题2015-05-02 23:08:14 分类:LIMX 原文地址:LINUX内核经典面试题作者:sunjiangang-ok 1)Linux中主要有哪儿种内核锁? 2)Linux屮的用户模式和内核模式是什么含意? 3)怎样申请大块内核内存? 4)用户进程间通信主要哪儿种方式? 5)通过伙伴系统中请内核内存的函数有哪些? 6)通过slab分配器巾请内核内存的函数有? 7)Linux的内核空间和用户空间是如何划分的(以32位系统为例)? 8)vmalloc()中请的内存有什么特点? 9)用户程序使用malloc()中请到的内存空间在什么范围? 10)在支持并使能MMU的系统中,Linux内核和用户程序分别运行在物理地址模式还是虚拟地址模式? 11)ARM处理器是通过儿级也表进行存储空间映射的? 12)Linux是通过什么组件来实现支持多种文件系通的? 13)Linux虚拟文件系统的关键数据结构有哪些?(至少写出四个) 14)对文件或设备的操作函数保存在那个数据结构中? 15)Linux中的文件包括哪些? 16)创建进程的系统调用有那些? 17)调用schedule()ffl行进程切换的方式有儿种? 18)Linux调度程序是根据进程的动态优先级还是静态优先级来调度进程的? 19)进程调度的核心数据结构是哪个? 20)如何加载、卸载一个模块? 21)模块和应用程序分别运行在什么空间? 22)Linux中的浮点运算由应用程序实现还是内核实现? 23)模块程序能否使用可链接的库函数? 24)TLB中缓存的是什么内容? 25)Linux中有哪儿种设备? 26)字符设备駆动程序的关键数据结构是哪个? 27)设备驱动程序包扌舌哪些功能函数? 28)如何唯一标识一个设备? 29)Linux通过什么方式实现系统调用? 30)Linux软中断和工作队列的作用是什么? 1. Linux中主要有哪几种内核锁?

LINUX信号基本原理

LINUX信号基本原理 功能描述: 处理信号。既可用于设定对任意信号的处理方式,也可用于检验该信号的目前预设处置方式。 用法: #include int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); 参数: signum:除了SIGKILL和SIGSTOP之外的其它任何信号编码。 act:如果值非NULL,将安装为signum关联信号的新处理方式。 oldact:如果值非NULL,存储以前对signum关联信号的处理方式。 sigaction的结构形态如下: struct sigaction { void (*sa_handler)(int); void (*sa_sigaction)(int, siginfo_t *, void *); sigset_t sa_mask; int sa_flags; void (*sa_restorer)(void); } 在一些体系上,sa_handler和sa_sigaction共用一个联合体(union),所以不要同时指定两个字段的值。sa_restorer字段已淘汰,不应该再被使用。 sa_handler字段指定与signum信号关联的行为,可能是SIG_DFL默认行为,SIG_IGN忽略接送到的信号,或者一个信号处理函数指针。这个函数以一个信号编码作为它的唯一参数。 如果sa_flags中存在SA_SIGINFO标志,那么sa_sigaction将作为signum信号的处理函数。这个函数的第一参数是信号编码,第二参数是siginfo_t结构的指针,第三参数是ucontext_t结构指针(造型为void *)。 sa_mask指定信号处理函数执行的过程中应被阻塞的信号。另外,除了 SA_NODEFER标志被指定外,触发信号处理函数执行的那个信号也会被阻塞。

Linux进程同步

Linux进程同步 1.概述 Linux系统同一时间可能有多个进程在执行,因此需要一些同步机制来同步各个进程对于共享资源的访问。在Linux内核中有相应的同步技术实现,包括原子操作、信号量、读写信号量、自旋锁和等待队列等等。本文从同步的机制出发,重点研究讨论了Linux系统非阻塞的同步机制、Linux系统内核同步机制、Linux系统多线程的同步机制。 我们在实际生活中经常碰到这样的一类问题:有时候我们在使用打印机实现某种功能的时候,有可能使多个任务的打印结果交织在一起,造成混乱。这时多任务之间的同步操作便显得非常重要。比如在工业控制中的多个相互合作的任务,可以将数据采集、数据处理和数据输出划分为不同的任务。在它们之间建立一种必要的通信机制,使得采集任务可以通知数据处理任务。在新采集的数据已经处理完毕的时候,数据处理任务可以及时的通知输出任务,告诉输出任务需要实现的结果已经经过计算完成,需要通过输出设备输出。多任务的引入主要有以下有点:多任务的引入改善了系统的资源利用率,并且提高了系统的吞吐量,尤其是在嵌入式多任务操作系统中,但是与此同时多任务的引入也带来了另外的问题,那就是多个任务间如何协调、合作共同完成一个大的系统功能。特别是当我们在竞争使用临界资源,或是需要相互通知某些事件发生时。 另外在Linux操作系统里,在某一个时间段里,有些资源可能被很多内核同时来调用,这时我们便需要一套同步机制来同步各内核执行单元对共享数据的访问。尤其是在多核通信的机制上更需要同步机制来协调进程之间的通信。在Linux内核中有相应的技术实现,主要包括原子操作、信号量、读写信号量、自旋锁和等待队列。利用常用的同步机制可以有效地实现多任务、多内核之间的优化,实现其之间的合理调度。 2.同步机制 2.1临界资源与临界区 我们把在一段时间内只允许一个任务访问的资源叫做临界资源。这里与vxworks中的信号量的使用比较的类似。任务在占有CPU之后,还需要相应的资源才可以正常的执行。如果此时任务需要的资源被其它任务所占有,那么当前任务必须等待前一个任务完成并释放该资源后,才可以执行。把程序中使用临界资源的代码称为临界区。如果此刻临界资源未能访问,该任务便可以进入临界区,并将其设置为被访问状态。然后,即可以对临界资源进行操作。待任务完成后释放其占用的资源。

linux

Linux Linux 简介 Linux内核最初只是由芬兰人李纳斯·托瓦兹(Linus Torvalds)在赫尔辛基大学上学时出于个人爱好而编写的。 Linux是一套免费使用和自由传播的类Unix操作系统,是一个基于POSIX和UNIX的多用户、多任务、支持多线程和多CPU的操作系统。 Linux能运行主要的UNIX工具软件、应用程序和网络协议。它支持32位和64位硬件。Linux继承了Unix以网络为核心的设计思想,是一个性能稳定的多用户网络操作系统。 Linux的发行版 Linux的发行版说简单点就是将Linux内核与应用软件做一个打包。 目前市面上较知名的发行版有:Ubuntu、RedHat、CentOS、Debain、Fedora、SuSE、OpenSUSE、TurboLinux、BluePoint、RedFlag、Xterm、SlackWare等。 Linux应用领域 今天各种场合都有使用各种Linux发行版,从嵌入式设备到超级计算机,并且在服务器领域确定了地位,通常服务器使用LAMP(Linux + Apache + MySQL + PHP)或LNMP(Linux + Nginx+ MySQL + PHP)组合。 目前Linux不仅在家庭与企业中使用,并且在政府中也很受欢迎。 巴西联邦政府由于支持Linux而世界闻名。 有新闻报道俄罗斯军队自己制造的Linux发布版的,做为G.H.ost项目已经取得成果. 印度的Kerala联邦计划在向全联邦的高中推广使用Linux。 中华人民共和国为取得技术独立,在龙芯过程中排他性地使用Linux。 在西班牙的一些地区开发了自己的Linux发布版,并且在政府与教育领域广泛使用,如Extremadura地区的gnuLinEx和Andalusia地区的Guadalinex。 葡萄牙同样使用自己的Linux发布版Caixa Mágica,用于Magalh?es笔记本电脑和e-escola政府软件。 法国和德国同样开始逐步采用Linux。 Linux vs Window 目前国内Linux更多的是应用于服务器上,而桌面操作系统更多使用的是Window。主要区别如下: 比较 Windows Linux 界面界面统一,外壳程序固定所有Windows程序菜单几乎一致, 快捷键也几乎相同 图形界面风格依发布版不同而不同,可能互不兼容。GNU/Linux的终端机是从 UNIX传承下来,基本命令和操作方法也几乎一致。 驱动程序驱动程序丰富,版本更新频繁。默认安装程序里面一般包 含有该版本发布时流行的硬件驱动程序,之后所出的新硬 件驱动依赖于硬件厂商提供。对于一些老硬件,如果没有 了原配的驱动有时很难支持。另外,有时硬件厂商未提供 所需版本的Windows下的驱动,也会比较头痛。 由志愿者开发,由Linux核心开发小组发布,很多硬件厂商基于版权考虑并未提 供驱动程序,尽管多数无需手动安装,但是涉及安装则相对复杂,使得新用户面 对驱动程序问题(是否存在和安装方法)会一筹莫展。但是在开源开发模式下, 许多老硬件尽管在Windows下很难支持的也容易找到驱动。HP、Intel、AMD等硬 件厂商逐步不同程度支持开源驱动,问题正在得到缓解。 使用使用比较简单,容易入门。图形化界面对没有计算机背景 知识的用户使用十分有利。 图形界面使用简单,容易入 门。 文字界面,需要学习才能掌握。 学习系统构造复杂、变化频繁,且知识、技能淘汰快,深入学 习困难。 系统构造简单、稳定,且知识、技能传承性好,深入学习相对容易。 软件每一种特定功能可能都需要商业软件的支持,需要购买相 应的授权。 大部分软件都可以自由获取,同样功能的软件选择较少。 Linux 安装 略 Linux 系统启动过程linux启动时我们会看到许多启动信息。